diff --git a/plugins/woocommerce/changelog/51016-e2e-external-sites-update-merchant-tests-pt2 b/plugins/woocommerce/changelog/51016-e2e-external-sites-update-merchant-tests-pt2 new file mode 100644 index 00000000000..23131053e0c --- /dev/null +++ b/plugins/woocommerce/changelog/51016-e2e-external-sites-update-merchant-tests-pt2 @@ -0,0 +1,4 @@ +Significance: patch +Type: update + +Update /merchant tests (second five files), so they are passing against Pressable env. \ No newline at end of file diff --git a/plugins/woocommerce/tests/e2e-pw/envs/default-pressable/playwright.config.js b/plugins/woocommerce/tests/e2e-pw/envs/default-pressable/playwright.config.js index 48f83f3e12b..058ae9aef7f 100644 --- a/plugins/woocommerce/tests/e2e-pw/envs/default-pressable/playwright.config.js +++ b/plugins/woocommerce/tests/e2e-pw/envs/default-pressable/playwright.config.js @@ -16,6 +16,11 @@ config = { '**/admin-marketing/**/*.spec.js', '**/admin-tasks/**/*.spec.js', '**/customize-store/**/*.spec.js', + '**/merchant/create-page.spec.js', + '**/merchant/create-post.spec.js', + '**/merchant/create-restricted-coupons.spec.js', + '**/merchant/create-shipping-classes.spec.js', + '**/merchant/create-shipping-zones.spec.js', '**/merchant/command-palette.spec.js', '**/merchant/create-cart-block.spec.js', '**/merchant/create-checkout-block.spec.js', diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-restricted-coupons.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-restricted-coupons.spec.js index dd6941c6cc9..73ee10db158 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-restricted-coupons.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-restricted-coupons.spec.js @@ -74,15 +74,24 @@ const test = baseTest.extend( { coupon: async ( { api }, use ) => { const coupon = {}; await use( coupon ); - await api.delete( `coupons/${ coupon.id }`, { force: true } ); + await api + .delete( `coupons/${ coupon.id }`, { force: true } ) + .then( ( response ) => { + console.log( 'Delete successful:', response.data ); + } ) + .catch( ( error ) => { + console.log( 'Error response data:', error.response.data ); + throw new Error( error.response.data ); + } ); }, product: async ( { api }, use ) => { let product = {}; + const productName = `Product ${ Date.now() }`; await api .post( 'products', { - name: 'Product', + name: productName, regular_price: '100', } ) .then( ( response ) => {