Skip to content

[WIP] CONSOLE-5277: Migrate console e2e CRUD tests to Playwright#16556

Open
rhamilto wants to merge 20 commits into
openshift:mainfrom
rhamilto:CONSOLE-5277
Open

[WIP] CONSOLE-5277: Migrate console e2e CRUD tests to Playwright#16556
rhamilto wants to merge 20 commits into
openshift:mainfrom
rhamilto:CONSOLE-5277

Conversation

@rhamilto

@rhamilto rhamilto commented Jun 5, 2026

Copy link
Copy Markdown
Member

PR includes changes from #16544, which should merge first.

Analysis / Root cause:
CONSOLE-5277 — Migrate 7 Cypress test files (20 tests) from packages/integration-tests/tests/crud/ to Playwright under e2e/tests/console/crud/.

Solution description:
Migrates all CRUD Cypress tests to Playwright with full feature parity:

Cypress file Playwright spec Tests
resource-crud.cy.ts resource-crud.spec.ts 21 resource types × 6 CRUD steps (create, details, list, search, edit, delete)
namespace-crud.cy.ts namespace-crud.spec.ts 3 (list/create/delete, nav namespace preservation × 2)
customresourcedefinition.cy.ts customresourcedefinition.spec.ts 1 (CRD + CR lifecycle)
annotations.cy.ts annotations.spec.ts 2 (CRUD + external change detection)
labels.cy.ts labels.spec.ts 2 (add/verify/search + external change detection)
environment.cy.ts environment.spec.ts 3 (env vars, configmap, secret)
bulk-create-resources.cy.ts bulk-create-resources.spec.ts 3 (duplicate, missing ns, success)

Key infrastructure added:

  • Page objects: ListPage, ModalPage, YamlEditorPage (new); extended BasePage, DetailsPage, Navigation
  • Utilities: testA11y (axe-core a11y), testI18n (pseudolocalization), generateTestName (DNS-safe names)
  • KubernetesClient: createConfigMap, createSecret, createClusterCustomResource, deleteClusterCustomResource, annotateConfigMap, labelConfigMap, mergePatchResource
  • CleanupFixture: trackClusterCustomResource for non-namespaced resource cleanup
  • React components: Added data-test attributes alongside legacy data-test-id/data-test-action in ActionMenuItem, Breadcrumbs, modal cancel buttons, name-value-editor
  • Dependency: @axe-core/playwright for accessibility testing

All tests run in parallel with test.describe.configure({ mode: 'parallel' }) where applicable (resource-crud runs 21 tests across 4 workers in ~3min vs ~6min serial).

Screenshots / screen recording:
N/A — test migration, no UI changes

Test setup:

cd frontend
npx playwright test --project=console e2e/tests/console/crud/ --workers=4

Test cases:

  • All 35 Playwright tests pass against a live OpenShift cluster
  • Original 7 Cypress test files deleted
  • npx tsc --noEmit -p e2e/tsconfig.json — zero errors
  • yarn eslint on all new/modified files — zero warnings

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

Summary by CodeRabbit

  • Tests

    • Added extensive Playwright e2e suites covering resource CRUD, ConfigMaps/Secrets, annotations, labels, environment variables, namespaces, bulk import, accessibility and i18n checks.
  • Chores

    • Removed legacy Cypress suites; added Playwright accessibility tooling to dev dependencies and enhanced test cleanup for cluster-scoped resources.
  • New Test Helpers

    • Added page objects and utilities for editor, list, modal, navigation, YAML editor, a11y, i18n, and test-name generation.
  • Style

    • Added consistent data-test attributes to UI elements to improve test reliability.

Migrate all 5 CRUD Cypress test files to Playwright:

- other-routes.cy.ts → other-routes.spec.ts (error page, API explorer,
  cluster settings routes, perspective query parameters)
- quotas.cy.ts → quotas.spec.ts (ResourceQuota and ClusterResourceQuota
  creation via YAML editor, list filtering across projects)
- roles-rolebindings.cy.ts → roles-rolebindings.spec.ts (Role and
  ClusterRole creation via YAML editor, RoleBinding and
  ClusterRoleBinding creation via form, rules table columns, breadcrumb
  project dropdown restoration)
- image-pull-secret.cy.ts → image-pull-secret.spec.ts (image pull
  secret creation via form, whitespace trimming validation)
