Skip to content

CONSOLE-5414: Migrate dev-console Cypress tests to Playwright (batch 2)#16741

Open
shahsahil264 wants to merge 6 commits into
openshift:mainfrom
shahsahil264:CONSOLE-5414
Open

CONSOLE-5414: Migrate dev-console Cypress tests to Playwright (batch 2)#16741
shahsahil264 wants to merge 6 commits into
openshift:mainfrom
shahsahil264:CONSOLE-5414

Conversation

@shahsahil264

@shahsahil264 shahsahil264 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Migrate 6 dev-console feature areas from Cypress to Playwright (batch 2 of CONSOLE-5239)
  • Create 4 new page objects: QuickStartsPage, AddPage, UserPreferencesPage, BuildConfigPage
  • Create 6 spec files with 18 test cases total
  • Remove 14 migrated Cypress files (6 features, 6 step defs, 2 page objects)
  • Shared Cypress files still imported by other features are preserved

Features migrated

Feature Spec file Tests
Quick starts filter catalog filter-quick-starts.spec.ts 4
Pinned resources pinned-resources.spec.ts 1
Sample app from Add page sample-app.spec.ts 3
User preferences user-preferences.spec.ts 5
Quick starts dev perspective quick-starts.spec.ts 3
Build config edit build-config.spec.ts 2

Skipped scenarios (with reasons)

  • 6 @broken-test user preference scenarios
  • 1 @manual user preference scenario
  • 1 @broken-test quick starts filter scenario
  • 5 build config scenarios requiring YAML fixtures or git workloads

Test plan

  • npx tsc --noEmit -p e2e/tsconfig.json passes
  • yarn eslint passes on all new files
  • npx playwright test --project=dev-console passes on OCP 5.0 cluster

Screenshots / screen recording

N/A — test infrastructure only, no UI changes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Expanded Playwright end-to-end coverage for Dev Console: Add samples flow, Edit Build Config form/advanced options, Quick Starts catalog filtering, pinned resources in Developer perspective, and User Preferences tabs/settings.
    • Added new Dev Console page helpers (Add, Build Config, Quick Starts, User Preferences) to improve navigation and more reliable UI interactions.
    • Updated Dev Console test warm-up synchronization and enhanced common page locators for perspective switching and editor/pinned-resource controls.
  • Chores
    • Removed legacy Cypress/Cucumber guided-tour and integration-test scenarios plus related step definitions and page-object exports.

@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 the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 8, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@shahsahil264: This pull request references CONSOLE-5414 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Migrate 6 dev-console feature areas from Cypress to Playwright (batch 2 of CONSOLE-5239)
  • Create 4 new page objects: QuickStartsPage, AddPage, UserPreferencesPage, BuildConfigPage
  • Create 6 spec files with 18 test cases total
  • Remove 14 migrated Cypress files (6 features, 6 step defs, 2 page objects)
  • Shared Cypress files still imported by other features are preserved

Features migrated

Feature Spec file Tests
Quick starts filter catalog filter-quick-starts.spec.ts 4
Pinned resources pinned-resources.spec.ts 1
Sample app from Add page sample-app.spec.ts 3
User preferences user-preferences.spec.ts 5
Quick starts dev perspective quick-starts.spec.ts 3
Build config edit build-config.spec.ts 2

Skipped scenarios (with reasons)

  • 6 @broken-test user preference scenarios
  • 1 @manual user preference scenario
  • 1 @broken-test quick starts filter scenario
  • 5 build config scenarios requiring YAML fixtures or git workloads

Test plan

  • npx tsc --noEmit -p e2e/tsconfig.json passes
  • yarn eslint passes on all new files
  • npx playwright test --project=dev-console passes on OCP 5.0 cluster

Screenshots / screen recording

N/A — test infrastructure only, no UI changes

🤖 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.

@openshift-ci openshift-ci Bot requested review from cajieh and rhamilto July 8, 2026 15:42
@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shahsahil264
Once this PR has been reviewed and has the lgtm label, please assign vojtechszocs for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@openshift-ci openshift-ci Bot added the component/dev-console Related to dev-console label Jul 8, 2026
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Playwright page objects and E2E specs were added for several dev-console flows, and matching legacy Cypress/Cucumber feature files, page objects, and step definitions were removed.

Changes

Dev-console Playwright migration

Layer / File(s) Summary
Shared page objects
frontend/e2e/pages/base-page.ts, frontend/e2e/pages/dev-console/add-page.ts, frontend/e2e/pages/dev-console/build-config-page.ts, frontend/e2e/pages/dev-console/quick-starts-page.ts, frontend/e2e/pages/dev-console/user-preferences-page.ts
Base-page readiness and locators were updated, and new page objects were added for dev-console add, build-config, quick-starts, and user-preferences flows.
Add and build-config tests
frontend/e2e/tests/dev-console/sample-app.spec.ts, frontend/e2e/tests/dev-console/build-config.spec.ts
Adds namespace-backed add-page and build-config coverage for sample selection, form-view handling, and advanced build-config sections.
Quick starts, pinned resources, and preferences tests
frontend/e2e/tests/dev-console/filter-quick-starts.spec.ts, frontend/e2e/tests/dev-console/quick-starts.spec.ts, frontend/e2e/tests/dev-console/pinned-resources.spec.ts, frontend/e2e/tests/dev-console/user-preferences.spec.ts
Adds quick-start filtering and drawer checks, pinned-resource visibility checks, and user-preference flows for perspective, topology, create/edit method, language, and resource settings.
Legacy integration removals
frontend/packages/dev-console/integration-tests/features/..., frontend/packages/dev-console/integration-tests/support/pageObjects/{buildConfig-po,gettingStarted-po}.ts, frontend/packages/dev-console/integration-tests/support/step-definitions/...
Deletes the older Cypress/Cucumber feature files, page objects, and step definitions for build config, samples, quick starts, pinned resources, and user preferences.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: sg00dwin, spadgett

🚥 Pre-merge checks | ✅ 12 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary, test plan, and screenshots, but it omits required template sections like Analysis / Root cause and Browser conformance. Add the missing template sections, especially Analysis / Root cause, Solution description, Test cases, Browser conformance, Additional info, and Reviewers/assignees.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Microshift Test Compatibility ⚠️ Warning New dev-console tests create BuildConfig resources and use buildconfig forms; another test selects DeploymentConfig, with no MicroShift skip/tag/guard. Add a MicroShift skip/tag/guard or keep these cases out of MicroShift-covered CI; avoid BuildConfig and DeploymentConfig dependencies in MicroShift-running tests.
✅ Passed checks (12 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific, concise, and accurately summarizes the main change: migrating dev-console Cypress tests to Playwright.
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 All new test titles are static; dynamic names like namespaces and timestamps appear only in test bodies, not in It/describe titles.
Test Structure And Quality ✅ Passed PASS: The new Playwright specs use setup/cleanup hooks, explicit timeouts for cluster/page waits, and each test targets one scenario.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The added Playwright specs only exercise UI/API flows (samples, quick starts, preferences, pinned resources, build configs) and contain no multi-node/HA or SNO-skipping gaps.
Topology-Aware Scheduling Compatibility ✅ Passed Only frontend/e2e/pages/base-page.ts changed, and it’s a Playwright helper; no deployment manifests, operators, controllers, or pod scheduling logic were modified.
Ote Binary Stdout Contract ✅ Passed PASS: The PR only touches frontend Playwright TS tests/page objects; no Go OTE binary code or process-level stdout writes were added, and searches found no logging calls.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No IPv4-only parsing or host/IP assumptions found; the only public GitHub URL is a manifest field, and no test makes external network calls.
No-Weak-Crypto ✅ Passed Scanned the changed Playwright pages/specs and found no MD5/SHA1/RC4/3DES/Blowfish/ECB, crypto APIs, or secret/token comparisons.
Container-Privileges ✅ Passed PR range changes only TS/spec/feature files; no container/K8s manifests or privileged, hostPID/hostNetwork/hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings were found.
No-Sensitive-Data-In-Logs ✅ Passed No added console/logger/print statements or sensitive-data patterns appeared in the changed files or added diff lines.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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

🧹 Nitpick comments (2)
frontend/e2e/tests/dev-console/pinned-resources.spec.ts (1)

15-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Avoid reusing QuickStartsPage for perspective switching in a pinned-resources test.

QuickStartsPage is semantically unrelated to pinned resources. Using it here (and naming the instance nav) creates confusion about the test's dependencies and couples this spec to an unrelated page object. Consider extracting switchPerspective into a shared navigation helper or BasePage so each spec imports the appropriate abstraction.

🤖 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/tests/dev-console/pinned-resources.spec.ts` around lines 15 -
16, The pinned-resources spec is using QuickStartsPage solely to call
switchPerspective, which couples the test to an unrelated page object and makes
the dependency unclear. Move switchPerspective into a shared navigation
abstraction such as BasePage or a dedicated helper, then update
pinned-resources.spec.ts to use that shared helper instead of instantiating
QuickStartsPage; keep the test-specific page object aligned with pinned
resources.
frontend/e2e/tests/dev-console/filter-quick-starts.spec.ts (1)

24-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Avoid duplicating locator strings between spec and page object.

Lines 24–26 and 31 re-create locators that already exist as private fields in QuickStartsPage (filterInput and statusFilterToggle). If the placeholder text or test ID changes, it must be updated in both places. Expose getter methods on the page object so the spec can assert visibility without duplicating locator strings.

♻️ Proposed refactor

Add getter methods to QuickStartsPage:

   getQuickStartCard(name: string): Locator {
     return this.page.getByTestId(`${name}-catalog-tile`);
   }
 
+  getFilterInput(): Locator {
+    return this.filterInput;
+  }
+
+  getStatusFilterToggle(): Locator {
+    return this.statusFilterToggle;
+  }
+
   getPageTitle(): Locator {

Then use them in the spec:

         await test.step('Verify keyword filter is visible', async () => {
-          await expect(
-            quickStartsPage.page.getByPlaceholder('Filter by keyword...'),
-          ).toBeVisible();
+          await expect(quickStartsPage.getFilterInput()).toBeVisible();
         });
 
         await test.step('Verify status filter is visible', async () => {
-          await expect(
-            quickStartsPage.page.getByTestId('quick-start-status-filter'),
-          ).toBeVisible();
+          await expect(quickStartsPage.getStatusFilterToggle()).toBeVisible();
         });

Also applies to: 31-31

🤖 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/tests/dev-console/filter-quick-starts.spec.ts` around lines 24 -
26, The spec is duplicating locator strings that already exist in
QuickStartsPage, which makes the test brittle when the UI changes. Add public
getter methods on QuickStartsPage for the existing private locators filterInput
and statusFilterToggle, then update the filter-quick-starts spec to use those
getters for visibility assertions instead of re-creating the locators directly.
🤖 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/tests/dev-console/user-preferences.spec.ts`:
- Around line 33-59: The user preference tests leave server-side state behind if
a test fails before its final cleanup step, so the reset is not guaranteed. Add
an unconditional afterEach cleanup in the same spec suite (or a shared helper
used by the suite) that resets every preference modified by the affected cases,
and keep the existing test steps focused on the behavior assertions in the
userPrefs-driven tests like TC02, TC05, TC08, and TC12.

---

Nitpick comments:
In `@frontend/e2e/tests/dev-console/filter-quick-starts.spec.ts`:
- Around line 24-26: The spec is duplicating locator strings that already exist
in QuickStartsPage, which makes the test brittle when the UI changes. Add public
getter methods on QuickStartsPage for the existing private locators filterInput
and statusFilterToggle, then update the filter-quick-starts spec to use those
getters for visibility assertions instead of re-creating the locators directly.

In `@frontend/e2e/tests/dev-console/pinned-resources.spec.ts`:
- Around line 15-16: The pinned-resources spec is using QuickStartsPage solely
to call switchPerspective, which couples the test to an unrelated page object
and makes the dependency unclear. Move switchPerspective into a shared
navigation abstraction such as BasePage or a dedicated helper, then update
pinned-resources.spec.ts to use that shared helper instead of instantiating
QuickStartsPage; keep the test-specific page object aligned with pinned
resources.
🪄 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: cc81c02a-8356-4db1-8a6c-bf88c2aad451

📥 Commits

Reviewing files that changed from the base of the PR and between d02fcf1 and a7d378d.

📒 Files selected for processing (24)
  • frontend/e2e/pages/dev-console/add-page.ts
  • frontend/e2e/pages/dev-console/build-config-page.ts
  • frontend/e2e/pages/dev-console/quick-starts-page.ts
  • frontend/e2e/pages/dev-console/user-preferences-page.ts
  • frontend/e2e/tests/dev-console/build-config.spec.ts
  • frontend/e2e/tests/dev-console/filter-quick-starts.spec.ts
  • frontend/e2e/tests/dev-console/pinned-resources.spec.ts
  • frontend/e2e/tests/dev-console/quick-starts.spec.ts
  • frontend/e2e/tests/dev-console/sample-app.spec.ts
  • frontend/e2e/tests/dev-console/user-preferences.spec.ts
  • frontend/packages/dev-console/integration-tests/features/build-config/edit-build-config.feature
  • frontend/packages/dev-console/integration-tests/features/getting-started/sample-card-add-page.feature
  • frontend/packages/dev-console/integration-tests/features/guided-tour/quick-starts/filter-quick-starts-catalog.feature
  • frontend/packages/dev-console/integration-tests/features/guided-tour/quick-starts/quick-start-devperspective.feature
  • frontend/packages/dev-console/integration-tests/features/perspectives/configure-pinned-resources.feature
  • frontend/packages/dev-console/integration-tests/features/user-preferences/user-preferences-dev-perspective.feature
  • frontend/packages/dev-console/integration-tests/support/pageObjects/buildConfig-po.ts
  • frontend/packages/dev-console/integration-tests/support/pageObjects/gettingStarted-po.ts
  • frontend/packages/dev-console/integration-tests/support/step-definitions/build-config/edit-build-config.ts
  • frontend/packages/dev-console/integration-tests/support/step-definitions/consoleConfiguration/pinned-resources.ts
  • frontend/packages/dev-console/integration-tests/support/step-definitions/getting-started/sample-card-add-page.ts
  • frontend/packages/dev-console/integration-tests/support/step-definitions/quck-starts/filter-quick-starts-catalog.ts
  • frontend/packages/dev-console/integration-tests/support/step-definitions/quck-starts/quick-start-devperspective.ts
  • frontend/packages/dev-console/integration-tests/support/step-definitions/userPreferences/user-preferences-dev-perspective.ts
💤 Files with no reviewable changes (14)
  • frontend/packages/dev-console/integration-tests/support/step-definitions/consoleConfiguration/pinned-resources.ts
  • frontend/packages/dev-console/integration-tests/features/perspectives/configure-pinned-resources.feature
  • frontend/packages/dev-console/integration-tests/features/build-config/edit-build-config.feature
  • frontend/packages/dev-console/integration-tests/support/pageObjects/buildConfig-po.ts
  • frontend/packages/dev-console/integration-tests/support/step-definitions/build-config/edit-build-config.ts
  • frontend/packages/dev-console/integration-tests/features/guided-tour/quick-starts/filter-quick-starts-catalog.feature
  • frontend/packages/dev-console/integration-tests/support/step-definitions/getting-started/sample-card-add-page.ts
  • frontend/packages/dev-console/integration-tests/features/getting-started/sample-card-add-page.feature
  • frontend/packages/dev-console/integration-tests/support/step-definitions/quck-starts/quick-start-devperspective.ts
  • frontend/packages/dev-console/integration-tests/support/pageObjects/gettingStarted-po.ts
  • frontend/packages/dev-console/integration-tests/features/guided-tour/quick-starts/quick-start-devperspective.feature
  • frontend/packages/dev-console/integration-tests/support/step-definitions/userPreferences/user-preferences-dev-perspective.ts
  • frontend/packages/dev-console/integration-tests/features/user-preferences/user-preferences-dev-perspective.feature
  • frontend/packages/dev-console/integration-tests/support/step-definitions/quck-starts/filter-quick-starts-catalog.ts

Comment thread frontend/e2e/tests/dev-console/user-preferences.spec.ts
@shahsahil264 shahsahil264 reopened this Jul 8, 2026
@shahsahil264 shahsahil264 force-pushed the CONSOLE-5414 branch 2 times, most recently from 992a64b to b3bbbba Compare July 8, 2026 16:34
Comment thread frontend/e2e/pages/dev-console/quick-starts-page.ts
Comment thread frontend/e2e/pages/dev-console/build-config-page.ts
Comment thread frontend/e2e/tests/dev-console/user-preferences.spec.ts
Comment thread frontend/e2e/pages/dev-console/quick-starts-page.ts
Comment thread frontend/e2e/tests/dev-console/sample-app.spec.ts Outdated
@shahsahil264

Copy link
Copy Markdown
Contributor Author

Still working on this PR, haven't tested it locally
This was meant to be a draft PR, sorry for opening it XD

Migrate 6 dev-console feature areas from Cypress to Playwright:
- Quick starts filter catalog (4 tests)
- Pinned resources (1 smoke test)
- Sample app from Add page (3 tests)
- User preferences (5 tests, skip 6 @broken-test + 1 @Manual)
- Quick starts dev perspective (3 tests)
- Build config edit (2 tests, skip manual + YAML-fixture-dependent)

Create 4 page objects: QuickStartsPage, AddPage, UserPreferencesPage,
BuildConfigPage. Remove 14 migrated Cypress files (6 features, 6 step
definitions, 2 page objects). Shared files (quickStarts-po.ts,
userPreference-po.ts) still imported by other features are preserved.

Tests: 18 total. Guaranteed preference cleanup via afterEach.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rhamilto

rhamilto commented Jul 8, 2026

Copy link
Copy Markdown
Member

/test frontend

- warmupSPA: use perspective-switcher-toggle instead of page-heading
  (Topology view doesn't have page-heading)
- BuildConfig: fix section heading "Image Configuration" → "Images",
  "Git repository URL" → "Git Repo URL"
- User preferences: use data-test field pattern for dropdown selectors,
  fix preference IDs (topology.preferredView, devconsole.preferredResource)
- Topology graph: use data-test-id selector (not data-test)
- YAML preference test: use BuildConfig create form (has synced editor)
  instead of ConfigMap create (no form/YAML toggle in OCP 5.0)

All 21 batch 2 tests now pass on OCP 5.0 CI cluster.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@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.

🧹 Nitpick comments (1)
frontend/e2e/tests/dev-console/quick-starts.spec.ts (1)

45-53: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicate getByTestId('quickstart drawer') locator across steps.

The drawer locator is re-created identically in two separate test.step blocks (Line 46 and Line 51). Hoisting it once at the top of the test avoids the duplication.

♻️ Proposed refactor
     async ({ page }) => {
       await warmupSPA(page);
       const quickStarts = new QuickStartsPage(page);
+      const drawer = page.getByTestId('quickstart drawer');

       await test.step('Navigate to quick starts catalog with quickstart query parameter', async () => {
         await page.goto('/quickstart?quickstart=sample-application');
         await page.waitForLoadState('domcontentloaded');
       });

       await test.step('Verify the quick start sidebar/drawer opens', async () => {
-        const drawer = page.getByTestId('quickstart drawer');
         await expect(drawer).toBeVisible({ timeout: 30_000 });
       });

       await test.step('Verify the correct quick start is shown', async () => {
-        const drawer = page.getByTestId('quickstart drawer');
         await expect(drawer).toContainText('sample application', { ignoreCase: true });
       });
     },
🤖 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/tests/dev-console/quick-starts.spec.ts` around lines 45 - 53,
The quick start drawer locator is duplicated across the two test steps. Hoist
the shared page.getByTestId('quickstart drawer') locator in quick-starts.spec.ts
to a single variable before the test.step blocks, then reuse that same drawer
reference in both the visibility and content assertions to keep the test DRY.
🤖 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.

Nitpick comments:
In `@frontend/e2e/tests/dev-console/quick-starts.spec.ts`:
- Around line 45-53: The quick start drawer locator is duplicated across the two
test steps. Hoist the shared page.getByTestId('quickstart drawer') locator in
quick-starts.spec.ts to a single variable before the test.step blocks, then
reuse that same drawer reference in both the visibility and content assertions
to keep the test DRY.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 2562a92b-2cf6-4443-8c17-d3fa443e08a8

📥 Commits

Reviewing files that changed from the base of the PR and between eade961 and 4e069d3.

📒 Files selected for processing (8)
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/dev-console/build-config-page.ts
  • frontend/e2e/pages/dev-console/quick-starts-page.ts
  • frontend/e2e/pages/dev-console/user-preferences-page.ts
  • frontend/e2e/tests/dev-console/build-config.spec.ts
  • frontend/e2e/tests/dev-console/filter-quick-starts.spec.ts
  • frontend/e2e/tests/dev-console/quick-starts.spec.ts
  • frontend/e2e/tests/dev-console/user-preferences.spec.ts
✅ Files skipped from review due to trivial changes (1)
  • frontend/e2e/pages/base-page.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • frontend/e2e/pages/dev-console/user-preferences-page.ts
  • frontend/e2e/pages/dev-console/build-config-page.ts
  • frontend/e2e/pages/dev-console/quick-starts-page.ts
  • frontend/e2e/tests/dev-console/user-preferences.spec.ts
  • frontend/e2e/tests/dev-console/build-config.spec.ts

@rhamilto

rhamilto commented Jul 9, 2026

Copy link
Copy Markdown
Member

@shahsahil264, it looks like Claude introduced some regressions regarding selectors where it switched to page.locator instead of using page.getByTestId.

shahsahil264 and others added 4 commits July 9, 2026 11:32
- warmupSPA/switchPerspective: use getByTestId() instead of data-test-id CSS selector
- Move inline locators from spec files to page objects per migration rules
- Document PF topology data-test-id exception and Formik ID TODO

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…page

Migration rules require importing test/expect from e2e/fixtures,
not directly from @playwright/test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- BuildConfig name field: use getByRole('textbox', { name: 'Name' })
  instead of Formik-generated #form-input-formData-name-field
- Quick start cards: document #id as PF package exception
  (@patternfly/quickstarts has no data-test on cards)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
getByRole('textbox', { name: 'Name' }) matches both the BC name field
and the env var Name input. Scope to getByTestId('section name') first.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shahsahil264

Copy link
Copy Markdown
Contributor Author

/test backend

@shahsahil264

Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@shahsahil264

Copy link
Copy Markdown
Contributor Author

/retest

@shahsahil264

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

@shahsahil264: The following test 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/frontend 3d7eb57 link true /test frontend

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

component/dev-console Related to dev-console jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants