Этот коммит содержится в:
Owen Graupman 2016-06-27 13:06:29 -06:00
родитель c8ff23a1de
коммит 69ed359409

Просмотреть файл

@ -256,9 +256,11 @@ func (f *pretty) printStepKind(res *stepResult) {
// first step of scenario, print header and calculate comment position // first step of scenario, print header and calculate comment position
case f.scenario != nil && f.steps == len(f.scenario.Steps): case f.scenario != nil && f.steps == len(f.scenario.Steps):
f.commentPos = f.longestStep(f.scenario.Steps, f.length(f.scenario)) f.commentPos = f.longestStep(f.scenario.Steps, f.length(f.scenario))
if f.feature.Background != nil {
if bgLen := f.longestStep(f.feature.Background.Steps, f.length(f.feature.Background)); bgLen > f.commentPos { if bgLen := f.longestStep(f.feature.Background.Steps, f.length(f.feature.Background)); bgLen > f.commentPos {
f.commentPos = bgLen f.commentPos = bgLen
} }
}
text := s(f.indent) + bcl(f.scenario.Keyword+": ", white) + f.scenario.Name 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) text += s(f.commentPos-f.length(f.scenario)+1) + f.line(f.scenario.Location)
fmt.Println("\n" + text) fmt.Println("\n" + text)