Make stable e2e tests
This commit is contained in:
parent
7274d148c6
commit
2562d3b9de
1 changed files with 10 additions and 6 deletions
|
@ -125,17 +125,21 @@ describe("navigate test", () => {
|
||||||
|
|
||||||
await body.sendKeys(Key.Shift, 'h');
|
await body.sendKeys(Key.Shift, 'h');
|
||||||
|
|
||||||
|
await eventually(async() => {
|
||||||
let tab = (await browser.tabs.query({}))[0];
|
let tab = (await browser.tabs.query({}))[0];
|
||||||
let url = new URL(tab.url);
|
let url = new URL(tab.url);
|
||||||
assert.equal(url.pathname, `/first`)
|
assert.equal(url.pathname, `/first`)
|
||||||
|
});
|
||||||
|
|
||||||
body = await session.findElementByCSS('body');
|
body = await session.findElementByCSS('body');
|
||||||
await body.sendKeys(Key.Shift, 'l');
|
await body.sendKeys(Key.Shift, 'l');
|
||||||
|
|
||||||
|
await eventually(async() => {
|
||||||
tab = (await browser.tabs.query({}))[0];
|
tab = (await browser.tabs.query({}))[0];
|
||||||
url = new URL(tab.url);
|
url = new URL(tab.url);
|
||||||
assert.equal(url.pathname, `/second`)
|
assert.equal(url.pathname, `/second`)
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('should go previous and next page in <a> by [[ and ]]', async () => {
|
it('should go previous and next page in <a> by [[ and ]]', async () => {
|
||||||
await session.navigateTo(`http://127.0.0.1:${port}/pagenation-a/10`);
|
await session.navigateTo(`http://127.0.0.1:${port}/pagenation-a/10`);
|
||||||
|
|
Reference in a new issue