Last active
September 18, 2017 18:02
-
-
Save dcypherthis/c9f9cb9f6842275cbff24dafa482c4d1 to your computer and use it in GitHub Desktop.
cucumber 3.x friendly steps for wdio-cucumber-framework 1.x.x
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
6 |
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
@case-1234 | |
Feature: Testing core WDIO Fuctions | |
# Enter feature description here | |
Scenario: Handling 500 errors | |
Given I am going to "https://the-internet.herokuapp.com/status_codes/500" | |
Then I should not see an error | |
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
"dependencies": { | |
"cucumber": "^3.0.0", | |
"wdio-cucumber-framework": "^1.0.2", | |
"webdriverio": "^4.8.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
import { defineSupportCode } from 'cucumber'; | |
defineSupportCode(({ Given }) => { | |
Given(/^I am going to "([^"]*)"$/, url => { | |
browser.url(url); | |
}); | |
}); | |
defineSupportCode(({ Then }) => { | |
Then(/^I should not see an error$/, () => { | |
throw new Error("it broke"); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment