Created
July 24, 2017 08:22
-
-
Save VasilyStrelyaev/0bc4ef527ad7fb5a127afca6490416b0 to your computer and use it in GitHub Desktop.
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
import { Role } from 'testcafe'; | |
const loginPageUrl = 'http://example.com/login'; | |
const regularUser = Role(loginPageUrl, async t => { | |
await t | |
.typeText('#login', 'TestUser') | |
.typeText('#password', 'testpass') | |
.click('#sign-in'); | |
}); | |
const admin = Role(loginPageUrl, async t => { | |
await t | |
.typeText('#login', 'Admin') | |
.typeText('#password', 'adminpass') | |
.click('#sign-in'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment