Skip to content

Commit

Permalink
Merge pull request Checkmarx#4552 from Checkmarx/feature/add-expected…
Browse files Browse the repository at this point in the history
…-value-pdf

feat(report): Added expected value to PDF report
  • Loading branch information
nunoocx authored Nov 23, 2021
2 parents ee6c0f8 + 109f839 commit 0a82134
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/report/pdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

const (
defaultTextSize = 8
smallTextSize = 6
pgMarginLeft = 10
pgMarginTop = 15
pgMarginRight = 10
Expand Down Expand Up @@ -219,6 +220,16 @@ func createResultsTable(m pdf.Maroto, query *model.QueryResult) {
})
})
})
expectedValue := fmt.Sprintf("Expected: %s", query.Files[idx].KeyExpectedValue)
m.Row(colFive, func() {
m.Col(colFullPage, func() {
m.Text(expectedValue, props.Text{
Size: smallTextSize,
Align: consts.Left,
Extrapolate: false,
})
})
})
}
m.SetBackgroundColor(color.NewWhite())
m.Line(1.0)
Expand Down

0 comments on commit 0a82134

Please sign in to comment.