Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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