From 58bedced149f6c17a0b745f2fc948f69fd8b70c8 Mon Sep 17 00:00:00 2001 From: Swanand01 Date: Wed, 26 Jun 2024 13:20:06 +0530 Subject: [PATCH 01/11] Update tests to run against 6.6-RC1 --- .github/workflows/tests-e2e.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 10fe52a66cfb..4ab3330d721a 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -146,6 +146,16 @@ jobs: wp: 'latest' snapshots: true shard: '2/2' + - browser: 'chrome' + wp: '6.6-RC1' + snapshots: false + shard: '1/2' + experimental: true + - browser: 'chrome' + wp: '6.6-RC1' + snapshots: false + shard: '2/2' + experimental: true steps: - name: Harden Runner From 70c2a2183ce2277146e4440c3d1e0fcf36e4327e Mon Sep 17 00:00:00 2001 From: Swanand01 Date: Wed, 26 Jun 2024 15:01:24 +0530 Subject: [PATCH 02/11] Allow the `You are importing createRoot` warning --- packages/e2e-tests/src/config/bootstrap.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/e2e-tests/src/config/bootstrap.js b/packages/e2e-tests/src/config/bootstrap.js index 3dcc996e07cf..ca7a15cac79f 100644 --- a/packages/e2e-tests/src/config/bootstrap.js +++ b/packages/e2e-tests/src/config/bootstrap.js @@ -126,6 +126,9 @@ const ALLOWED_ERROR_MESSAGES = [ // Coming from // See https://github.com/ampproject/amphtml/blob/413457c3598f8c6694ca4ee7b83a5d84f9b9f00c/src/amp-story-player/amp-story-player-impl.js#L562 "Unrecognized feature: 'web-share'", + + // This is a known issue in core. + 'You are importing createRoot from "react-dom" which is not supported.', ]; export function addAllowedErrorMessage(message) { From 0b3a7c84b90927a49056289b597a7995a3d9ac29 Mon Sep 17 00:00:00 2001 From: Swanand01 Date: Wed, 26 Jun 2024 15:33:38 +0530 Subject: [PATCH 03/11] Increase `waitForFunction` timeout --- packages/e2e-test-utils/src/publishPost.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/e2e-test-utils/src/publishPost.js b/packages/e2e-test-utils/src/publishPost.js index 58923d01f2e9..efec2a0101e7 100644 --- a/packages/e2e-test-utils/src/publishPost.js +++ b/packages/e2e-test-utils/src/publishPost.js @@ -69,7 +69,8 @@ async function publishPost() { 'publish' && document.querySelector( '.editor-post-publish-button[aria-disabled="true"]' - ).textContent === 'Update' + ).textContent === 'Update', + { timeout: 5000 } ); // The first time around the selector might return undefined. From 4e0cc62301dcfbeeaa82500ce3466a38043c2729 Mon Sep 17 00:00:00 2001 From: Swanand01 Date: Wed, 26 Jun 2024 15:45:47 +0530 Subject: [PATCH 04/11] Increase timeout to 10000 --- packages/e2e-test-utils/src/publishPost.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/e2e-test-utils/src/publishPost.js b/packages/e2e-test-utils/src/publishPost.js index efec2a0101e7..bc676526f119 100644 --- a/packages/e2e-test-utils/src/publishPost.js +++ b/packages/e2e-test-utils/src/publishPost.js @@ -70,7 +70,7 @@ async function publishPost() { document.querySelector( '.editor-post-publish-button[aria-disabled="true"]' ).textContent === 'Update', - { timeout: 5000 } + { timeout: 10000 } ); // The first time around the selector might return undefined. From 44a1d7d2c6d69910368fd4d1daeb7add673e9a17 Mon Sep 17 00:00:00 2001 From: Swanand01 Date: Wed, 26 Jun 2024 18:16:57 +0530 Subject: [PATCH 05/11] Update button selector and remove timeout --- packages/e2e-test-utils/src/publishPost.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/e2e-test-utils/src/publishPost.js b/packages/e2e-test-utils/src/publishPost.js index bc676526f119..255f2d8da7a4 100644 --- a/packages/e2e-test-utils/src/publishPost.js +++ b/packages/e2e-test-utils/src/publishPost.js @@ -60,7 +60,7 @@ async function publishPost() { } // Publish the post - await page.click('.editor-post-publish-button'); + await page.click('.editor-post-publish-button__button'); // Wait until the selector returns a truthy value. await page.waitForFunction( @@ -68,9 +68,8 @@ async function publishPost() { wp.data.select('core/editor').getEditedPostAttribute('status') === 'publish' && document.querySelector( - '.editor-post-publish-button[aria-disabled="true"]' - ).textContent === 'Update', - { timeout: 10000 } + '.editor-post-publish-button__button[aria-disabled="true"]' + ).textContent === 'Update' ); // The first time around the selector might return undefined. From 83903a5c2b2f15886d35e9a81ae3f5dc54f8c33a Mon Sep 17 00:00:00 2001 From: Swanand01 Date: Wed, 26 Jun 2024 18:21:31 +0530 Subject: [PATCH 06/11] Change textContent to Save --- packages/e2e-test-utils/src/publishPost.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/e2e-test-utils/src/publishPost.js b/packages/e2e-test-utils/src/publishPost.js index 255f2d8da7a4..275cf0354177 100644 --- a/packages/e2e-test-utils/src/publishPost.js +++ b/packages/e2e-test-utils/src/publishPost.js @@ -69,7 +69,7 @@ async function publishPost() { 'publish' && document.querySelector( '.editor-post-publish-button__button[aria-disabled="true"]' - ).textContent === 'Update' + ).textContent === 'Save' ); // The first time around the selector might return undefined. From b2d6b944beeef903490a18a64e7f42927729c005 Mon Sep 17 00:00:00 2001 From: Swanand01 Date: Thu, 27 Jun 2024 11:03:16 +0530 Subject: [PATCH 07/11] Update button selector --- packages/e2e-test-utils/src/publishPost.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/e2e-test-utils/src/publishPost.js b/packages/e2e-test-utils/src/publishPost.js index 275cf0354177..28a42b58e133 100644 --- a/packages/e2e-test-utils/src/publishPost.js +++ b/packages/e2e-test-utils/src/publishPost.js @@ -27,7 +27,7 @@ async function openPublishPanel() { if (isEntityPublishToggle) { await page.waitForSelector('.editor-entities-saved-states__save-button'); } else { - await page.waitForSelector('.editor-post-publish-button'); + await page.waitForSelector('.editor-post-publish-button__button'); } } @@ -67,9 +67,12 @@ async function publishPost() { () => wp.data.select('core/editor').getEditedPostAttribute('status') === 'publish' && - document.querySelector( + (document.querySelector( '.editor-post-publish-button__button[aria-disabled="true"]' - ).textContent === 'Save' + ).textContent === 'Save' || + document.querySelector( + '.editor-post-publish-button__button[aria-disabled="true"]' + ).textContent === 'Update') ); // The first time around the selector might return undefined. From 080a14d24fb89f8d5c810780f6c3f0e55649de88 Mon Sep 17 00:00:00 2001 From: Swanand01 Date: Thu, 27 Jun 2024 12:31:05 +0530 Subject: [PATCH 08/11] Experiment: Remove querySelector check --- packages/e2e-test-utils/src/publishPost.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/e2e-test-utils/src/publishPost.js b/packages/e2e-test-utils/src/publishPost.js index 28a42b58e133..41d9c24d9d03 100644 --- a/packages/e2e-test-utils/src/publishPost.js +++ b/packages/e2e-test-utils/src/publishPost.js @@ -66,13 +66,7 @@ async function publishPost() { await page.waitForFunction( () => wp.data.select('core/editor').getEditedPostAttribute('status') === - 'publish' && - (document.querySelector( - '.editor-post-publish-button__button[aria-disabled="true"]' - ).textContent === 'Save' || - document.querySelector( - '.editor-post-publish-button__button[aria-disabled="true"]' - ).textContent === 'Update') + 'publish' ); // The first time around the selector might return undefined. From d5d9a38ec082062ebe6f18733d78c80a1cbb2644 Mon Sep 17 00:00:00 2001 From: Swanand01 Date: Thu, 27 Jun 2024 12:48:47 +0530 Subject: [PATCH 09/11] Revert selector updates --- packages/e2e-test-utils/src/publishPost.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/e2e-test-utils/src/publishPost.js b/packages/e2e-test-utils/src/publishPost.js index 41d9c24d9d03..58923d01f2e9 100644 --- a/packages/e2e-test-utils/src/publishPost.js +++ b/packages/e2e-test-utils/src/publishPost.js @@ -27,7 +27,7 @@ async function openPublishPanel() { if (isEntityPublishToggle) { await page.waitForSelector('.editor-entities-saved-states__save-button'); } else { - await page.waitForSelector('.editor-post-publish-button__button'); + await page.waitForSelector('.editor-post-publish-button'); } } @@ -60,13 +60,16 @@ async function publishPost() { } // Publish the post - await page.click('.editor-post-publish-button__button'); + await page.click('.editor-post-publish-button'); // Wait until the selector returns a truthy value. await page.waitForFunction( () => wp.data.select('core/editor').getEditedPostAttribute('status') === - 'publish' + 'publish' && + document.querySelector( + '.editor-post-publish-button[aria-disabled="true"]' + ).textContent === 'Update' ); // The first time around the selector might return undefined. From 1701f4ffecde35b1f699086b53713f806dbc86ba Mon Sep 17 00:00:00 2001 From: Swanand01 Date: Thu, 27 Jun 2024 13:07:05 +0530 Subject: [PATCH 10/11] Experiment: Change only the textContent --- packages/e2e-test-utils/src/publishPost.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/e2e-test-utils/src/publishPost.js b/packages/e2e-test-utils/src/publishPost.js index 58923d01f2e9..bc67f63b8470 100644 --- a/packages/e2e-test-utils/src/publishPost.js +++ b/packages/e2e-test-utils/src/publishPost.js @@ -67,9 +67,12 @@ async function publishPost() { () => wp.data.select('core/editor').getEditedPostAttribute('status') === 'publish' && - document.querySelector( + (document.querySelector( '.editor-post-publish-button[aria-disabled="true"]' - ).textContent === 'Update' + ).textContent === 'Update' || + document.querySelector( + '.editor-post-publish-button[aria-disabled="true"]' + ).textContent === 'Save') ); // The first time around the selector might return undefined. From 0c05cc69cef15b6e14e5f151c8a40f4923f213d8 Mon Sep 17 00:00:00 2001 From: Swanand01 Date: Thu, 27 Jun 2024 13:19:30 +0530 Subject: [PATCH 11/11] Update Tested up to: 6.6 in readme.txt --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 7c049a7d9f1e..155b36f101fa 100644 --- a/readme.txt +++ b/readme.txt @@ -1,7 +1,7 @@ === Web Stories === Contributors: google -Tested up to: 6.5 +Tested up to: 6.6 Requires at least: 6.4 Stable tag: V.V.V License: Apache-2.0