-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix openDocumentSettingsPanel and tests #43
Conversation
|
||
const panelButtonSelector = `.components-panel__body .components-panel__body-title button:contains("${ucWordsName}"),.components-panel__body .components-panel__body-title button:contains("${ucFirstName}")`; | ||
|
||
cy.get(panelButtonSelector).then($button => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tabs (Tags, Categories, etc.) does not exist after the DOM is ready. They are added a few moments later after REST calls. In this case, using cy.get('button').contains(name)
doesn't work: cy.get()
is called before the tabs appear in DOM, finds other panels, but fails to filter any containing the name.
Using new panelButtonSelector with button:contains("tab name")
to wait for the elements to appear in DOM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cadic Thanks for fixing this.
LGTM!! 👍
Fix openDocumentSettingsPanel and tests
Description of the Change
This PR fixes multiple issues with
openDocumentSettingsPanel
andopenDocumentSettingsSidebar
commands:Closes #36
Tested against every WordPress core major release from the minimum 5.2 to the latest nightly build.
Checklist: