Skip to content

OCPBUGS-102342: Dismiss Quick Start drawer in Playwright e2e tests - #16903

Open
rhamilto wants to merge 1 commit into
openshift:mainfrom
rhamilto:OCPBUGS-102342
Open

OCPBUGS-102342: Dismiss Quick Start drawer in Playwright e2e tests#16903
rhamilto wants to merge 1 commit into
openshift:mainfrom
rhamilto:OCPBUGS-102342

Conversation

@rhamilto

@rhamilto rhamilto commented Aug 3, 2026

Copy link
Copy Markdown
Member

Analysis / Root cause:

The "Get started with a sample application" Quick Start drawer auto-opens on fresh CI clusters. It covers ~30% of the screen width on the right side, blocking test interactions with topology nodes, menus, and other UI elements. The existing setupConsoleUserSettings() suppresses the guided tour but does not suppress the Quick Start drawer.

Jira: https://redhat.atlassian.net/browse/OCPBUGS-102342

CI failures: https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_console/16741/pull-ci-openshift-console-main-e2e-playwright/2084317442368081920/artifacts/e2e-playwright/test/artifacts/playwright-report/index.html

Solution description:

  1. Server-side (kubernetes-client.ts): Clear console.quickstart.active in the user settings ConfigMap during cluster setup to prevent the drawer from auto-opening.
  2. Browser-side (base-page.ts): Add exported dismissQuickStartDrawer() helper that clicks the "Close drawer panel" button if visible (5s timeout, swallows errors if absent). Called from warmupSPA() as a safety net.
  3. Topology tests (topology-ci.spec.ts): Call dismissQuickStartDrawer() after page.goto('/') in the two places that navigate directly instead of using warmupSPA().

Screenshots / screen recording:

N/A — e2e test infrastructure fix, no visual changes.

Test setup:

No special setup required. Run the Playwright e2e suite on a fresh CI cluster.

Test cases:

  • Topology tests (T-06-TC01, T-09-TC01, T-15-TC01, T-16-TC01) pass without quickstart drawer interference
  • Tests using warmupSPA() dismiss the drawer if present
  • Tests on clusters without the quickstart drawer are unaffected (5s timeout swallowed)

Browser conformance:

  • Chrome

Additional info:

The Quick Start drawer is rendered by @patternfly/quickstarts and configured via user preferences stored in a ConfigMap in openshift-console-user-settings. The console.quickstart.active key controls which quickstart is currently open.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved end-to-end test stability by automatically dismissing the quick-start drawer when it appears.
    • Updated topology tests to close the drawer before performing page interactions.
    • Ensured console user settings correctly handle quick-start state data.

The "Get started with a sample application" Quick Start drawer
auto-opens on fresh CI clusters, covering the right side of the screen
and blocking test interactions. This caused topology, user-preferences,
and other test failures.

Fix by clearing the active quickstart in the user settings ConfigMap
during cluster setup and dismissing the drawer in warmupSPA() and
topology tests as a browser-side safety net.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 3, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-102342, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Analysis / Root cause:

The "Get started with a sample application" Quick Start drawer auto-opens on fresh CI clusters. It covers ~30% of the screen width on the right side, blocking test interactions with topology nodes, menus, and other UI elements. The existing setupConsoleUserSettings() suppresses the guided tour but does not suppress the Quick Start drawer.

Jira: https://redhat.atlassian.net/browse/OCPBUGS-102342

CI failures: https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_console/16741/pull-ci-openshift-console-main-e2e-playwright/2084317442368081920/artifacts/e2e-playwright/test/artifacts/playwright-report/index.html

Solution description:

  1. Server-side (kubernetes-client.ts): Clear console.quickstart.active in the user settings ConfigMap during cluster setup to prevent the drawer from auto-opening.
  2. Browser-side (base-page.ts): Add exported dismissQuickStartDrawer() helper that clicks the "Close drawer panel" button if visible (5s timeout, swallows errors if absent). Called from warmupSPA() as a safety net.
  3. Topology tests (topology-ci.spec.ts): Call dismissQuickStartDrawer() after page.goto('/') in the two places that navigate directly instead of using warmupSPA().

Screenshots / screen recording:

N/A — e2e test infrastructure fix, no visual changes.

Test setup:

No special setup required. Run the Playwright e2e suite on a fresh CI cluster.

Test cases:

  • Topology tests (T-06-TC01, T-09-TC01, T-15-TC01, T-16-TC01) pass without quickstart drawer interference
  • Tests using warmupSPA() dismiss the drawer if present
  • Tests on clusters without the quickstart drawer are unaffected (5s timeout swallowed)

Browser conformance:

  • Chrome

Additional info:

The Quick Start drawer is rendered by @patternfly/quickstarts and configured via user preferences stored in a ConfigMap in openshift-console-user-settings. The console.quickstart.active key controls which quickstart is currently open.

🤖 Generated with Claude Code

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The E2E setup initializes quick-start state, adds a helper to dismiss the quick-start drawer, and invokes the helper during SPA warmup and topology test setup.

Changes

