Skip to content

Commit

Permalink
added await constructions for all locators to archive tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Fellan-91 committed Aug 21, 2024
1 parent d8df650 commit dcd5ee6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/e2e/specs/archive.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ test.describe('archive pages', () => {
*/
async function getArchiveItems(page) {
const archiveItems = [];
const items = page.locator(
const items = await page.locator(
'.vp-portfolio__items article.vp-portfolio__item-wrap'
);

Expand All @@ -87,7 +87,7 @@ test.describe('archive pages', () => {
const url = await item
.locator('.vp-portfolio__item-img > a')
.getAttribute('href');
const categoriesWrapper = item.locator(
const categoriesWrapper = await item.locator(
'.vp-portfolio__item-meta .vp-portfolio__item-meta-categories > .vp-portfolio__item-meta-category'
);

Expand Down Expand Up @@ -180,7 +180,7 @@ test.describe('archive pages', () => {

await page.getByRole('tab', { name: 'Media Library' }).click();

const imageContainer = page.locator(
const imageContainer = await page.locator(
'ul.attachments.ui-sortable.ui-sortable-disabled li.attachment[data-id="' +
foundImage.id +
'"]'
Expand Down Expand Up @@ -500,7 +500,7 @@ test.describe('archive pages', () => {
* @return {{title: any, url: any, items: never[]}[]}
*/
async function getReceivedCategories(page) {
const filterItems = page
const filterItems = await page
.locator('.vp-filter .vp-filter__item')
.filter({ hasNotText: 'All' });
const receivedCategories = [];
Expand Down

0 comments on commit dcd5ee6

Please sign in to comment.