Skip to content

Instantly share code, notes, and snippets.

@tamlyn
Created March 8, 2018 11:11
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 tamlyn/a904f730edbb66745e850ce9d24331a5 to your computer and use it in GitHub Desktop.
Save tamlyn/a904f730edbb66745e850ce9d24331a5 to your computer and use it in GitHub Desktop.
Example TestCafe test suite
// a very short TestCafe test suite
fixture('Admin user')
test('Create posts journey', t => {
const postTitle = 'Hello testing'
return t
.typeText(ReactSelector('PostCreator FormControl'), postTitle)
.click(ReactSelector('PostCreator Button'))
.expect(ReactSelector('Post').first().find('label').innerText)
.eql(postTitle)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment