publish-button.cy.js test is flaky

Created on 29 January 2025, 24 days ago

Overview

publish-button.cy.js is flaky. It passes quite a lot of the time, but not always.

https://git.drupalcode.org/project/experience_builder/-/jobs/4139402
https://git.drupalcode.org/project/experience_builder/-/jobs/4178071
https://git.drupalcode.org/project/experience_builder/-/jobs/4178388

When it fails it is because the preview of the published page is missing content:

      cy:command ✘  assert	[data-xb-preview="lg"][data-test-xb-content-initialized="true"][data-xb-swap-active="true"] in iframe includes text There goes my hero: expected **false** to equal **true**

Running it locally I can reproduce this most of the time as well, but not always. What seems to happen is that the PATCH request to publish the content fails - but it's not clear why this is intermittent. Observing it via pausing the test seems to make it go away a lot of the time which makes it even more awkward to debug - so maybe it's a race condition of some kind?

Proposed resolution

User interface changes

πŸ› Bug report
Status

Active

Version

0.0

Component

Miscellaneous

Created by

πŸ‡¬πŸ‡§United Kingdom longwave UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024