Files
web2.0-frontend/tests/testcafe/admin.test.ts
T
2019-01-15 12:24:49 +02:00

18 lines
534 B
TypeScript

/**
* 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");
});