From f9e01d8ba72d13c28f4290b5e4ff922414c32d0b Mon Sep 17 00:00:00 2001 From: Paulo Arromba <17236129+wavvves@users.noreply.github.com> Date: Mon, 6 Nov 2023 19:35:21 +0000 Subject: [PATCH 1/5] fix verifyAddressDetails() selector --- tests/e2e/tests/checkout/checkout.page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/tests/checkout/checkout.page.ts b/tests/e2e/tests/checkout/checkout.page.ts index f0515402aa3..84f92ce6138 100644 --- a/tests/e2e/tests/checkout/checkout.page.ts +++ b/tests/e2e/tests/checkout/checkout.page.ts @@ -91,7 +91,7 @@ export class CheckoutPage { ...this.testData, ...overrideAddressDetails, }; - const selector = `.woocommerce-column--${ shippingOrBilling }-address`; + const selector = `.wc-block-order-confirmation-${ shippingOrBilling }-address`; const addressContainer = this.page.locator( selector ); await expect( addressContainer.getByText( customerAddressDetails.firstname ) From 24bba534b3c0fa35997c427695c3c62dfce2d5d5 Mon Sep 17 00:00:00 2001 From: Paulo Arromba <17236129+wavvves@users.noreply.github.com> Date: Mon, 6 Nov 2023 20:28:28 +0000 Subject: [PATCH 2/5] Revert "fix verifyAddressDetails() selector" This reverts commit f9e01d8ba72d13c28f4290b5e4ff922414c32d0b. --- tests/e2e/tests/checkout/checkout.page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/tests/checkout/checkout.page.ts b/tests/e2e/tests/checkout/checkout.page.ts index 84f92ce6138..f0515402aa3 100644 --- a/tests/e2e/tests/checkout/checkout.page.ts +++ b/tests/e2e/tests/checkout/checkout.page.ts @@ -91,7 +91,7 @@ export class CheckoutPage { ...this.testData, ...overrideAddressDetails, }; - const selector = `.wc-block-order-confirmation-${ shippingOrBilling }-address`; + const selector = `.woocommerce-column--${ shippingOrBilling }-address`; const addressContainer = this.page.locator( selector ); await expect( addressContainer.getByText( customerAddressDetails.firstname ) From e88fd2dfae0354c1577e4cadd3809d00678ec1e0 Mon Sep 17 00:00:00 2001 From: Paulo Arromba <17236129+wavvves@users.noreply.github.com> Date: Mon, 6 Nov 2023 20:29:43 +0000 Subject: [PATCH 3/5] Revert "Revert "fix verifyAddressDetails() selector"" This reverts commit 24bba534b3c0fa35997c427695c3c62dfce2d5d5. --- tests/e2e/tests/checkout/checkout.page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/tests/checkout/checkout.page.ts b/tests/e2e/tests/checkout/checkout.page.ts index f0515402aa3..84f92ce6138 100644 --- a/tests/e2e/tests/checkout/checkout.page.ts +++ b/tests/e2e/tests/checkout/checkout.page.ts @@ -91,7 +91,7 @@ export class CheckoutPage { ...this.testData, ...overrideAddressDetails, }; - const selector = `.woocommerce-column--${ shippingOrBilling }-address`; + const selector = `.wc-block-order-confirmation-${ shippingOrBilling }-address`; const addressContainer = this.page.locator( selector ); await expect( addressContainer.getByText( customerAddressDetails.firstname ) From 8190480129d008f2a4142889a2cb7c5e1ead1c2a Mon Sep 17 00:00:00 2001 From: Paulo Arromba <17236129+wavvves@users.noreply.github.com> Date: Mon, 6 Nov 2023 20:44:31 +0000 Subject: [PATCH 4/5] re-added "via xxx" span text on Order Confirmation --- src/BlockTypes/OrderConfirmation/Totals.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/BlockTypes/OrderConfirmation/Totals.php b/src/BlockTypes/OrderConfirmation/Totals.php index e539b5f445c..174fa585b31 100644 --- a/src/BlockTypes/OrderConfirmation/Totals.php +++ b/src/BlockTypes/OrderConfirmation/Totals.php @@ -187,7 +187,6 @@ protected function render_order_details_table_item_purchase_note( $order, $produ * @return string */ protected function render_order_details_table_totals( $order ) { - add_filter( 'woocommerce_order_shipping_to_display_shipped_via', '__return_empty_string' ); $return = ''; $total_rows = array_diff_key( From a585e8dc2bc792d4de5aa422279c7fe0d2002079 Mon Sep 17 00:00:00 2001 From: Paulo Arromba <17236129+wavvves@users.noreply.github.com> Date: Tue, 7 Nov 2023 11:00:45 +0000 Subject: [PATCH 5/5] Removed span text and test --- src/BlockTypes/OrderConfirmation/Totals.php | 1 + .../checkout-block-shipping.block_theme.side_effects.spec.ts | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BlockTypes/OrderConfirmation/Totals.php b/src/BlockTypes/OrderConfirmation/Totals.php index 174fa585b31..e539b5f445c 100644 --- a/src/BlockTypes/OrderConfirmation/Totals.php +++ b/src/BlockTypes/OrderConfirmation/Totals.php @@ -187,6 +187,7 @@ protected function render_order_details_table_item_purchase_note( $order, $produ * @return string */ protected function render_order_details_table_totals( $order ) { + add_filter( 'woocommerce_order_shipping_to_display_shipped_via', '__return_empty_string' ); $return = ''; $total_rows = array_diff_key( diff --git a/tests/e2e/tests/checkout/checkout-block-shipping.block_theme.side_effects.spec.ts b/tests/e2e/tests/checkout/checkout-block-shipping.block_theme.side_effects.spec.ts index b855a0ccc91..38570ab27e2 100644 --- a/tests/e2e/tests/checkout/checkout-block-shipping.block_theme.side_effects.spec.ts +++ b/tests/e2e/tests/checkout/checkout-block-shipping.block_theme.side_effects.spec.ts @@ -94,6 +94,5 @@ test.describe( 'Shopper → Checkout block → Shipping', () => { overrideBillingDetails ); await pageObject.verifyAddressDetails( 'shipping' ); - await expect( page.getByText( FLAT_RATE_SHIPPING_NAME ) ).toBeVisible(); } ); } );