Fix flaky e2e tests, focus on Webkit and making sure the DOM is ready so events fire properly#2841
Fix flaky e2e tests, focus on Webkit and making sure the DOM is ready so events fire properly#2841
Conversation
/unhold 29bbcc0b-a4db-47a9-92d0-ca91f968487c
Test instance is ready 🚀🌑 janus | admin | blocks report | CircleCI | composer-local.json ⌚ 2026.01.27 09:21:23 |
25dd772 to
5e26a31
Compare
/unhold 0cb5c1ad-23d7-4a4c-8c20-d42026c22df9
/unhold 5fc084de-2f22-43de-bd29-19f3c9870762
Osong-Michael
left a comment
There was a problem hiding this comment.
@mleray should we merge so you can test your other PRs?
| try { | ||
| await expect(getCloseButton()).toBeVisible({timeout: 1000}); | ||
| await getCloseButton().click(); | ||
| } catch (error) { |
There was a problem hiding this comment.
Do we need the catch block?
There was a problem hiding this comment.
Would be nice to have some kind of way to see why the try block didn't run
| * @param {string} text | ||
| */ | ||
| const addHeadingOrParagraph = async ({page}, blockName, blockTag, number, text) => { | ||
| const addHeadingOrParagraph = async ({page}, blockName, blockTag, text) => { |
There was a problem hiding this comment.
With the new changes, this function looks pretty generic to me, and it could be used for other blocks, not only headings or paragraphs.
Maybe it could be renamed, or at least, the new code you inserted could be extracted into another function to make it reusable.
There was a problem hiding this comment.
We already have a generic function to add blocks to pages, I am not sure but this is also pretty reusable if there is a use case, as for the changes, those are just hacks to ensure there is enough time to allow DOM update and stability before certain actions take place, different browsers render differently hence the reason for flakiness in some of our tests
c81a12b to
b722a56
Compare
/unhold dd55661d-4012-4960-97c5-8e214e439655
/unhold 5aef2ee3-eb61-4a82-ac2f-c20f2f85652d
b722a56 to
554c83b
Compare
/unhold 415c7c88-a93c-4fcb-a21a-3effd00be76e
/unhold bd70e5c6-a208-4876-acd1-8168cba516e9
554c83b to
1a55893
Compare
/unhold 28248b38-ac7f-4dfb-be6f-b9d1251c161e
/unhold d9ac55de-d011-4637-9b03-a63ace0553b1
1a55893 to
6ee4a02
Compare
/unhold 69d568d8-6414-435f-bb4a-a42f765726cb
6ee4a02 to
faa9db1
Compare
/unhold c5c1323a-9c58-46cb-babe-aab5500b2694
/unhold 9180e14d-5b7d-43d7-8d32-1a9d9fa2cbd1
/unhold d5233c21-e582-4cf8-be87-81607f95a61b
/unhold 4e294aa3-e101-4a34-914e-4179c3f701e5
/unhold c1154afa-10ab-417c-a92a-c84e4f5d2051
This commit simplifies the searchAndInsertBlock function
- Added code to ensure DOM is ready in webkit - Ensure page is not closed before interacting with elements
/unhold c3e258e6-2d03-47cf-9f0f-2b81703596e0
Summary
searchAndInsertBlockfunction