26 lines
774 B
TypeScript
26 lines
774 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`Front page renders and functions correctly`.page("http://localhost:3000");
|
|
|
|
test("Favicon exists", async t => {
|
|
/**
|
|
* Test if there is a favicon element on the page
|
|
*/
|
|
const elem = Selector("link[rel=\"icon\"]");
|
|
await t.expect(elem.exists).ok();
|
|
});
|
|
|
|
test("Header contains text \"Aalto-yliopiston Sähköinsinöörikilta\"", async t => {
|
|
/**
|
|
* Test if the header contains the text.
|
|
*/
|
|
const header = Selector("h1");
|
|
await t.expect(header.textContent)
|
|
.contains("Aalto-yliopiston Sähköinsinöörikilta");
|
|
});
|