- add-storage-crud.cy.ts → add-storage-crud.spec.ts (workload creation
  via YAML editor, add storage via Actions dropdown, volume table
  verification)

Infrastructure:
- Extract shared Monaco editor helpers to base-page.ts
- Add cluster-scoped create/delete to KubernetesClient
- Add cluster resource tracking to cleanup fixture
- Add data-test alongside data-test-id on Breadcrumbs, actions menu
  button, kebab items, ActionMenuItem, and ActionMenuContent
- Add data-test to attach-pvc-storage submit button
- New page objects: RoleBindingPage, ListPage
- Extend DetailsPage with clickPageAction and getBreadcrumb

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 5, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references CONSOLE-5277 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 story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Analysis / Root cause:
CONSOLE-5277 — Migrate 7 Cypress test files (20 tests) from packages/integration-tests/tests/crud/ to Playwright under e2e/tests/console/crud/.

Solution description:
Migrates all CRUD Cypress tests to Playwright with full feature parity:

Cypress file Playwright spec Tests
resource-crud.cy.ts resource-crud.spec.ts 21 resource types × 6 CRUD steps (create, details, list, search, edit, delete)
namespace-crud.cy.ts namespace-crud.spec.ts 3 (list/create/delete, nav namespace preservation × 2)
customresourcedefinition.cy.ts customresourcedefinition.spec.ts 1 (CRD + CR lifecycle)
annotations.cy.ts annotations.spec.ts 2 (CRUD + external change detection)
labels.cy.ts labels.spec.ts 2 (add/verify/search + external change detection)
environment.cy.ts environment.spec.ts 3 (env vars, configmap, secret)
bulk-create-resources.cy.ts bulk-create-resources.spec.ts 3 (duplicate, missing ns, success)

Key infrastructure added:

  • Page objects: ListPage, ModalPage, YamlEditorPage (new); extended BasePage, DetailsPage, Navigation
  • Utilities: testA11y (axe-core a11y), testI18n (pseudolocalization), generateTestName (DNS-safe names)
  • KubernetesClient: createConfigMap, createSecret, createClusterCustomResource, deleteClusterCustomResource, annotateConfigMap, labelConfigMap, mergePatchResource
  • CleanupFixture: trackClusterCustomResource for non-namespaced resource cleanup
  • React components: Added data-test attributes alongside legacy data-test-id/data-test-action in ActionMenuItem, Breadcrumbs, modal cancel buttons, name-value-editor
  • Dependency: @axe-core/playwright for accessibility testing

All tests run in parallel with test.describe.configure({ mode: 'parallel' }) where applicable (resource-crud runs 21 tests across 4 workers in ~3min vs ~6min serial).

Screenshots / screen recording:
N/A — test migration, no UI changes

Test setup:

cd frontend
npx playwright test --project=console e2e/tests/console/crud/ --workers=4

Test cases:

  • All 35 Playwright tests pass against a live OpenShift cluster
  • Original 7 Cypress test files deleted
  • npx tsc --noEmit -p e2e/tsconfig.json — zero errors
  • yarn eslint on all new/modified files — zero warnings

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

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.

@rhamilto rhamilto changed the title CONSOLE-5277: Migrate console e2e CRUD tests to Playwright [WIP] CONSOLE-5277: Migrate console e2e CRUD tests to Playwright Jun 5, 2026
@coderabbitai

coderabbitai Bot commented Jun 5, 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

Migrates E2E from Cypress to Playwright: adds Kubernetes client merge-patch and cluster CR helpers, Playwright page objects and utilities, accessibility/i18n helpers, many Playwright specs, UI test-selector tweaks, and removes legacy Cypress specs.

Changes

E2E Test Infrastructure Modernization

Layer / File(s) Summary
Kubernetes client and cleanup
frontend/e2e/clients/kubernetes-client.ts, frontend/e2e/fixtures/cleanup-fixture.ts, frontend/package.json
KubernetesClient adds ConfigMap/Secret creation, merge-patch HTTPS method, annotate/label wrappers, and cluster-scoped custom resource helpers; CleanupFixture tracks and deletes cluster-scoped CRs; @axe-core/playwright added.
Playwright page objects & navigation
frontend/e2e/pages/base-page.ts, frontend/e2e/pages/details-page.ts, frontend/e2e/pages/list-page.ts, frontend/e2e/pages/modal-page.ts, frontend/e2e/pages/yaml-editor-page.ts, frontend/e2e/pages/navigation.ts
New/extended page objects provide Monaco editor read/write, action/breadcrumb access, list filtering/kebab actions, modal synchronization, YAML editor readiness, and mid-test sidebar navigation.
Test utilities: accessibility, i18n, test-name
frontend/e2e/utils/a11y.ts, frontend/e2e/utils/i18n.ts, frontend/e2e/utils/test-name.ts
Accessibility check via Axe, pseudolocalization verification helper, and a random test-name generator for isolated test resources.
Playwright E2E test specifications
frontend/e2e/tests/console/crud/*
New Playwright suites covering annotations, bulk import, CRD lifecycle, environment editor flows, labels, namespace CRUD, and generalized resource CRUD (with a11y/i18n checks).
UI test selectors and small UI edits
frontend/packages/console-shared/..., frontend/public/components/...
Added consistent data-test attributes for action menu items, breadcrumbs, modal cancel buttons, tags, and form inputs; minor JSX formatting changes to preserve behavior while enabling selectors.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested labels

ok-to-test, kind/i18n

Suggested reviewers

  • spadgett
  • sg00dwin
  • cajieh

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning, 1 inconclusive)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error PR logs Kubernetes API error messages to console in cleanup fixtures, potentially exposing sensitive authentication/authorization details. Filter logged error messages to exclude API response details that could contain sensitive authentication or authorization information.
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.
Test Structure And Quality ❓ Inconclusive The custom check targets Ginkgo tests (Go/BeforeEach/AfterEach/Eventually), but this PR contains Playwright tests (JavaScript/TypeScript). The check is not applicable to this codebase. The custom check is written for Ginkgo test framework, but this PR migrates Cypress tests to Playwright. Please clarify if check should assess Playwright test quality instead.
✅ Passed checks (12 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: migrating Cypress CRUD tests to Playwright for CONSOLE-5277. It's specific and directly related to the changeset.
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 test titles use static, deterministic strings. generateTestName() is only used in test bodies to create resource names, not in test titles.
Microshift Test Compatibility ✅ Passed This PR adds Playwright e2e tests (TypeScript), not Ginkgo e2e tests (Go). The MicroShift compatibility check specifically targets Ginkgo tests and is not applicable here.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR adds Playwright UI e2e tests, not Ginkgo cluster tests. The SNO compatibility check applies only to Ginkgo-based cluster infrastructure tests.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only frontend e2e test code and React UI test selectors; no deployment manifests, operator code, or controllers changed, making this check inapplicable.
Ote Binary Stdout Contract ✅ Passed PR contains only frontend TypeScript/JavaScript code (Playwright tests, React components, page objects, utilities). No Go files or binary startup code are modified; check is not applicable.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR adds Playwright (TypeScript) e2e tests, not Ginkgo (Go) tests. Custom check applies only to Ginkgo tests, making it not applicable to this PR.
No-Weak-Crypto ✅ Passed No weak cryptographic algorithms (MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB), custom crypto implementations, or insecure secret comparisons found in PR changes.
Container-Privileges ✅ Passed PR contains no Kubernetes/container manifests; only E2E test code, React components, and package.json. Container-privileges check does not apply.
Description check ✅ Passed The PR description is comprehensive and well-structured, covering analysis, solution details, test setup, and validation results.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 5, 2026
@openshift-ci openshift-ci Bot requested review from sg00dwin and spadgett June 5, 2026 16:01
@openshift-ci openshift-ci Bot added the component/core Related to console core functionality label Jun 5, 2026
@openshift-ci

openshift-ci Bot commented Jun 5, 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

@openshift-ci openshift-ci Bot added component/shared Related to console-shared approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cypress Related to Cypress e2e integration testing labels Jun 5, 2026

@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: 3

🤖 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/clients/kubernetes-client.ts`:
- Around line 403-441: The PATCH request in mergePatchResource currently can
hang because the https.request has no timeout; update the request created in
mergePatchResource to fail fast by calling req.setTimeout(...) (choose a
sensible timeout, e.g. 30_000 ms or a configurable constant) and in the timeout
handler call req.destroy(new Error('Request timed out')) (or similar) so the
Promise rejects via the existing req.on('error') handler; ensure you add the
timeout before writing the body and clean up the timeout on success/failure.

In `@frontend/e2e/pages/navigation.ts`:
- Around line 29-31: The locator read of aria-expanded on sectionButton can race
with rendering; before calling sectionButton.getAttribute('aria-expanded') wait
for the button to be visible (e.g. await sectionButton.waitFor({ state:
'visible' }) or an equivalent visibility wait) so the attribute read is stable;
update the code that references sectionButton and getAttribute('aria-expanded')
to perform this visibility wait first.

In `@frontend/e2e/tests/console/crud/annotations.spec.ts`:
- Line 12: The tests use a shared constant configmapName ('example') which can
cause cross-test races; update the tests in annotations.spec.ts to generate a
unique per-test ConfigMap name inside each test (e.g., build from test title or
append a UUID/timestamp) and replace the module-level configmapName usage with
that per-test variable throughout each test flow (create/verify/delete). Also
register the created ConfigMap with the Playwright per-test cleanup fixture so
deletion is scoped to the test; update references to functions/assertions that
currently read the module-level configmapName to use the new per-test variable
instead.
🪄 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: a639b307-4f1a-4d77-af7a-ce240c888833

📥 Commits

Reviewing files that changed from the base of the PR and between 6288ca2 and 1119e5e.

⛔ Files ignored due to path filters (1)
  • frontend/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (34)
  • frontend/e2e/clients/kubernetes-client.ts
  • frontend/e2e/fixtures/cleanup-fixture.ts
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/pages/details-page.ts
  • frontend/e2e/pages/list-page.ts
  • frontend/e2e/pages/modal-page.ts
  • frontend/e2e/pages/navigation.ts
  • frontend/e2e/pages/yaml-editor-page.ts
  • frontend/e2e/tests/console/crud/annotations.spec.ts
  • frontend/e2e/tests/console/crud/bulk-create-resources.spec.ts
  • frontend/e2e/tests/console/crud/customresourcedefinition.spec.ts
  • frontend/e2e/tests/console/crud/environment.spec.ts
  • frontend/e2e/tests/console/crud/labels.spec.ts
  • frontend/e2e/tests/console/crud/namespace-crud.spec.ts
  • frontend/e2e/tests/console/crud/resource-crud.spec.ts
  • frontend/e2e/utils/a11y.ts
  • frontend/e2e/utils/i18n.ts
  • frontend/e2e/utils/test-name.ts
  • frontend/package.json
  • frontend/packages/console-shared/src/components/actions/menu/ActionMenuItem.tsx
  • frontend/packages/console-shared/src/components/breadcrumbs/Breadcrumbs.tsx
  • frontend/packages/console-shared/src/components/modals/CreateNamespaceModal.tsx
  • frontend/packages/integration-tests/tests/crud/annotations.cy.ts
  • frontend/packages/integration-tests/tests/crud/bulk-create-resources.cy.ts
  • frontend/packages/integration-tests/tests/crud/customresourcedefinition.cy.ts
  • frontend/packages/integration-tests/tests/crud/environment.cy.ts
  • frontend/packages/integration-tests/tests/crud/labels.cy.ts
  • frontend/packages/integration-tests/tests/crud/namespace-crud.cy.ts
  • frontend/packages/integration-tests/tests/crud/resource-crud.cy.ts
  • frontend/public/components/modals/delete-modal.tsx
  • frontend/public/components/modals/delete-namespace-modal.tsx
  • frontend/public/components/modals/labels-modal.tsx
  • frontend/public/components/modals/tags.tsx
  • frontend/public/components/utils/name-value-editor.tsx
💤 Files with no reviewable changes (7)
  • frontend/packages/integration-tests/tests/crud/annotations.cy.ts
  • frontend/packages/integration-tests/tests/crud/customresourcedefinition.cy.ts
  • frontend/packages/integration-tests/tests/crud/environment.cy.ts
  • frontend/packages/integration-tests/tests/crud/namespace-crud.cy.ts
  • frontend/packages/integration-tests/tests/crud/labels.cy.ts
  • frontend/packages/integration-tests/tests/crud/resource-crud.cy.ts
  • frontend/packages/integration-tests/tests/crud/bulk-create-resources.cy.ts

Comment thread frontend/e2e/clients/kubernetes-client.ts
Comment thread frontend/e2e/pages/navigation.ts
import { YamlEditorPage } from '../../../pages/yaml-editor-page';
import { generateTestName } from '../../../utils/test-name';

const configmapName = 'example';

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use per-test ConfigMap names to avoid cross-test collisions.

Both tests operate on configmapName = 'example' in the same shared namespace. In parallel/failed-run scenarios this can race (create/delete conflicts) and make the suite flaky. Generate a unique ConfigMap name inside each test (or include test-specific suffix) and use that value throughout the test steps.

Suggested patch pattern
-const configmapName = 'example';
@@
   test('creates, edits, updates, and deletes annotations', async ({ page }) => {
+    const configmapName = `${generateTestName()}-cm`;
@@
   test('disables Save when annotations change externally', async ({ page, k8sClient }) => {
+    const configmapName = `${generateTestName()}-cm`;

Based on learnings: “Use the per-test Playwright cleanup fixture when each test creates its own resources and needs isolated create/cleanup.”

Also applies to: 39-234

🤖 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/console/crud/annotations.spec.ts` at line 12, The tests
use a shared constant configmapName ('example') which can cause cross-test
races; update the tests in annotations.spec.ts to generate a unique per-test
ConfigMap name inside each test (e.g., build from test title or append a
UUID/timestamp) and replace the module-level configmapName usage with that
per-test variable throughout each test flow (create/verify/delete). Also
register the created ConfigMap with the Playwright per-test cleanup fixture so
deletion is scoped to the test; update references to functions/assertions that
currently read the module-level configmapName to use the new per-test variable
instead.

CI fixes:
- quotas.spec.ts: use waitForTableLoad instead of waitForListLoad
  before filterByName to ensure DataView is loaded
- quotas.spec.ts: use selectAllProjects() instead of
  selectProject('All Projects') which fails in search filter
- ListPage: add waitForTableLoad, selectAllProjects methods
- ListPage.filterByName: check if filter input is already visible
  before clicking the DataViewFilters dropdown toggle

CodeRabbit feedback:
- DetailsPage.clickPageAction: fall back to data-test-action when
  data-test is absent for legacy action menu items
- kebab.tsx: only set data-test when option.label is a string to
  avoid [object Object] values from ReactNode labels

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rhamilto

rhamilto commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

/retest

rhamilto and others added 2 commits June 8, 2026 09:36
Add serial mode to ensure all tests run in the same worker sharing
the beforeAll namespace. Use unique resource names with Date.now()
suffix to prevent strict mode violations from leftover resources
of prior test runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use kindForReference as fallback text when the model hasn't loaded
yet, ensuring the accordion toggle button always has discernible text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rhamilto

rhamilto commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

/test e2e-playwright

@rhamilto

rhamilto commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

/test e2e-gcp-console

rhamilto and others added 2 commits June 8, 2026 13:06
- Import expect from e2e/fixtures instead of @playwright/test in a11y.ts
- Use DetailsPage.getBreadcrumb() instead of raw locators in quotas.spec.ts
- Use listPage.selectAllProjects() consistently in roles-rolebindings.spec.ts
- Add serial mode to roles-rolebindings.spec.ts for CI stability
- Add data-test attributes to volumes-table.tsx and use getByTestId in spec

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pull in improvements from PR 16556 so this PR can merge first and
16556 can rebase cleanly without conflicts.

- base-page: add waitForFunction guard to Monaco editor helpers
- details-page: simplify clickPageAction, use getByTestId in clickKebabAction
- list-page: add legacy locators/methods, getters, kebab actions,
  showSystemSwitch toggle, and waitForTableLoad legacy fallback
- kubernetes-client: add createConfigMap, createSecret, mergePatchResource,
  annotateConfigMap, labelConfigMap
- cleanup-fixture: align trackClusterCustomResource type default
- crd-test-utils: fix expect import to use fixtures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rhamilto and others added 7 commits June 8, 2026 14:30
Migrates the parameterized resource CRUD lifecycle test (21 resource
types × 6 steps each) from Cypress to Playwright with full feature
parity including a11y checks, i18n pseudolocalization verification,
and parallel execution support.

New page objects: ListPage, ModalPage, YamlEditorPage
New utilities: a11y (axe-core), i18n (pseudolocalization)
Extended: BasePage (YAML editor helpers), DetailsPage (breadcrumbs,
page actions), KubernetesClient (cluster-scoped CRUD),
CleanupFixture (cluster-scoped resource tracking)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrates the namespace CRUD lifecycle test (3 tests) covering
namespace list/create/delete, nav link namespace preservation,
and breadcrumb namespace preservation.

Corrects the "All Projects" restoration assertion — the Console
preserves the last-used namespace, not "All Projects", when
navigating back via nav link or breadcrumb.

Extended: ListPage (clickFirstLinkInFirstRow, getFirstCellText,
selectAllProjects, selectProject with system namespace toggle),
Navigation (clickNavLink for mid-test nav), ModalPage (wait for
enabled before submit), DetailsPage (breadcrumb legacy selector fix)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ight

Migrates the CRD CRUD lifecycle test covering CRD creation via YAML
editor, viewing instances, creating a custom resource, and deleting
the CRD via kebab action.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mirrors the Cypress testName helper — generates a random lowercase
alphabetic string prefixed with "test" that is safe for use in
Kubernetes resource names, CRD shortNames, and namespace names
without any post-processing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrates the annotations CRUD test (2 tests) covering annotation
create/edit/update/delete via the modal, and external annotation
change detection (save button disabled + info alert).

Adds data-test attributes alongside legacy data-test-action,
data-test-id attributes in ActionMenuItem, Breadcrumbs,
delete-modal, delete-namespace-modal, CreateNamespaceModal, and
tags modal so all page objects use getByTestId() exclusively.

Extended: KubernetesClient (createConfigMap, annotateConfigMap via
raw merge-patch HTTP request)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrates the label editing test (2 tests) covering label
add/verify/search-navigation via the modal, and external label
change detection (save button disabled + info alert).

Adds data-test attribute to labels modal cancel button. Refactors
KubernetesClient merge-patch into a shared mergePatchResource
helper used by both annotateConfigMap and new labelConfigMap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrates the environment variable editor test (3 tests) covering
add/delete plain env vars, env vars from ConfigMap, and env vars
from Secret.

Uses click-based navigation (sidebar → list → row → tab) instead
of direct URL navigation to avoid Console "Model does not exist"
errors when the SPA model cache is cold.

Adds data-test attributes to env-prefix and pairs-list__delete-from-btn
in name-value-editor. Extended: KubernetesClient (createSecret)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rhamilto and others added 7 commits June 8, 2026 14:32
Migrates the bulk import test (3 tests) covering duplicate YAML
validation, missing namespace server validation, and successful
multi-resource import with result verification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- mergePatchResource: add proxy agent support for CI environments
- setEditorContent/getEditorContent: wait for Monaco model readiness
  before reading/writing to avoid silent no-ops
- testI18n: add null check for browser reference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- mergePatchResource: add 30s request timeout to fail fast on
  stalled connections instead of hanging indefinitely
- clickNavLink: wait for nav section button visibility before
  reading aria-expanded to avoid race with sidebar rendering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds data-test="modal-cancel-action" alongside the existing
data-test-id on the PVC delete modal cancel button so
getByTestId() can find it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Kebab and Actions menu items use data-test-action, not data-test.
Using getByTestId matched the wrong attribute, causing timeouts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add data-test alongside existing data-test-action attributes so
Playwright tests can use page.getByTestId() per migration guidelines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add data-test="modal-cancel-action" to 13 modal cancel buttons so
Playwright's getByTestId() (configured for data-test) can locate them.

Fix CRD test: remove conflicting listKind and use retry-based
navigation to the instances page to handle API discovery timing.

Fix labels test: use regex alternation (~ |%7E) instead of a character
class for the tilde-encoded URL segment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rhamilto

rhamilto commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@rhamilto

rhamilto commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

/retest

@openshift-ci

openshift-ci Bot commented Jun 8, 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/analyze 4ce3fdc link true /test analyze
ci/prow/frontend 4ce3fdc link true /test frontend
ci/prow/e2e-gcp-console 4ce3fdc link true /test e2e-gcp-console
ci/prow/e2e-playwright 4ce3fdc link false /test e2e-playwright
ci/prow/okd-scos-images 4ce3fdc link true /test okd-scos-images
ci/prow/images 4ce3fdc link true /test images

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. component/core Related to console core functionality component/shared Related to console-shared do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/cypress Related to Cypress e2e integration testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants