родитель
							
								
									ff7adb7f65
								
							
						
					
					
						коммит
						7a1b9ad5a9
					
				
					 13 изменённых файлов: 54 добавлений и 54 удалений
				
			
		|  | @ -153,8 +153,8 @@ func (f *pretty) Summary() { | |||
| 	if len(f.failed) > 0 { | ||||
| 		fmt.Fprintln(f.out, "\n--- "+red("Failed steps:")+"\n") | ||||
| 		for _, fail := range f.failed { | ||||
| 			fmt.Fprintln(f.out, s(2)+red(fail.scenarioDesc())+black(" # "+fail.scenarioLine())) | ||||
| 			fmt.Fprintln(f.out, s(4)+red(strings.TrimSpace(fail.step.Keyword)+" "+fail.step.Text)+black(" # "+fail.line())) | ||||
| 			fmt.Fprintln(f.out, s(2)+red(fail.scenarioDesc())+blackb(" # "+fail.scenarioLine())) | ||||
| 			fmt.Fprintln(f.out, s(4)+red(strings.TrimSpace(fail.step.Keyword)+" "+fail.step.Text)+blackb(" # "+fail.line())) | ||||
| 			fmt.Fprintln(f.out, s(6)+red("Error: ")+redb(fmt.Sprintf("%+v", fail.err))+"\n") | ||||
| 		} | ||||
| 	} | ||||
|  | @ -203,7 +203,7 @@ func (f *pretty) printOutlineExample(outline *gherkin.ScenarioOutline) { | |||
| 				} else { | ||||
| 					text = cyan(ostep.Text) | ||||
| 				} | ||||
| 				text += s(f.commentPos-f.length(ostep)+1) + black(fmt.Sprintf("# %s", res.def.definitionID())) | ||||
| 				text += s(f.commentPos-f.length(ostep)+1) + blackb(fmt.Sprintf("# %s", res.def.definitionID())) | ||||
| 			} else { | ||||
| 				text = cyan(ostep.Text) | ||||
| 			} | ||||
|  | @ -294,7 +294,7 @@ func (f *pretty) printStep(step *gherkin.Step, def *StepDef, c colors.ColorFunc) | |||
| 		} else { | ||||
| 			text += c(step.Text) | ||||
| 		} | ||||
| 		text += s(f.commentPos-f.length(step)+1) + black(fmt.Sprintf("# %s", def.definitionID())) | ||||
| 		text += s(f.commentPos-f.length(step)+1) + blackb(fmt.Sprintf("# %s", def.definitionID())) | ||||
| 	default: | ||||
| 		text += c(step.Text) | ||||
| 	} | ||||
|  | @ -480,7 +480,7 @@ func (f *pretty) longestStep(steps []*gherkin.Step, base int) int { | |||
| 
 | ||||
| // a line number representation in feature file | ||||
| func (f *pretty) line(loc *gherkin.Location) string { | ||||
| 	return black(fmt.Sprintf("# %s:%d", f.features[len(f.features)-1].Path, loc.Line)) | ||||
| 	return blackb(fmt.Sprintf("# %s:%d", f.features[len(f.features)-1].Path, loc.Line)) | ||||
| } | ||||
| 
 | ||||
| func (f *pretty) length(node interface{}) int { | ||||
|  |  | |||
|  | @ -58,8 +58,8 @@ func (f *progress) Summary() { | |||
| 	if len(f.failed) > 0 { | ||||
| 		fmt.Fprintln(f.out, "\n--- "+red("Failed steps:")+"\n") | ||||
| 		for _, fail := range f.failed { | ||||
| 			fmt.Fprintln(f.out, s(2)+red(fail.scenarioDesc())+black(" # "+fail.scenarioLine())) | ||||
| 			fmt.Fprintln(f.out, s(4)+red(strings.TrimSpace(fail.step.Keyword)+" "+fail.step.Text)+black(" # "+fail.line())) | ||||
| 			fmt.Fprintln(f.out, s(2)+red(fail.scenarioDesc())+blackb(" # "+fail.scenarioLine())) | ||||
| 			fmt.Fprintln(f.out, s(4)+red(strings.TrimSpace(fail.step.Keyword)+" "+fail.step.Text)+blackb(" # "+fail.line())) | ||||
| 			fmt.Fprintln(f.out, s(6)+red("Error: ")+redb(fmt.Sprintf("%+v", fail.err))+"\n") | ||||
| 		} | ||||
| 	} | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| <bold-white>Feature:</bold-white> empty feature | ||||
| 
 | ||||
|   <bold-white>Scenario:</bold-white> without steps <black># formatter-tests/features/empty_with_single_scenario_without_steps.feature:3</black> | ||||
|   <bold-white>Scenario:</bold-white> without steps <bold-black># formatter-tests/features/empty_with_single_scenario_without_steps.feature:3</bold-black> | ||||
| 
 | ||||
| 1 scenarios (<yellow>1 undefined</yellow>) | ||||
| No steps | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
|   an empty | ||||
|   feature | ||||
| 
 | ||||
|   <bold-white>Scenario:</bold-white> without steps <black># formatter-tests/features/empty_with_single_scenario_without_steps_and_description.feature:6</black> | ||||
|   <bold-white>Scenario:</bold-white> without steps <bold-black># formatter-tests/features/empty_with_single_scenario_without_steps_and_description.feature:6</bold-black> | ||||
| 
 | ||||
| 1 scenarios (<yellow>1 undefined</yellow>) | ||||
| No steps | ||||
|  |  | |||
|  | @ -1,9 +1,9 @@ | |||
| <bold-white>Feature:</bold-white> outline | ||||
| 
 | ||||
|   <bold-white>Scenario Outline:</bold-white> outline               <black># formatter-tests/features/scenario_outline.feature:5</black> | ||||
|     <cyan>Given</cyan> <cyan>passing step</cyan>                    <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|     <cyan>When</cyan> <cyan>passing step</cyan>                     <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|     <cyan>Then</cyan> <cyan>odd </cyan><bold-cyan><odd></bold-cyan><cyan> and even </cyan><bold-cyan><even></bold-cyan><cyan> number</cyan> <black># formatters_print_test.go:67 -> oddEvenStepDef</black> | ||||
|   <bold-white>Scenario Outline:</bold-white> outline               <bold-black># formatter-tests/features/scenario_outline.feature:5</bold-black> | ||||
|     <cyan>Given</cyan> <cyan>passing step</cyan>                    <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
|     <cyan>When</cyan> <cyan>passing step</cyan>                     <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
|     <cyan>Then</cyan> <cyan>odd </cyan><bold-cyan><odd></bold-cyan><cyan> and even </cyan><bold-cyan><even></bold-cyan><cyan> number</cyan> <bold-black># formatters_print_test.go:67 -> oddEvenStepDef</bold-black> | ||||
| 
 | ||||
|     <bold-white>Examples:</bold-white> tagged | ||||
|       | <cyan>odd</cyan> | <cyan>even</cyan> | | ||||
|  | @ -21,16 +21,16 @@ | |||
| 
 | ||||
| --- <red>Failed steps:</red> | ||||
| 
 | ||||
|   <red>Scenario Outline: outline</red><black> # formatter-tests/features/scenario_outline.feature:5</black> | ||||
|     <red>Then odd 2 and even 0 number</red><black> # formatter-tests/features/scenario_outline.feature:8</black> | ||||
|   <red>Scenario Outline: outline</red><bold-black> # formatter-tests/features/scenario_outline.feature:5</bold-black> | ||||
|     <red>Then odd 2 and even 0 number</red><bold-black> # formatter-tests/features/scenario_outline.feature:8</bold-black> | ||||
|       <red>Error: </red><bold-red>2 is not odd</bold-red> | ||||
| 
 | ||||
|   <red>Scenario Outline: outline</red><black> # formatter-tests/features/scenario_outline.feature:5</black> | ||||
|     <red>Then odd 3 and even 11 number</red><black> # formatter-tests/features/scenario_outline.feature:8</black> | ||||
|   <red>Scenario Outline: outline</red><bold-black> # formatter-tests/features/scenario_outline.feature:5</bold-black> | ||||
|     <red>Then odd 3 and even 11 number</red><bold-black> # formatter-tests/features/scenario_outline.feature:8</bold-black> | ||||
|       <red>Error: </red><bold-red>11 is not even</bold-red> | ||||
| 
 | ||||
|   <red>Scenario Outline: outline</red><black> # formatter-tests/features/scenario_outline.feature:5</black> | ||||
|     <red>Then odd 3 and even 9 number</red><black> # formatter-tests/features/scenario_outline.feature:8</black> | ||||
|   <red>Scenario Outline: outline</red><bold-black> # formatter-tests/features/scenario_outline.feature:5</bold-black> | ||||
|     <red>Then odd 3 and even 9 number</red><bold-black> # formatter-tests/features/scenario_outline.feature:8</bold-black> | ||||
|       <red>Error: </red><bold-red>9 is not even</bold-red> | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,12 +1,12 @@ | |||
| <bold-white>Feature:</bold-white> single scenario with background | ||||
| 
 | ||||
|   <bold-white>Background:</bold-white> named | ||||
|     <green>Given</green> <green>passing step</green> <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|     <green>And</green> <green>passing step</green>   <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|     <green>Given</green> <green>passing step</green> <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
|     <green>And</green> <green>passing step</green>   <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
| 
 | ||||
|   <bold-white>Scenario:</bold-white> scenario   <black># formatter-tests/features/scenario_with_background.feature:7</black> | ||||
|     <green>When</green> <green>passing step</green>  <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|     <green>Then</green> <green>passing step</green>  <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|   <bold-white>Scenario:</bold-white> scenario   <bold-black># formatter-tests/features/scenario_with_background.feature:7</bold-black> | ||||
|     <green>When</green> <green>passing step</green>  <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
|     <green>Then</green> <green>passing step</green>  <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
| 
 | ||||
| 1 scenarios (<green>1 passed</green>) | ||||
| 4 steps (<green>4 passed</green>) | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
|   <bold-white>Background:</bold-white> | ||||
|     <cyan>Given</cyan> <cyan>passing step</cyan> | ||||
| 
 | ||||
|   <bold-white>Scenario:</bold-white> without steps <black># formatter-tests/features/scenario_without_steps_with_background.feature:6</black> | ||||
|   <bold-white>Scenario:</bold-white> without steps <bold-black># formatter-tests/features/scenario_without_steps_with_background.feature:6</bold-black> | ||||
| 
 | ||||
| 1 scenarios (<yellow>1 undefined</yellow>) | ||||
| No steps | ||||
|  |  | |||
|  | @ -3,8 +3,8 @@ | |||
|   a single scenario | ||||
|   feature | ||||
| 
 | ||||
|   <bold-white>Scenario:</bold-white> one step passing <black># formatter-tests/features/single_scenario_with_passing_step.feature:6</black> | ||||
|     <green>Given</green> <green>a passing step</green>     <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|   <bold-white>Scenario:</bold-white> one step passing <bold-black># formatter-tests/features/single_scenario_with_passing_step.feature:6</bold-black> | ||||
|     <green>Given</green> <green>a passing step</green>     <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
| 
 | ||||
| 1 scenarios (<green>1 passed</green>) | ||||
| 1 steps (<green>1 passed</green>) | ||||
|  |  | |||
|  | @ -1,24 +1,24 @@ | |||
| <bold-white>Feature:</bold-white> some scenarios | ||||
| 
 | ||||
|   <bold-white>Scenario:</bold-white> failing    <black># formatter-tests/features/some_scenarions_including_failing.feature:3</black> | ||||
|     <green>Given</green> <green>passing step</green> <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|     <red>When</red> <red>failing step</red>  <black># formatters_print_test.go:81 -> failingStepDef</black> | ||||
|   <bold-white>Scenario:</bold-white> failing    <bold-black># formatter-tests/features/some_scenarions_including_failing.feature:3</bold-black> | ||||
|     <green>Given</green> <green>passing step</green> <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
|     <red>When</red> <red>failing step</red>  <bold-black># formatters_print_test.go:81 -> failingStepDef</bold-black> | ||||
|     <bold-red>step failed</bold-red> | ||||
|     <cyan>Then</cyan> <cyan>passing step</cyan>  <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|     <cyan>Then</cyan> <cyan>passing step</cyan>  <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
| 
 | ||||
|   <bold-white>Scenario:</bold-white> pending   <black># formatter-tests/features/some_scenarions_including_failing.feature:8</black> | ||||
|     <yellow>When</yellow> <yellow>pending step</yellow> <black># formatters_print_test.go:79 -> pendingStepDef</black> | ||||
|   <bold-white>Scenario:</bold-white> pending   <bold-black># formatter-tests/features/some_scenarions_including_failing.feature:8</bold-black> | ||||
|     <yellow>When</yellow> <yellow>pending step</yellow> <bold-black># formatters_print_test.go:79 -> pendingStepDef</bold-black> | ||||
|       <yellow>TODO: write pending definition</yellow> | ||||
|     <cyan>Then</cyan> <cyan>passing step</cyan> <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|     <cyan>Then</cyan> <cyan>passing step</cyan> <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
| 
 | ||||
|   <bold-white>Scenario:</bold-white> undefined <black># formatter-tests/features/some_scenarions_including_failing.feature:12</black> | ||||
|   <bold-white>Scenario:</bold-white> undefined <bold-black># formatter-tests/features/some_scenarions_including_failing.feature:12</bold-black> | ||||
|     <yellow>When</yellow> <yellow>undefined</yellow> | ||||
|     <cyan>Then</cyan> <cyan>passing step</cyan> <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|     <cyan>Then</cyan> <cyan>passing step</cyan> <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
| 
 | ||||
| --- <red>Failed steps:</red> | ||||
| 
 | ||||
|   <red>Scenario: failing</red><black> # formatter-tests/features/some_scenarions_including_failing.feature:3</black> | ||||
|     <red>When failing step</red><black> # formatter-tests/features/some_scenarions_including_failing.feature:5</black> | ||||
|   <red>Scenario: failing</red><bold-black> # formatter-tests/features/some_scenarions_including_failing.feature:3</bold-black> | ||||
|     <red>When failing step</red><bold-black> # formatter-tests/features/some_scenarions_including_failing.feature:5</bold-black> | ||||
|       <red>Error: </red><bold-red>step failed</bold-red> | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,26 +1,26 @@ | |||
| <bold-white>Feature:</bold-white> two scenarios with background fail | ||||
| 
 | ||||
|   <bold-white>Background:</bold-white> | ||||
|     <green>Given</green> <green>passing step</green> <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|     <red>And</red> <red>failing step</red>   <black># formatters_print_test.go:81 -> failingStepDef</black> | ||||
|     <green>Given</green> <green>passing step</green> <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
|     <red>And</red> <red>failing step</red>   <bold-black># formatters_print_test.go:81 -> failingStepDef</bold-black> | ||||
|     <bold-red>step failed</bold-red> | ||||
| 
 | ||||
|   <bold-white>Scenario:</bold-white> one        <black># formatter-tests/features/two_scenarios_with_background_fail.feature:7</black> | ||||
|     <cyan>When</cyan> <cyan>passing step</cyan>  <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|     <cyan>Then</cyan> <cyan>passing step</cyan>  <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|   <bold-white>Scenario:</bold-white> one        <bold-black># formatter-tests/features/two_scenarios_with_background_fail.feature:7</bold-black> | ||||
|     <cyan>When</cyan> <cyan>passing step</cyan>  <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
|     <cyan>Then</cyan> <cyan>passing step</cyan>  <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
| 
 | ||||
|   <bold-white>Scenario:</bold-white> two        <black># formatter-tests/features/two_scenarios_with_background_fail.feature:11</black> | ||||
|   <bold-white>Scenario:</bold-white> two        <bold-black># formatter-tests/features/two_scenarios_with_background_fail.feature:11</bold-black> | ||||
|     <bold-red>step failed</bold-red> | ||||
|     <cyan>Then</cyan> <cyan>passing step</cyan>  <black># formatters_print_test.go:65 -> passingStepDef</black> | ||||
|     <cyan>Then</cyan> <cyan>passing step</cyan>  <bold-black># formatters_print_test.go:65 -> passingStepDef</bold-black> | ||||
| 
 | ||||
| --- <red>Failed steps:</red> | ||||
| 
 | ||||
|   <red>Scenario: one</red><black> # formatter-tests/features/two_scenarios_with_background_fail.feature:7</black> | ||||
|     <red>And failing step</red><black> # formatter-tests/features/two_scenarios_with_background_fail.feature:5</black> | ||||
|   <red>Scenario: one</red><bold-black> # formatter-tests/features/two_scenarios_with_background_fail.feature:7</bold-black> | ||||
|     <red>And failing step</red><bold-black> # formatter-tests/features/two_scenarios_with_background_fail.feature:5</bold-black> | ||||
|       <red>Error: </red><bold-red>step failed</bold-red> | ||||
| 
 | ||||
|   <red>Scenario: two</red><black> # formatter-tests/features/two_scenarios_with_background_fail.feature:11</black> | ||||
|     <red>And failing step</red><black> # formatter-tests/features/two_scenarios_with_background_fail.feature:5</black> | ||||
|   <red>Scenario: two</red><bold-black> # formatter-tests/features/two_scenarios_with_background_fail.feature:11</bold-black> | ||||
|     <red>And failing step</red><bold-black> # formatter-tests/features/two_scenarios_with_background_fail.feature:5</bold-black> | ||||
|       <red>Error: </red><bold-red>step failed</bold-red> | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,8 +1,8 @@ | |||
| <bold-white>Feature:</bold-white> few empty scenarios | ||||
| 
 | ||||
|   <bold-white>Scenario:</bold-white> one <black># formatter-tests/features/with_few_empty_scenarios.feature:3</black> | ||||
|   <bold-white>Scenario:</bold-white> one <bold-black># formatter-tests/features/with_few_empty_scenarios.feature:3</bold-black> | ||||
| 
 | ||||
|   <bold-white>Scenario Outline:</bold-white> two <black># formatter-tests/features/with_few_empty_scenarios.feature:5</black> | ||||
|   <bold-white>Scenario Outline:</bold-white> two <bold-black># formatter-tests/features/with_few_empty_scenarios.feature:5</bold-black> | ||||
| 
 | ||||
|     <bold-white>Examples:</bold-white> first group | ||||
|       | <cyan>one</cyan> | <cyan>two</cyan> | | ||||
|  | @ -13,7 +13,7 @@ | |||
|       | <cyan>one</cyan> | <cyan>two</cyan> | | ||||
|       | <cyan>5</cyan>   | <cyan>9</cyan>   | | ||||
| 
 | ||||
|   <bold-white>Scenario:</bold-white> three <black># formatter-tests/features/with_few_empty_scenarios.feature:16</black> | ||||
|   <bold-white>Scenario:</bold-white> three <bold-black># formatter-tests/features/with_few_empty_scenarios.feature:16</bold-black> | ||||
| 
 | ||||
| 5 scenarios (<yellow>5 undefined</yellow>) | ||||
| No steps | ||||
|  |  | |||
							
								
								
									
										2
									
								
								suite.go
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								suite.go
									
										
									
									
									
								
							|  | @ -609,7 +609,7 @@ func (s *Suite) printStepDefinitions(w io.Writer) { | |||
| 		n := utf8.RuneCountInString(def.Expr.String()) | ||||
| 		location := def.definitionID() | ||||
| 		spaces := strings.Repeat(" ", longest-n) | ||||
| 		fmt.Fprintln(w, yellow(def.Expr.String())+spaces, black("# "+location)) | ||||
| 		fmt.Fprintln(w, yellow(def.Expr.String())+spaces, blackb("# "+location)) | ||||
| 	} | ||||
| 	if len(s.steps) == 0 { | ||||
| 		fmt.Fprintln(w, "there were no contexts registered, could not find any step definition..") | ||||
|  |  | |||
							
								
								
									
										2
									
								
								utils.go
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								utils.go
									
										
									
									
									
								
							|  | @ -11,7 +11,7 @@ var ( | |||
| 	red    = colors.Red | ||||
| 	redb   = colors.Bold(colors.Red) | ||||
| 	green  = colors.Green | ||||
| 	black  = colors.Black | ||||
| 	blackb = colors.Bold(colors.Black) | ||||
| 	yellow = colors.Yellow | ||||
| 	cyan   = colors.Cyan | ||||
| 	cyanb  = colors.Bold(colors.Cyan) | ||||
|  |  | |||
		Загрузка…
	
	Создание таблицы
		
		Сослаться в новой задаче
	
	 Kumar Harsh
						Kumar Harsh