Created
April 29, 2018 09:15
-
-
Save nightspirit/e95401e2b5b996f6cee3fe18a28721dc to your computer and use it in GitHub Desktop.
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 { Selector } from 'testcafe' | |
fixture `Login` | |
.page `http://localhost:3000/login` | |
test('Login with bad credential', async t => { | |
await t | |
.typeText('input[name="username"]', 'blah') | |
.typeText('input[name="password"]', 'blah') | |
.click('button[type="submit"]') | |
.expect(Selector('#alert').innerText).eql('Invalid Username/Password') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment