e2e path for route index now works focused and full run
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2020-12-28 14:13:22 +01:00
parent 846117d3bd
commit 67072f5c23
1 changed files with 8 additions and 5 deletions

View File

@ -63,11 +63,14 @@ describe('Route create path', () => {
await page.waitForState('route.index');
});
let count;
it(`should count the amount of routes before clonation`, async() => {
await page.waitForNumberOfElements(selectors.routeIndex.anyResult, 8);
const result = await page.countElement(selectors.routeIndex.anyResult);
await page.waitForFunction(selector => {
return document.querySelectorAll(selector).length > 6;
}, {}, selectors.routeIndex.anyResult);
count = await page.countElement(selectors.routeIndex.anyResult);
expect(result).toEqual(8);
expect(count).toBeGreaterThanOrEqual(7);
});
it(`should clone the first route`, async() => {
@ -80,10 +83,10 @@ describe('Route create path', () => {
});
it(`should reload the section and count the amount of routes after clonation`, async() => {
await page.waitForNumberOfElements(selectors.routeIndex.anyResult, 9);
await page.waitForNumberOfElements(selectors.routeIndex.anyResult, count + 1);
const result = await page.countElement(selectors.routeIndex.anyResult);
expect(result).toEqual(9);
expect(result).toEqual(count + 1);
});
});
});