Add testcafe

This commit is contained in:
dominik-zeglen 2019-08-09 17:16:44 +02:00
parent 062bb48078
commit 1db8ae0d01
2 changed files with 14 additions and 0 deletions

1
.gitignore vendored
View file

@ -15,6 +15,7 @@
!.plop
!.pylintrc
!.travis*
!.testcafe
!.tx
*.css
*.log

13
.testcafe/exampleTest.js Normal file
View file

@ -0,0 +1,13 @@
import { Selector } from "testcafe";
fixture("Example test").page("http://localhost:8000/dashboard/next");
test("User can log in", async t => {
await t
.typeText('[name="email"]', "admin@example.com")
.typeText('[name="password"]', "admin")
.click('[type="submit"]');
const header = await Selector('[data-tc="home-header"]').exists;
await t.expect(header).ok();
});