Skip to content

improve(E2E): add Quickpick title filter and visibility gate - #3442

Draft
Dave Shoup (shouples) wants to merge 1 commit into
mainfrom
djs/issue-2740-quickpick-title-visibility
Draft

improve(E2E): add Quickpick title filter and visibility gate#3442
Dave Shoup (shouples) wants to merge 1 commit into
mainfrom
djs/issue-2740-quickpick-title-visibility

Conversation

@shouples

Copy link
Copy Markdown
Contributor

Summary of Changes

The Quickpick E2E page object always grabs the first .quick-input-widget on the page and leaves each caller to assert it's visible before typing or clicking into it. Only one quickpick renders at a time, so this mostly works, but it's fragile: a test can act on a quickpick that hasn't rendered yet (a source of intermittent E2E flakes), and there's no way to say which quickpick a step expects. ~35 call sites repeat their own toBeVisible() gate to work around this.

This PR makes two changes to tests/e2e/objects/quickInputs/Quickpick.ts:

  • Adds an optional titlePattern?: string | RegExp constructor argument that filters the widget by its .quick-input-title, mirroring the sibling InputBox page object.
  • Adds a waitForVisible() helper that confirm(), cancel(), and selectItemByText() call before interacting, moving the visibility gate into the page object instead of every call site.

titlePattern is optional, so all existing new Quickpick(page) call sites keep working unchanged.

Click-testing instructions

Not applicable (E2E test infrastructure with no user-facing behavior).

Optional: Any additional details or context that should be provided?

  • npx gulp check, ESLint, and Prettier all pass on the changed file. The full Playwright E2E suite (which is what actually exercises this page object) needs Docker, the sidecar, and Electron, so it was not run on this branch; please run E2E before merging.
  • Deliberately out of scope, as follow-ups: giving the sibling InputBox the same waitForVisible() gate for parity, and dropping the now-redundant manual toBeVisible() assertions from the call sites that no longer need them.

Closes #2740

Pull request checklist

Please check if your PR fulfills the following (if applicable):

Tests

  • Added new
  • Updated existing
  • Deleted existing

Release notes

  • Does anything in this PR need to be mentioned in the user-facing CHANGELOG?

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 25, 2026 14:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the Quickpick E2E page object with title-based filtering and centralized visibility waits.

Changes:

  • Adds optional titlePattern filtering.
  • Adds waitForVisible() before interactions.
  • Preserves existing constructor compatibility.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/e2e/objects/quickInputs/Quickpick.ts
@sonarqube-confluent

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E2E: update Quickpick page object model to optionally filter by title and enforce locator visibility before interactions

2 participants