The following Features/Scenarios are included as part of the test suite
As a geek I want to be automated so I can be l33t
Scenario: Example Blueprint
Given I am a blueprint
And I set greeting to hello
And I set audience to world
When I build example as .
Then target folder . should exist
And target file index.html should contain hello blueprint
And target file hello.html should contain hello world
Build as-built developer documentation
Scenario: Build Feature Docs
Given I am Example Features
And I find .feature in folder ../ as files
And I delete docs folder examples
And I build test-plan as ../docs/examples
Then docs file examples/index.html should exist
@example=true
Scenario: Trivial Example
Given I am an example
When debug example works
And log example works
And error example works
Then I succeed
@skip=true
Scenario: Skip Broken Story
Given I am broken
Then I fail
@bug=skip unless debugging
Scenario: Skip Debug Story
Given I am a bug
Then I fail
Scenario: hello_world file is readable
Given I am testing existing files
And I load test from hello_world.json
Then file hello_world.json exists
And variable test should exist
And $.hello in test should match world
Scenario: bye_bye_world file does not exist
Given I am testing missing files
Then file bye_bye_world.json does not exist
Scenario: create bye_bye_world file
Given I am testing creating files
And I load test from hello_world.json
And variable test should exist
And I set test.hello to earth
And $.hello in test should match earth
When I write test to bye_bye_world.json
Then file bye_bye_world.json exists
Scenario: remove bye_bye_world file
Given I am testing deleting files
And file bye_bye_world.json exists
And I load test from bye_bye_world.json
When I delete file bye_bye_world.json
Then file bye_bye_world.json does not exist
Scenario: Inline Javascript
Given I am testing javascript
When I execute return this.targets.google.hostname=="google.com";
Scenario: Multi-line Javascript
Given I am testing more javascript
When I execute
return this.targets.google.protocol=="https";
Scenario: Always successful
Given I am testing 'pass'
Then I pass
Scenario: Wait for 1 second
Given I am testing 'wait'
And I wait 1 second
Then I succeed
@skip=true
Scenario: I break things
Given I am silently ignored
Then I fail
@bug=JIRA_SAMPLE_ID
Scenario: I have a bug
Given I am misbehaving
Then I fail
@todo=STORY_SAMPLE_ID
Scenario: I do nothing
Given I am a work-in-progress
Then I fail
Scenario: Global Var
Given I am configured
Then bonjour should exist
And bonjour equals monde
Scenario: Config Test
Given I am configured
And I set x = ok
Then variable x should be ok
Scenario: Scoped Variable
Given I am scoped
Then I assert this.vars.x=="ok"
Scenario: Clear Variables
Given I am forgetful
And I clear variables
Then I assert this.vars.x!="ok"
Scenario: Test Variable Assignment
Given I am testing dialect
And I set test to hello
Then variable test should match hello
Scenario: Test CSV sample using JSON-Path
Given I am testing CSV parsing
And some CSV as test:
what, who
hello, world
greetings, earthling
Then $.[0].what in test should match hello
And $.[0].who in test should match world
And $.[1].what in test should match greetings
And $.[1].who in test should match earthling
Scenario: Test set body JSON sample - indirect via variable
Given I am testing JSON
And I set test to JSON:
{ "hello": "world", "earth": { "moon": "cheese" } }
Then hello in test should match world
And earth.moon in test should match cheese
Then I assert this.vars.test.hello=="world"
And I assert this.vars.test.earth.moon=="cheese"
Scenario: Google - with redirects
Given I am googling
Given I enable redirects
When I GET http://google.com
Then response code should be 200
Scenario: Google - no redirect
Given I am googling
Given I disable redirects
When I GET https://google.com
Then response code should be 3xx
@skip=true
@target=example
Scenario: Example.com
Given I am googling
Given I am browsing example.com
When I GET http://example.com
Then response body should contain Example Domain
Scenario: 404
Given I enable redirects
When I GET http://localhost/404/not/found
Then response code should be 404
Scenario: Google on Firefox
Given I use firefox browser
When I visit /
When I type wikipedia into q
When I click btnG
When I wait until page is linkedin - Google Search
Then I stop using browser
Then I page body should contain wikipedia
Then I page body should not contain the-wrong-page
Scenario: Create a zip file
Given I am zipping-folders
And I delete target file example.zip
And I zip target ./ to ./example.zip
Then target file ./example.zip exists
Scenario: Inspect a zip file
Given I am a unzip-test
And target file example.zip exists
And I read target zip example.zip
Then variable zip.entries exists
And any $..entryName in zip.entries should match index.html
And any $..name in zip.entries should match index.html