bigbite / wp-cypress

WordPress end to end testing with Cypress.io.
MIT License
86 stars 18 forks source link

Avoid toggling welcome message when core/nux is not available #124

Closed g-elwell closed 11 months ago

g-elwell commented 1 year ago

Description

Since the deprecation of the core/nux store, the default WordPress 'welcome guide' modal can only be toggled on or off, not explicitly disabled.

In order to prevent the welcome guide from showing, which can block test execution, we are checking whether it is enabled, then toggling it to disable it.

This appears to cause a situation where the welcome guide is dismissed automatically when Cypress interacts with the page, after which our code (which is intended to dismiss the welcome guide) actually toggles it back on and blocks further test execution.

This is only visible since WordPress 6.2 as this is when the core/nux package was removed, after being deprecated for some time.

By removing the call to toggle the welcome guide, this issue is avoided and it appears that the welcome guide is automatically dismissed without interfering with the test execution.

Change Log

Screenshots/Videos

This has been tested on 6.2 and 6.0 to check backwards compatibility.

Note: I want to test this further especially since the issue doesn't seem to crop up on CI

Types of changes (if applicable):

Checklist (if applicable):

g-elwell commented 11 months ago

Closing in favour of #126