This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(settings): support changing the default Gherkin dialect (#48)
- Loading branch information
Showing
10 changed files
with
2,539 additions
and
2,956 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
{ | ||
"extends": "eslint-config-airbnb", | ||
"extends": "eslint-config-airbnb-base", | ||
"rules": { | ||
"import/extensions": 0, | ||
"import/no-extraneous-dependencies": 0, | ||
"import/no-unresolved": [2, { "ignore": ["electron"] }], | ||
"linebreak-style": 0 | ||
"linebreak-style": 0, | ||
"no-param-reassign": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
Feature: App Settings | ||
<In order to> configure my experience with the app | ||
<As a> user of cucumber-forge-desktop | ||
<I want> to be able to adjust persistant settings for the app | ||
|
||
Scenario: Toggling the settings view | ||
Given there is a file named 'pets/dog_care.feature' with the following contents: | ||
""" | ||
Feature: Dog Care | ||
Scenario: Feeding the Dog | ||
Given the dog is hungery | ||
When I give dog food to the dog | ||
Then the dog will eat it | ||
""" | ||
When the user clicks the settings button | ||
Then the settings view will be displayed | ||
When the user clicks the settings button | ||
Then the settings view will be hidden | ||
When the user clicks the settings button | ||
Then the settings view will be displayed | ||
When the user selects the 'pets' directory with the folder selection button | ||
Then the report will be displayed | ||
And the settings view will be hidden | ||
When the user clicks the settings button | ||
Then the settings view will be displayed | ||
And the report will be hidden | ||
When the user clicks the settings button | ||
And the settings view will be hidden | ||
Then the report will be displayed | ||
|
||
Scenario: Selecting an alternative Gherkin dialect | ||
Reports can be generated for features written with alternative Gherkin dialects by selecting | ||
the proper Default Gherkin Dialect in the Cucumber Forge settings. | ||
|
||
Given there is a file named 'pets/afrikaans.feature' with the following contents: | ||
""" | ||
Besigheid Behoefte: Hondsorg | ||
Agtergrond: | ||
Gegewe Ek het 'n hond | ||
Situasie: Die hond voed | ||
Gegewe die hond is honger | ||
Wanneer I give dog food to the dog | ||
Dan Ek gee hondekos vir die hond | ||
Situasie Uiteensetting: Die hondjie klapper | ||
Wanneer Ek troeteldier van die hond se hare <direction:> | ||
Dan die hond sal <result> | ||
Maar die hond sal my nie byt nie | ||
En die hond sal kalmeer | ||
Voorbeelde: | ||
| direction: | result | | ||
| agteruit | lek my hand | | ||
| voorspelers | grom | | ||
""" | ||
When the user clicks the settings button | ||
And the user selects 'af' from the Default Gherkin Dialect drop-down menu | ||
And the user selects the 'pets' directory with the folder selection button | ||
Then the report will be displayed | ||
And the report will contain 1 features | ||
And the report will contain 2 scenarios | ||
|
||
Scenario: Generating an HTML report for a feature file with an alternative Gherkin dialect when the language header is present in the feature | ||
If there is a language header is present in the feature, that language will be prefered for that file when generating | ||
report (regarless of the configured Default Gherkin Dialect in the Cucumber Forge setting). This allows for | ||
generating reports for a set of feature files written with different Gherkin dialects. | ||
|
||
Given there is a file named 'pets/dog_care.feature' with the following contents: | ||
""" | ||
Feature: Dog Care | ||
Scenario: Feeding the Dog | ||
Given the dog is hungery | ||
When I give dog food to the dog | ||
Then the dog will eat it | ||
""" | ||
And there is a file named 'pets/panjabi.feature' with the following contents: | ||
""" | ||
# language: pa | ||
ਨਕਸ਼ ਨੁਹਾਰ: ਕੁੱਤੇ ਦੀ ਦੇਖਭਾਲ | ||
ਪਿਛੋਕੜ: | ||
ਜਿਵੇਂ ਕਿ ਮੇਰੇ ਕੋਲ ਇੱਕ ਕੁੱਤਾ ਹੈ | ||
ਪਟਕਥਾ: ਕੁੱਤੇ ਨੂੰ ਖੁਆਉਣਾ | ||
ਜੇਕਰ ਕੁੱਤਾ ਭੁੱਖਾ ਹੈ | ||
ਜਦੋਂ ਮੈਂ ਕੁੱਤੇ ਨੂੰ ਖਾਣਾ ਦਿੰਦਾ ਹਾਂ | ||
ਤਦ ਕੁੱਤਾ ਇਹ ਖਾਵੇਗਾ | ||
ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ: ਕੁੱਤਾ ਪਾਲ ਰਹੇ | ||
ਜਦੋਂ ਮੈਂ ਕੁੱਤੇ ਦੇ ਵਾਲ ਪਾਲਤੂ ਹਾਂ <direction:> | ||
ਤਦ ਕੁੱਤਾ ਕਰੇਗਾ <result> | ||
ਪਰ ਕੁੱਤਾ ਮੈਨੂੰ ਨਹੀਂ ਡੰਗੇਗਾ | ||
ਅਤੇ ਕੁੱਤਾ ਸ਼ਾਂਤ ਹੋ ਜਾਵੇਗਾ | ||
ਉਦਾਹਰਨਾਂ: | ||
| direction: | result | | ||
| ਪਿੱਛੇ ਵੱਲ | ਮੇਰਾ ਹੱਥ ਚੱਟੋ | | ||
| ਅੱਗੇ | ਫੁੱਟ | | ||
""" | ||
When the user clicks the settings button | ||
And the user selects 'en' from the Default Gherkin Dialect drop-down menu | ||
And the user selects the 'pets' directory with the folder selection button | ||
Then the report will be displayed | ||
And the report will contain 2 features | ||
And the report will contain 3 scenarios |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
Feature: Save Report | ||
<In order to> record or communicate feature documentation | ||
<As a> user of cucumber-forge-desktop | ||
<I want> to save HTML reports generated from the feature files | ||
|
||
Background: | ||
Given there is a file named 'pets/dog_care.feature' with the following contents: | ||
""" | ||
Feature: Dog Care | ||
<In order to> care for and enjoy my pet | ||
<As a> dog owner | ||
<I want> interact with my dog | ||
Background: | ||
Given I have a dog | ||
@feeding | ||
Scenario: Feeding the Dog | ||
Given the dog is hungery | ||
When I give dog food to the dog | ||
Then the dog will eat it | ||
@petting | ||
Scenario Outline: Petting the Dog | ||
Dog's do not like to be pet in the wrong direction. | ||
When I pet the dog's hair <direction:> | ||
Then the dog will <result> | ||
Examples: | ||
| direction: | result | | ||
| backwards | lick my hand | | ||
| forwards | growl | | ||
""" | ||
And there is a file named 'pets/felines/cat_care.feature' with the following contents: | ||
""" | ||
Feature: Cat Care | ||
<In order to> care for and enjoy my pet | ||
<As a> cat owner | ||
<I want> interact with my cat | ||
Background: | ||
Given I have a cat | ||
@feeding | ||
Scenario: Feeding the Cat | ||
Given the cat is hungery | ||
When I give the following food to the cat: | ||
| fish | | ||
| steak | | ||
Then the cat will eat it | ||
@petting | ||
Scenario Outline: Petting the Cat | ||
Cat's do not like to be pet in the wrong direction. | ||
When I pet the cat's hair <direction:> | ||
Then the cat will hiss | ||
Examples: | ||
| direction: | | ||
| backwards | | ||
| forwards | | ||
""" | ||
|
||
Scenario: Saving an HTML report | ||
Given the user selects the 'pets/felines' directory with the folder selection button | ||
And the report is displayed | ||
And the project title on the sidebar is 'felines' | ||
When the user clicks the save button | ||
Then the report will be saved in a file called 'felines.html' | ||
|
||
Scenario: Saving an HTML report that is filtered by a tag | ||
Given the user enters the value 'feeding' into the filter text box | ||
And the user selects the 'pets' directory with the folder selection button | ||
And the report is displayed | ||
And the report name on the sidebar is 'feeding' | ||
And the project title on the sidebar is 'pets' | ||
When the user clicks the save button | ||
Then the report will be saved in a file called 'feeding_pets.html' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.