photoprism/frontend/tests/acceptance/navigate.js

24 lines
660 B
JavaScript
Raw Normal View History

import { Selector } from 'testcafe';
import testcafeconfig from './testcafeconfig';
import Page from "./page-model";
2019-05-21 17:00:46 +02:00
fixture`Use navigation`
.page`${testcafeconfig.url}`;
const page = new Page();
test('Navigate', async t => {
await page.openNav();
2019-06-22 15:13:23 +02:00
await t
.click('a[href="/albums"]')
.expect(Selector('div.p-page-albums').exists, {timeout: 5000}).ok();
await page.openNav();
await t
.click('a[href="/places"]')
.expect(Selector('#map').exists).ok();
await page.openNav();
await t
2019-05-28 03:49:44 +02:00
.click('a[href="/labels"]')
2019-06-22 15:13:23 +02:00
.expect(Selector('div.p-page-labels').exists, {timeout: 5000}).ok();
});