Quick-start E2E handling

Layer / File(s) Summary
Initialize quick-start state
frontend/e2e/clients/kubernetes-client.ts
The console user-settings patch includes an empty console.quickstart.active value.
Dismiss the quick-start drawer
frontend/e2e/pages/base-page.ts, frontend/e2e/tests/topology/topology-ci.spec.ts
warmupSPA and topology tests dismiss the drawer when its close button is available. Failures are ignored when the drawer is absent.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: component/shared, component/core

Suggested reviewers: stefanonardo

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Jira issue and the main change: dismissing the Quick Start drawer in Playwright end-to-end tests.
Description check ✅ Passed The description covers root cause, solution, testing setup, test cases, browser coverage, and additional implementation details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR adds no test titles. Existing Playwright titles are static; the Date.now()-based namespace is used in test setup, not in any title.
Test Structure And Quality ✅ Passed Not applicable: the PR changes TypeScript Playwright E2E code, and no Ginkgo/Gomega Go test code or Ginkgo constructs are present in the reviewed files.
Microshift Test Compatibility ✅ Passed The diff adds no Ginkgo e2e tests. It changes only TypeScript Playwright helpers and existing topology tests, so the MicroShift API compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR changes only TypeScript Playwright helpers and existing topology tests; it adds no Ginkgo e2e tests or multi-node assumptions requiring SNO review.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only frontend Playwright helpers, topology tests, and a ConfigMap user-setting patch; it adds no deployment manifests, operators, controllers, or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The PR changes only three TypeScript Playwright files; no OTE binary, Go test entry point, or process-level stdout code is added or changed.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR adds no Ginkgo tests or IPv4 assumptions. The existing GitHub URL is route-mocked, and the new lines only manage the quick-start drawer.
No-Weak-Crypto ✅ Passed The added code only clears a quickstart setting and closes a Playwright drawer; the added-line scan found no MD5, SHA1, DES, RC4, Blowfish, ECB, crypto, or secret-comparison logic.
Container-Privileges ✅ Passed The PR changes only TypeScript e2e files. No added manifest contains privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings; the existing false setting is unchan...
No-Sensitive-Data-In-Logs ✅ Passed The diff adds only a ConfigMap preference and drawer interactions; no logging, reporting, or sensitive-data output calls were added.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from jhadvig and sg00dwin August 3, 2026 20:32
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Aug 3, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-102342, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Analysis / Root cause:

The "Get started with a sample application" Quick Start drawer auto-opens on fresh CI clusters. It covers ~30% of the screen width on the right side, blocking test interactions with topology nodes, menus, and other UI elements. The existing setupConsoleUserSettings() suppresses the guided tour but does not suppress the Quick Start drawer.

Jira: https://redhat.atlassian.net/browse/OCPBUGS-102342

CI failures: https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_console/16741/pull-ci-openshift-console-main-e2e-playwright/2084317442368081920/artifacts/e2e-playwright/test/artifacts/playwright-report/index.html

Solution description:

  1. Server-side (kubernetes-client.ts): Clear console.quickstart.active in the user settings ConfigMap during cluster setup to prevent the drawer from auto-opening.
  2. Browser-side (base-page.ts): Add exported dismissQuickStartDrawer() helper that clicks the "Close drawer panel" button if visible (5s timeout, swallows errors if absent). Called from warmupSPA() as a safety net.
  3. Topology tests (topology-ci.spec.ts): Call dismissQuickStartDrawer() after page.goto('/') in the two places that navigate directly instead of using warmupSPA().

Screenshots / screen recording:

N/A — e2e test infrastructure fix, no visual changes.

Test setup:

No special setup required. Run the Playwright e2e suite on a fresh CI cluster.

Test cases:

  • Topology tests (T-06-TC01, T-09-TC01, T-15-TC01, T-16-TC01) pass without quickstart drawer interference
  • Tests using warmupSPA() dismiss the drawer if present
  • Tests on clusters without the quickstart drawer are unaffected (5s timeout swallowed)

Browser conformance:

  • Chrome

Additional info:

The Quick Start drawer is rendered by @patternfly/quickstarts and configured via user preferences stored in a ConfigMap in openshift-console-user-settings. The console.quickstart.active key controls which quickstart is currently open.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
  • Improved end-to-end test stability by automatically dismissing the quick-start drawer when it appears.
  • Updated topology tests to close the drawer before performing page interactions.
  • Ensured console user settings correctly handle quick-start state data.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Aug 3, 2026
@rhamilto

rhamilto commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

/jira refresh
/approve
/verified by CI
/test e2e-playwright

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-102342, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh
/approve
/verified by CI
/test e2e-playwright

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Aug 3, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This PR has been marked as verified by CI.

Details

In response to this:

/jira refresh
/approve
/verified by CI
/test e2e-playwright

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci

