Add admin page e2e test
This commit is contained in:
@@ -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");
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user