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

20 lines
615 B
JavaScript

import { Selector } from 'testcafe';
import { ClientFunction } from 'testcafe';
const getLocation = ClientFunction(() => document.location.href);
fixture`Test places page`
.page `localhost:2342/places`;
test('Test places', async t => {
await t
.expect(Selector('#map').exists, {timeout: 15000}).ok()
.expect(Selector('div.p-map-control').visible).ok();
await t
.typeText(Selector('input[aria-label="Search"]'), 'Berlin')
.pressKey('enter');
await t
.expect(Selector('div.p-map-control').visible).ok()
.expect(getLocation()).contains('Berlin');
});