Skip to content

Instantly share code, notes, and snippets.

@paulbjensen
Created June 18, 2018 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulbjensen/30bb4f19330af1a1af337a25874bec4c to your computer and use it in GitHub Desktop.
Save paulbjensen/30bb4f19330af1a1af337a25874bec4c to your computer and use it in GitHub Desktop.
The login step definition, part of an article on Medium
Given('I login', { timeout: 10000 }, async () => {
await visitHomepage();
await clickOnItem('Login');
await takenToPage('login');
await fillInFormField('identifier', email);
await fillInFormField('password', password);
await pressButton('Login');
return await shouldBeOnPage('dashboard');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment