From d8df6506c6b8c3d4008f17ea8a94ed6561444250 Mon Sep 17 00:00:00 2001 From: Fellan-91 Date: Wed, 21 Aug 2024 14:23:20 +0300 Subject: [PATCH] added additional awaiting constructs for archive tests to work correctly on slow machines --- tests/e2e/specs/archive.spec.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/e2e/specs/archive.spec.js b/tests/e2e/specs/archive.spec.js index 0dc9a852..d3681388 100644 --- a/tests/e2e/specs/archive.spec.js +++ b/tests/e2e/specs/archive.spec.js @@ -401,15 +401,19 @@ test.describe('archive pages', () => { while (currentCount < pageCounts) { const archivePagination = []; - await page.waitForTimeout(700); + await page.waitForTimeout(1000); const archiveItems = await getArchiveItems(page); - const pagination = page.locator( + await page.waitForTimeout(1000); + + const pagination = await page.locator( '.vp-portfolio__layout-elements .vp-pagination' ); - const paginationItems = pagination.locator('.vp-pagination__item'); + const paginationItems = await pagination.locator( + '.vp-pagination__item' + ); for (const paginationItem of await paginationItems.all()) { const classes = await paginationItem.getAttribute('class');