We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
given
Feature: Background: Given very long string here we cannot imagine how long Scenario: Given short
leads to panic in pretty printer.
The following patch fixes it for me:
--- a/fmt_pretty.go +++ b/fmt_pretty.go @@ -256,6 +256,9 @@ func (f *pretty) printStepKind(res *stepResult) { // first step of scenario, print header and calculate comment position case f.scenario != nil && f.steps == len(f.scenario.Steps): f.commentPos = f.longestStep(f.scenario.Steps, f.length(f.scenario)) + if bgLength := f.longestStep(f.feature.Background.Steps, f.length(f.feature.Background)); bgLength > f.commentPos { + f.commentPos = bgLength + } text := s(f.indent) + bcl(f.scenario.Keyword+": ", white) + f.scenario.Name text += s(f.commentPos-f.length(f.scenario)+1) + f.line(f.scenario.Location) fmt.Println("\n" + text)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
given
leads to panic in pretty printer.
The following patch fixes it for me:
The text was updated successfully, but these errors were encountered: