Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
remove unecessary step
Browse files Browse the repository at this point in the history
  • Loading branch information
gigitux committed Oct 17, 2023
1 parent 2c978be commit a7f81e6
Showing 1 changed file with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,31 +118,27 @@ test.describe( 'Compatibility Layer with Product Collection block', () => {
test( `${ scenario.title } is attached to the page`, async ( {
pageObject,
} ) => {
await test.step( scenario.title, async () => {
const hooks = pageObject.locateByTestId(
scenario.dataTestId
);
const hooks = pageObject.locateByTestId(
scenario.dataTestId
);

await expect( hooks ).toHaveCount( scenario.amount );
await expect( hooks ).toHaveText( scenario.content );
} );
await expect( hooks ).toHaveCount( scenario.amount );
await expect( hooks ).toHaveText( scenario.content );
} );
}

for ( const scenario of multipleOccurranceScenarios ) {
test( `${ scenario.title } is attached to the page`, async ( {
pageObject,
} ) => {
await test.step( scenario.title, async () => {
const hooks = pageObject.locateByTestId(
scenario.dataTestId
);
const hooks = pageObject.locateByTestId(
scenario.dataTestId
);

await expect( hooks ).toHaveCount( scenario.amount );
await expect( hooks.first() ).toHaveText(
scenario.content
);
} );
await expect( hooks ).toHaveCount( scenario.amount );
await expect( hooks.first() ).toHaveText(
scenario.content
);
} );
}
}
Expand Down

0 comments on commit a7f81e6

Please sign in to comment.