Add admin page e2e test

This commit is contained in:
Jan Tuomi
2019-01-15 12:23:39 +02:00
parent ef28a3f4b9
commit a2680f8626
+17
View File
@@ -0,0 +1,17 @@
/**
* TestCafé test fixtures.
* This file is used by TestCafé to run end-to-end tests with chrome against the site.
* Tests are grouped into fixtures and fixtures into files.
*/
import { Selector } from "testcafe";
fixture`Admin page renders and functions correctly`.page("http://localhost:3000/admin");
test("Header contains text \"Admin panel\"", async t => {
/**
* Test if the header contains the text.
*/
const header = Selector("h1");
await t.expect(header.textContent)
.contains("Admin panel");
});