Skip to content

Instantly share code, notes, and snippets.

@nofanto
Last active June 28, 2020 13:10
Show Gist options
  • Save nofanto/3b9b7af5a9b53aa6d2553bafb1d09724 to your computer and use it in GitHub Desktop.
Save nofanto/3b9b7af5a9b53aa6d2553bafb1d09724 to your computer and use it in GitHub Desktop.
Feature('Add person');
Scenario('add a john doe the janitor to the list', (I) => {
//go to the page that we are testing
I.amOnPage('/');
//start the profiler
//I.startProfiling();
//assertion on initial page
I.see('React Tutorial');
I.dontSee('john doe');
I.dontSee('janitor');
//optional: save screenshot for manual verification
I.saveScreenshot('InitialPage.png');
//do the action of entering data
I.fillField('Name', 'john doe');
I.fillField('Job', 'janitor');
//optional: save screenshot for manual verification
I.saveScreenshot('EnteringData.png');
//do the action of submitting data
I.click('Submit');
//assertion that data have been entered successfully in the table section
I.see('john doe', 'table');
I.see('janitor', 'table');
//optional: save screenshot for manual verification
I.saveScreenshot('AfterSubmit.png');
//stop the profiler
//I.stopProfiling();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment