From e9b63158e3df5bbb855e1b2b88df2a840833c5e8 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Thu, 3 Jun 2021 16:03:39 +0100 Subject: [PATCH 1/4] Update rule feature to test using tags --- features/docs/gherkin/rule.feature | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/features/docs/gherkin/rule.feature b/features/docs/gherkin/rule.feature index 3f43fb6d8d..b280b6130d 100644 --- a/features/docs/gherkin/rule.feature +++ b/features/docs/gherkin/rule.feature @@ -9,7 +9,6 @@ Feature: Rule Feature: Rule Sample Rule: This is a rule - Example: First example Given some context When I do an action @@ -20,9 +19,9 @@ Feature: Rule When I do another action Then some other results should be there - Rule: This is a second rule - - Example: First example + @rule2_tag + Rule: This is a second rule with a tag + Example: Third example Given some other context When I do another action Then some results should be there @@ -38,7 +37,6 @@ Feature: Rule """ - Rule: I use Gherkin 6+ Example: I can use the Rule keyword When I run `cucumber -q features/rule.feature` @@ -56,7 +54,7 @@ Feature: Rule When I do another action Then some other results should be there - Example: First example + Example: Third example Given some other context When I do another action Then some results should be there From b34ddbb7f1bb0f4e4e69515b2296d550de104262 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 4 Jun 2021 08:54:06 +0100 Subject: [PATCH 2/4] Add passing tag test --- features/docs/gherkin/rule.feature | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/features/docs/gherkin/rule.feature b/features/docs/gherkin/rule.feature index b280b6130d..bc07201ed8 100644 --- a/features/docs/gherkin/rule.feature +++ b/features/docs/gherkin/rule.feature @@ -19,8 +19,9 @@ Feature: Rule When I do another action Then some other results should be there - @rule2_tag + Rule: This is a second rule with a tag + @rule2_tag Example: Third example Given some other context When I do another action @@ -62,3 +63,20 @@ Feature: Rule 3 scenarios (3 passed) 9 steps (9 passed) """ + + Rule: Filtering + Example: I can filter on tagged rules using the CLI + When I run `cucumber -q -t @rule2_tag` + Then it should pass with exactly: + """ + Feature: Rule Sample + + @rule2_tag + Example: Third example + Given some other context + When I do another action + Then some results should be there + + 1 scenario (1 passed) + 3 steps (3 passed) + """ From 969eeae190a41aa646cfe5e49776033d22ba208f Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 4 Jun 2021 08:55:09 +0100 Subject: [PATCH 3/4] Amend test to be failing, fix up other failing test to be correct (Once fixed) --- features/docs/gherkin/rule.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/docs/gherkin/rule.feature b/features/docs/gherkin/rule.feature index bc07201ed8..f59167f8f6 100644 --- a/features/docs/gherkin/rule.feature +++ b/features/docs/gherkin/rule.feature @@ -19,9 +19,8 @@ Feature: Rule When I do another action Then some other results should be there - + @rule2_tag Rule: This is a second rule with a tag - @rule2_tag Example: Third example Given some other context When I do another action @@ -55,6 +54,7 @@ Feature: Rule When I do another action Then some other results should be there + @rule2_tag Example: Third example Given some other context When I do another action From dc9bf5d5aa8b54dca846494be99dde273cef79cd Mon Sep 17 00:00:00 2001 From: aurelien-reeves Date: Fri, 9 Jul 2021 15:00:51 +0200 Subject: [PATCH 4/4] Fix test --- features/docs/gherkin/rule.feature | 2 -- 1 file changed, 2 deletions(-) diff --git a/features/docs/gherkin/rule.feature b/features/docs/gherkin/rule.feature index f59167f8f6..010233371e 100644 --- a/features/docs/gherkin/rule.feature +++ b/features/docs/gherkin/rule.feature @@ -54,7 +54,6 @@ Feature: Rule When I do another action Then some other results should be there - @rule2_tag Example: Third example Given some other context When I do another action @@ -71,7 +70,6 @@ Feature: Rule """ Feature: Rule Sample - @rule2_tag Example: Third example Given some other context When I do another action