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