Frontend: Add acceptance tests
This commit is contained in:
parent
12efe82fbf
commit
2adf5fe32b
1 changed files with 21 additions and 1 deletions
|
@ -1 +1,21 @@
|
|||
// see places on map
|
||||
import { Selector } from 'testcafe';
|
||||
import { ClientFunction } from 'testcafe';
|
||||
import testcafeconfig from "./testcafeconfig.json";
|
||||
|
||||
const getLocation = ClientFunction(() => document.location.href);
|
||||
|
||||
fixture`Test places page`
|
||||
.page`${testcafeconfig.url}`
|
||||
|
||||
test('Test places', async t => {
|
||||
await t
|
||||
.click(Selector('.p-navigation-places'))
|
||||
.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');
|
||||
});
|
Loading…
Reference in a new issue