openshift-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhamilto

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/e2e/pages/base-page.ts`:
- Around line 37-45: Update dismissQuickStartDrawer so only closeButton.waitFor
visibility is wrapped in the try/catch, allowing click failures to propagate.
Pass a five-second timeout to closeButton.click(), then wait for closeButton to
become hidden before returning.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2e655547-a2da-45ae-b500-55212823d0e2

📥 Commits

Reviewing files that changed from the base of the PR and between d934fc2 and ba70956.

📒 Files selected for processing (3)
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/tests/topology/topology-ci.spec.ts

Comment on lines +37 to +45
export async function dismissQuickStartDrawer(page: Page): Promise<void> {
const closeButton = page.getByRole('button', { name: 'Close drawer panel' });
try {
// eslint-disable-next-line no-restricted-syntax
await closeButton.waitFor({ state: 'visible', timeout: 5_000 });
await closeButton.click();
} catch {
// No quickstart drawer open — continue
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
fd -a -t f 'playwright\.config\..*|package\.json' . |
  while IFS= read -r file; do
    rg -n 'actionTimeout|setDefaultTimeout|`@playwright/test`|playwright' "$file" || true
  done

Repository: openshift/console

Length of output: 998


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo '--- candidate files ---'
fd -a -t f 'playwright\.config\..*|base-page\.ts|package\.json' . | sort

echo '--- Playwright configuration ---'
config=$(fd -a -t f 'playwright\.config\..*' . | head -n 1)
if [ -n "${config:-}" ]; then
  wc -l "$config"
  cat -n "$config"
fi

echo '--- helper and call sites ---'
rg -n -C 4 'dismissQuickStartDrawer|Close drawer panel|quickstart drawer' frontend/e2e

echo '--- timeout configuration across E2E files ---'
rg -n -C 2 'actionTimeout|navigationTimeout|setDefaultTimeout|setDefaultNavigationTimeout|timeout:' frontend/e2e playwright.config.* package.json 2>/dev/null || true

Repository: openshift/console

Length of output: 50374


🌐 Web query:

Playwright Locator.click timeout default waitFor timeout default actionTimeout setDefaultTimeout

💡 Result:

In Playwright, timeout behaviors differ depending on whether you are using the Playwright Test runner or the Playwright library directly. Default Timeout Behaviors: 1. locator.click and other Action Timeouts: - When using Playwright Test (the recommended runner), the default timeout for actions like click is 0 (no timeout) [1][2]. This means the action will wait indefinitely unless otherwise configured [3][1]. - When using the Playwright library (e.g., in a script without the test runner), the default timeout for actions is typically 30 seconds [4][5][6]. - You can override this per-action by passing a timeout option: await locator.click({ timeout: 5000 }); [7][8]. 2. locator.waitFor Timeout: - By default, locator.waitFor uses a 30-second timeout [5][9]. - Like other actions, you can override this by passing the timeout option: await locator.waitFor({ timeout: 5000 });. Configuring Default Timeouts: You can change these defaults globally or at the suite/context/page level: - Playwright Configuration (playwright.config.ts): Use the actionTimeout property in the use object to set a default for all actions [1][8]. export default defineConfig({ use: { actionTimeout: 10000, // 10 seconds }, }); - Programmatic Defaults: You can use page.setDefaultTimeout(ms) or browserContext.setDefaultTimeout(ms) to override the default timeout for all operations (including actions and wait functions) on that page or context [3][4][10]. Passing 0 disables the timeout [3][5]. Important Distinctions: - Action Timeout vs. Test Timeout: The actionTimeout only applies to individual actions (like clicking or filling). It is distinct from the overall test timeout, which is set via the timeout property in the config or test.setTimeout [7][11][8]. - Troubleshooting: If you encounter a timeout error (e.g., Timeout 30000ms exceeded), it is often because you have either not changed the default 30-second wait in a non-test-runner environment or are hitting a configured limit [11][12]. If using Playwright Test, check your config file for an actionTimeout setting [11][8].

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo '--- base page context ---'
sed -n '1,75p' frontend/e2e/pages/base-page.ts

echo '--- relevant package versions and scripts ---'
sed -n '1,80p' frontend/e2e/package.json
sed -n '130,155p' frontend/package.json

echo '--- topology actions immediately after drawer dismissal ---'
sed -n '50,75p' frontend/e2e/tests/topology/topology-ci.spec.ts
sed -n '115,135p' frontend/e2e/tests/topology/topology-ci.spec.ts

Repository: openshift/console

Length of output: 5455


Bound and verify the drawer-close action.

Playwright Test has no configured action timeout, so click() does not enforce the five-second limit. The broad catch also hides click failures. Catch only the visibility wait, pass timeout: 5_000 to click(), and wait for the button to become hidden.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/e2e/pages/base-page.ts` around lines 37 - 45, Update
dismissQuickStartDrawer so only closeButton.waitFor visibility is wrapped in the
try/catch, allowing click failures to propagate. Pass a five-second timeout to
closeButton.click(), then wait for closeButton to become hidden before
returning.

Source: MCP tools

@rhamilto

rhamilto commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

/test backend

@openshift-ci

openshift-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@rhamilto: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/backend ba70956 link true /test backend
ci/prow/e2e-playwright ba70956 link false /test e2e-playwright

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants