diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/create-simple-product-block-editor.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/create-simple-product-block-editor.spec.js index c9cf119bbf8ab..11d28b72a3146 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/create-simple-product-block-editor.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/create-simple-product-block-editor.spec.js @@ -11,8 +11,6 @@ const isTrackingSupposedToBeEnabled = !! process.env.ENABLE_TRACKING; const productData = { name: `Simple product Name ${ new Date().getTime().toString() }`, summary: 'This is a product summary', - productPrice: '100', - salePrice: '90', }; test.describe.configure( { mode: 'serial' } ); @@ -50,18 +48,6 @@ test.describe( 'General tab', () => { ) .last() .fill( productData.summary ); - await page - .locator( - '[id^="wp-block-woocommerce-product-regular-price-field"]' - ) - .first() - .fill( productData.productPrice ); - await page - .locator( - '[id^="wp-block-woocommerce-product-sale-price-field"]' - ) - .first() - .fill( productData.salePrice ); await page .locator( '.woocommerce-product-header__actions' ) @@ -86,6 +72,7 @@ test.describe( 'General tab', () => { await expect( productId ).toBeDefined(); await expect( title ).toHaveText( productData.name ); } ); + test( 'can not create a product with duplicated SKU', async ( { page, } ) => { @@ -99,12 +86,6 @@ test.describe( 'General tab', () => { '[data-template-block-id="basic-details"] .components-summary-control' ) .fill( productData.summary ); - await page - .locator( - '[id^="wp-block-woocommerce-product-regular-price-field"]' - ) - .first() - .fill( productData.productPrice ); await page .locator( '.woocommerce-product-header__actions' ) .getByRole( 'button', { @@ -117,6 +98,7 @@ test.describe( 'General tab', () => { await expect( textContent ).toMatch( /Invalid or duplicated SKU./ ); } ); + test( 'can a shopper add the simple product to the cart', async ( { page, } ) => { diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/product-edit-block-editor.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/product-edit-block-editor.spec.js index 683247462ef43..3fbdccc87dca2 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/product-edit-block-editor.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/product-edit-block-editor.spec.js @@ -37,8 +37,6 @@ test( 'can update the general information of a product', async ( { name: `Product ${ Date.now() }`, description: `Updated description for the awesome product ${ Date.now() }`, short_description: `Updated summary for the awesome product ${ Date.now() }`, - regularPrice: '100.05', - salePrice: '99.05', }; const nameTextbox = page.getByLabel( 'Name' ).getByRole( 'textbox' ); @@ -48,22 +46,11 @@ test( 'can update the general information of a product', async ( { const descriptionTextbox = page .getByLabel( 'Block: Product description' ) .getByRole( 'textbox' ); - const listPriceTextbox = page.getByRole( 'textbox', { - name: 'List price', - } ); - const salePriceTextbox = page.getByRole( 'textbox', { - name: 'Sale price', - } ); await test.step( 'edit the product name', async () => { await nameTextbox.fill( updatedProduct.name ); } ); - await test.step( 'edit the product price', async () => { - await listPriceTextbox.fill( updatedProduct.regularPrice ); - await salePriceTextbox.fill( updatedProduct.salePrice ); - } ); - await test.step( 'edit the product description and summary', async () => { // Need to clear the textbox before filling it, otherwise the text will be appended. await descriptionTextbox.clear(); @@ -91,12 +78,5 @@ test( 'can update the general information of a product', async ( { await expect .soft( descriptionTextbox ) .toHaveText( updatedProduct.description ); - - await expect - .soft( listPriceTextbox ) - .toHaveValue( updatedProduct.regularPrice ); - await expect - .soft( salePriceTextbox ) - .toHaveValue( updatedProduct.salePrice ); } ); } );