Initial commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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`Page renders correctly`.page('http://localhost:3000');
|
||||
|
||||
test('Paragraph exists and is visible', async t => {
|
||||
/**
|
||||
* Test if there is a paragraph on the page.
|
||||
*/
|
||||
const p = Selector('p');
|
||||
await t.expect(await p.exists && await p.visible);
|
||||
});
|
||||
|
||||
test('Header contains text "Aalto-yliopiston sähköinsinöörikilta!"', async t => {
|
||||
/**
|
||||
* Test if the header contains the text.
|
||||
*/
|
||||
const header = Selector('h1');
|
||||
const text = await header.textContent;
|
||||
await t.expect(text.includes('Aalto-yliopiston sähköinsinöörikilta!'));
|
||||
});
|
||||
Reference in New Issue
Block a user