27 lines
829 B
JavaScript
27 lines
829 B
JavaScript
import { Selector } from 'testcafe';
|
|
import testcafeconfig from './testcafeconfig';
|
|
import Page from "./page-model";
|
|
|
|
fixture`Use navigation`
|
|
.page`${testcafeconfig.url}`;
|
|
|
|
const page = new Page();
|
|
|
|
test('Navigate', async t => {
|
|
await page.openNav();
|
|
await t
|
|
.click('a[href="/places"]')
|
|
.expect(Selector('div.leaflet-map-pane').exists).ok();
|
|
await page.openNav();
|
|
await t
|
|
.click('a[href="/tags"]')
|
|
.expect(Selector('h1').innerText, {timeout: 9000}).contains('Tags');
|
|
await page.openNav();
|
|
await t
|
|
.click('a[href="/albums"]')
|
|
.expect(Selector('h1').innerText, {timeout: 9000}).contains('Albums');
|
|
await page.openNav();
|
|
await t
|
|
.click('a[href="/import"]')
|
|
.expect(Selector('h1').innerText, {timeout: 9000}).contains('Import');
|
|
});
|