Fix failing E2E tests for PR #4097#4098
Merged
acicovic merged 4 commits intofix/pci-sidebar-multiple-contact-messagesfrom Mar 26, 2026
Merged
Fix failing E2E tests for PR #4097#4098acicovic merged 4 commits intofix/pci-sidebar-multiple-contact-messagesfrom
acicovic merged 4 commits intofix/pci-sidebar-multiple-contact-messagesfrom
Conversation
Agent-Logs-Url: https://github.com/Parsely/wp-parsely/sessions/087c3a49-1a10-4e35-a546-4d04a150b6ed Co-authored-by: acicovic <23142906+acicovic@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix multiple contact messages in PCI Sidebar
Fix failing E2E tests for PR #4097
Mar 26, 2026
acicovic
approved these changes
Mar 26, 2026
1fd45ce
into
fix/pci-sidebar-multiple-contact-messages
35 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
PR #4097 moved
<VerifyCredentials>to the Tools tab level, so when credentials are absent the "Related Posts" panel button no longer exists and the credentials message renders at the tab level — not inside acomponents-panel__body. The E2E tests that checked for this message were still trying to expand "Related Posts" and locate the error within a panel body, causing timeouts.tests/e2e/utils.ts— AddedgetSidebarPanelOrTabMessage(page, selector): waits for the sidebar to render, checksrelatedPostsButton.isVisible(), and either expands the panel (credentials present → message inside panel body) or reads directly from the tab level (credentials absent). UpdatedgetRelatedPostsMessageto delegate to it.tests/e2e/specs/content-helper/top-bar-icon.spec.ts— Replaced the duplicated (and missing-await) panel-expand logic intestContentHelperIconwith a call to the same shared helper.Motivation and context
Six E2E tests were failing after PR #4097 because they assumed the credentials message would always be inside an opened panel body. The shared
getSidebarPanelOrTabMessagehelper handles both states without compromising test quality.How has this been tested?
Covered by the existing E2E test suite (
errors.spec.tsandtop-bar-icon.spec.ts). The updated utilities correctly handle both the credentials-present path (expand panel, read fromcomponents-panel__body.is-opened) and the credentials-absent path (read from.wp-parsely-content-helperdirectly).💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.