From 1e570b156b571a53995f8362d1162b196fd07484 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Fri, 16 Aug 2024 09:56:36 -0600 Subject: [PATCH 1/8] Version bump to 1.2.8 --- package-lock.json | 4 ++-- package.json | 2 +- readme.txt | 2 +- woocommerce-accommodation-bookings.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9d21b1a..5d60500 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "woocommerce-accommodation-bookings", - "version": "1.2.7", + "version": "1.2.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "woocommerce-accommodation-bookings", - "version": "1.2.7", + "version": "1.2.8", "license": "GPL-3.0+", "devDependencies": { "@playwright/test": "^1.44.0", diff --git a/package.json b/package.json index 7fa5c5d..80c9ab5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "woocommerce-accommodation-bookings", "title": "WooCommerce Accommodation Bookings", - "version": "1.2.7", + "version": "1.2.8", "config": { "wp_org_slug": "woocommerce-accommodation-bookings" }, diff --git a/readme.txt b/readme.txt index 91e1c84..55137ca 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: woocommerce, automattic Tags: woocommerce, bookings, accommodations Requires at least: 6.4 Tested up to: 6.6 -Stable tag: 1.2.7 +Stable tag: 1.2.8 License: GNU General Public License v3.0 License URI: http://www.gnu.org/licenses/gpl-3.0.html diff --git a/woocommerce-accommodation-bookings.php b/woocommerce-accommodation-bookings.php index 8be69ac..7d86c5e 100644 --- a/woocommerce-accommodation-bookings.php +++ b/woocommerce-accommodation-bookings.php @@ -4,7 +4,7 @@ * Requires Plugins: woocommerce * Plugin URI: https://woocommerce.com/products/woocommerce-accommodation-bookings/ * Description: An accommodations add-on for the WooCommerce Bookings extension. - * Version: 1.2.7 + * Version: 1.2.8 * Author: WooCommerce * Author URI: https://woocommerce.com * Text Domain: woocommerce-accommodation-bookings @@ -27,7 +27,7 @@ exit; } -define( 'WC_ACCOMMODATION_BOOKINGS_VERSION', '1.2.7' ); // WRCS: DEFINED_VERSION. +define( 'WC_ACCOMMODATION_BOOKINGS_VERSION', '1.2.8' ); // WRCS: DEFINED_VERSION. require_once 'includes/class-wc-accommodation-bookings-plugin.php'; $wc_accom_plugin = new WC_Accommodation_Bookings_Plugin( __FILE__, WC_ACCOMMODATION_BOOKINGS_VERSION ); From 741f099dad4d185b1f9199b79297c593500b91ce Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Fri, 16 Aug 2024 10:00:48 -0600 Subject: [PATCH 2/8] Update changelog --- changelog.txt | 8 ++++++++ readme.txt | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/changelog.txt b/changelog.txt index 74a2087..a5c1eb7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,13 @@ *** Changelog *** += 1.2.8 - 2024-08-19 = +* Fix - Ensure display of checkbox options shows correctly in an Accommodation product. +* Fix - Allow Accommodation product tabs to be ordered properly. +* Dev - Bump WooCommerce "tested up to" version 9.2. +* Dev - Bump WooCommerce minimum supported version to 9.0. +* Dev - Fix QIT E2E tests and add support for a few new test types. +* Dev - Update E2E tests to accommodate the changes in WooCommerce 9.2. + = 1.2.7 - 2024-07-15 = * Dev - Bump WooCommerce "tested up to" version 9.0. * Dev - Bump WooCommerce minimum supported version to 8.8. diff --git a/readme.txt b/readme.txt index 55137ca..e2f2cd2 100644 --- a/readme.txt +++ b/readme.txt @@ -38,6 +38,14 @@ If the prices shown on the product do not match the prices defined in the dashbo == Changelog == += 1.2.8 - 2024-08-19 = +* Fix - Ensure display of checkbox options shows correctly in an Accommodation product. +* Fix - Allow Accommodation product tabs to be ordered properly. +* Dev - Bump WooCommerce "tested up to" version 9.2. +* Dev - Bump WooCommerce minimum supported version to 9.0. +* Dev - Fix QIT E2E tests and add support for a few new test types. +* Dev - Update E2E tests to accommodate the changes in WooCommerce 9.2. + = 1.2.7 - 2024-07-15 = * Dev - Bump WooCommerce "tested up to" version 9.0. * Dev - Bump WooCommerce minimum supported version to 8.8. From 06e7d687fcfffebbfd6a162b5dcd10c141b5a233 Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Tue, 27 Aug 2024 19:11:31 +0530 Subject: [PATCH 3/8] Fix E2E tests. --- tests/e2e/utils/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/utils/index.js b/tests/e2e/utils/index.js index 7c8a59c..f4b6cc0 100644 --- a/tests/e2e/utils/index.js +++ b/tests/e2e/utils/index.js @@ -21,7 +21,7 @@ export const api = require('./api'); */ export async function switchTab(page, tabName, panelSelector = false) { await page - .locator('.wc-tabs > li > a', { hasText: tabName }) + .locator('.wc-tabs > li:visible > a', { hasText: tabName }) .last() .click(); if (panelSelector) { From c87531b2d4f320faa630981c482dce0d7c8749cb Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Wed, 28 Aug 2024 09:00:44 +0530 Subject: [PATCH 4/8] Try fix test in GH action env. --- tests/e2e/specs/product.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/e2e/specs/product.spec.js b/tests/e2e/specs/product.spec.js index 3bf4d6a..7da86d0 100644 --- a/tests/e2e/specs/product.spec.js +++ b/tests/e2e/specs/product.spec.js @@ -154,6 +154,7 @@ test.describe('Product Tests', () => { await expect(addToCardButton).toHaveClass(/disabled/); + await visitProductPage(page, productId); await fillBookingStartDate(page, getFutureDate(1)); await fillBookingEndDate( page, From feb1d823095fa67db77eddec0ae1da725df9e20a Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Wed, 28 Aug 2024 10:25:13 +0530 Subject: [PATCH 5/8] Fix block checkout address fillup. --- tests/e2e/utils/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/e2e/utils/index.js b/tests/e2e/utils/index.js index f4b6cc0..73e1077 100644 --- a/tests/e2e/utils/index.js +++ b/tests/e2e/utils/index.js @@ -326,6 +326,10 @@ export async function addToCart(page) { * @param {Object} customerDetails Customer billing details */ export async function blockFillBillingDetails(page, customerDetails) { + const card = await page.locator('.wc-block-components-address-card'); + if (await card.isVisible()) { + await card.locator('.wc-block-components-address-card__edit').click(); + } await page.locator('#email').fill(customerDetails.email); await page.locator('#billing-first_name').fill(customerDetails.firstname); await page.locator('#billing-last_name').fill(customerDetails.lastname); From f27cebb37bec79206f18067646e8b1f976510d0b Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Wed, 28 Aug 2024 10:39:34 +0530 Subject: [PATCH 6/8] Add wait to remove flakyness. --- tests/e2e/specs/product.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/specs/product.spec.js b/tests/e2e/specs/product.spec.js index 7da86d0..5828410 100644 --- a/tests/e2e/specs/product.spec.js +++ b/tests/e2e/specs/product.spec.js @@ -145,7 +145,7 @@ test.describe('Product Tests', () => { const addToCardButton = await page.locator( '.single_add_to_cart_button' ); - + await page.waitForTimeout(1000); await expect( page.locator('.wc-bookings-booking-cost .booking-error') ).toContainText( From 924c73c772e218d4346420f0348a7638c4712670 Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Wed, 28 Aug 2024 10:46:03 +0530 Subject: [PATCH 7/8] Remove wait and add to block billing address. --- tests/e2e/specs/product.spec.js | 2 +- tests/e2e/utils/index.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/e2e/specs/product.spec.js b/tests/e2e/specs/product.spec.js index 5828410..7da86d0 100644 --- a/tests/e2e/specs/product.spec.js +++ b/tests/e2e/specs/product.spec.js @@ -145,7 +145,7 @@ test.describe('Product Tests', () => { const addToCardButton = await page.locator( '.single_add_to_cart_button' ); - await page.waitForTimeout(1000); + await expect( page.locator('.wc-bookings-booking-cost .booking-error') ).toContainText( diff --git a/tests/e2e/utils/index.js b/tests/e2e/utils/index.js index 73e1077..1ecf354 100644 --- a/tests/e2e/utils/index.js +++ b/tests/e2e/utils/index.js @@ -326,6 +326,7 @@ export async function addToCart(page) { * @param {Object} customerDetails Customer billing details */ export async function blockFillBillingDetails(page, customerDetails) { + await page.waitForTimeout(3000); const card = await page.locator('.wc-block-components-address-card'); if (await card.isVisible()) { await card.locator('.wc-block-components-address-card__edit').click(); From 4fae4f22f39acb08975ce3d07d0b914b7cae569b Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Wed, 28 Aug 2024 10:44:37 -0600 Subject: [PATCH 8/8] Update release date --- changelog.txt | 2 +- readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index a5c1eb7..94ee1da 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,6 @@ *** Changelog *** -= 1.2.8 - 2024-08-19 = += 1.2.8 - 2024-08-28 = * Fix - Ensure display of checkbox options shows correctly in an Accommodation product. * Fix - Allow Accommodation product tabs to be ordered properly. * Dev - Bump WooCommerce "tested up to" version 9.2. diff --git a/readme.txt b/readme.txt index e2f2cd2..32675f0 100644 --- a/readme.txt +++ b/readme.txt @@ -38,7 +38,7 @@ If the prices shown on the product do not match the prices defined in the dashbo == Changelog == -= 1.2.8 - 2024-08-19 = += 1.2.8 - 2024-08-28 = * Fix - Ensure display of checkbox options shows correctly in an Accommodation product. * Fix - Allow Accommodation product tabs to be ordered properly. * Dev - Bump WooCommerce "tested up to" version 9.2.