Created
February 26, 2015 16:50
-
-
Save ryanhanks-wf/5845bc93e27064489e34 to your computer and use it in GitHub Desktop.
gwt syntax
This file contains hidden or 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
| library w_webdriver_utils.gwt_syntax; | |
| import 'functional_test_helper.dart'; | |
| List<Function> _scenarioSteps; | |
| String _scenarioDescription; | |
| step(String description, void body()) { | |
| _scenarioDescription += "\n$description"; | |
| _scenarioSteps.add(body); | |
| } | |
| given(String description, void body()) { | |
| step("Given $description", body); | |
| } | |
| when(String description, void body()) { | |
| step("Given $description", body); | |
| } | |
| then(String description, void body()) { | |
| step("Given $description", body); | |
| } | |
| and(String description, void body()) { | |
| step("Given $description", body); | |
| } | |
| scenario(String description, void body(WebDriver)){ | |
| _scenarioDescription = ''; | |
| _scenarioSteps = []; | |
| body(_driver); | |
| unittest.test(_scenarioDescription, () async { | |
| _scenarioSteps.forEach((void scenarioStep()) async { | |
| await scenarioStep(); | |
| }); | |
| }); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment