From 198a27182822c08859a25798e51d7771e3aea6e8 Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 17 Oct 2023 09:17:01 +0200 Subject: [PATCH] remove unecessary step --- ...ity-layer.block_theme.side_effects.spec.ts | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/tests/e2e/tests/product-collection/compatibility-layer.block_theme.side_effects.spec.ts b/tests/e2e/tests/product-collection/compatibility-layer.block_theme.side_effects.spec.ts index 3216128013b..e33ff86cbdc 100644 --- a/tests/e2e/tests/product-collection/compatibility-layer.block_theme.side_effects.spec.ts +++ b/tests/e2e/tests/product-collection/compatibility-layer.block_theme.side_effects.spec.ts @@ -107,7 +107,7 @@ test.describe( 'Compatibility Layer with Product Collection block', () => { test.describe( 'Product Archive with Product Collection block', async () => { - test.beforeEach( async ( { pageObject } ) => { + test.beforeAll( async ( { pageObject } ) => { await pageObject.replaceProductsWithProductCollectionInTemplate( 'woocommerce/woocommerce//archive-product' ); @@ -118,14 +118,12 @@ 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 ); } ); } @@ -133,16 +131,14 @@ 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.first() ).toHaveText( - scenario.content - ); - } ); + await expect( hooks ).toHaveCount( scenario.amount ); + await expect( hooks.first() ).toHaveText( + scenario.content + ); } ); } }