-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36b2388
commit 53ca275
Showing
4 changed files
with
77 additions
and
1 deletion.
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
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,5 @@ | ||
### Superheros are not immortal | ||
- [superHeroes/hero.feature: 11](https://github.com/JankariTech/expected-failures-updater/blob/master/tests/fixtures/features/superHeroes/hero.feature#L11) | ||
- [superHeroes/hero.feature: 15](https://github.com/JankariTech/expected-failures-updater/blob/master/tests/fixtures/features/superHeroes/hero.feature#L15) | ||
- [superHeroes/hero.feature: 24](https://github.com/JankariTech/expected-failures-updater/blob/master/tests/fixtures/features/superHeroes/hero.feature#L24) | ||
- [superHeroes/hero.feature: 25](https://github.com/JankariTech/expected-failures-updater/blob/master/tests/fixtures/features/superHeroes/hero.feature#L25) |
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,29 @@ | ||
Feature: hero feature | ||
As a hero | ||
I want to be able fight so hard | ||
So that I can save my city from danger | ||
|
||
Background: | ||
Given laboratory has summoned a local super hero | ||
|
||
Scenario: color of the cloak | ||
When the superhero flies on the sky | ||
Then color of its cloak should be "golden" | ||
|
||
Scenario: saviour of the city | ||
When the superhero is online | ||
Then citizens should be safe | ||
|
||
Scenario Outline: superheros and their cloaks | ||
Given laboratory has summoned "<super-hero>" | ||
When the hero files on the sky | ||
Then the color of its cloak should be "<color>" | ||
Examples: | ||
| super-hero | color | | ||
| Thor | dark | | ||
| Iron Man | purple | | ||
| Hulk | green | | ||
|
||
Scenario: party wizard | ||
When the superhero and party wizard are together | ||
Then the city should be filled with parties |
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,42 @@ | ||
#!/usr/bin/env bash | ||
# echo "# ""${lines[0]}" >&3 | ||
|
||
function setup() { | ||
# save hero feature content for future tests | ||
mkdir tests/tmp | ||
cp tests/fixtures/features/superHeroes/hero.feature tests/tmp/hero.feature | ||
|
||
# cache the existing feature | ||
export FEATURES_PATH=tests/fixtures/features | ||
make cache | ||
} | ||
|
||
|
||
@test "detect removed scenarios" { | ||
# remove a scenario from the cached feature | ||
sed -i '27,29d' tests/fixtures/features/superHeroes/hero.feature | ||
|
||
# scan the cached feature directory | ||
run make scan | ||
[ "$status" -eq 0 ] | ||
[ "${lines[1]}" = "scenario got removed" ] | ||
[ "${lines[2]}" = "Deleted: superHeroes/hero.feature:27" ] | ||
} | ||
|
||
@test "detect new added scenarios" { | ||
# add a new scenario into the cached feature | ||
echo -e "\n Scenario: new scene\n When this\n Then that\n" >> tests/fixtures/features/superHeroes/hero.feature | ||
|
||
# scan the cached feature directory | ||
run make scan | ||
|
||
[ "$status" -eq 0 ] | ||
[ "${lines[1]}" = "found new scenario" ] | ||
[ "${lines[2]}" = "New: superHeroes/hero.feature:31" ] | ||
} | ||
|
||
function teardown() { | ||
# revert the modified feature file | ||
mv tests/tmp/hero.feature tests/fixtures/features/superHeroes/hero.feature | ||
rm -rf tests/tmp | ||
} |