photoprism/frontend/tests/acceptance/navigate.js
Michael Mayer abeb2d16f8 Frontend: Fix acceptance tests
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-01-20 12:36:12 +01:00

23 lines
660 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="/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
.click('a[href="/labels"]')
.expect(Selector('div.p-page-labels').exists, {timeout: 5000}).ok();
});