WIP: CONSOLE-5281: Migrate Cypress E2E tests to Playwright (batch 2)#16454
WIP: CONSOLE-5281: Migrate Cypress E2E tests to Playwright (batch 2)#16454rhamilto wants to merge 2 commits into
Conversation
Migrates all 25 cluster-settings E2E tests from Cypress to Playwright, replacing legacy data-test-id selectors with modern data-test selectors. Test Migration: - Migrated 10 cluster-settings test files to Playwright - Created page objects: ClusterSettingsPage, OAuthPage, DetailsPage, OverviewPage - Moved mocks to e2e/mocks/ - Self-contained tests with route mocking for ClusterVersion data - Added unique data-test attributes for dynamic elements Selector Updates (backward compatible): - Added data-test alongside data-test-id in all components - Updated kebab menus, modal components, IDP tables, and navigation elements - All page objects use getByTestId() for modern selectors Guided Tour Auto-Disable: - Set navigator.userAgent via fixtures/index.ts addInitScript() - Detect INTEGRATION_TEST flag in tour-context.ts to auto-complete tour - Works in all modes: headless, headed, and --ui - Removed all manual tour dismissal code from page objects Test Results: 21/25 passing (4 failures are test isolation issues) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… tests to Playwright Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
@rhamilto: This pull request references CONSOLE-5281 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. DetailsIn response to this:
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. |
|
Skipping CI for Draft Pull Request. |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Includes changes from #16444
Summary
data-testattributes alongside existingdata-test-idattributes on utilization cards, text filter, and console select items to enablegetByTestIdusagecreatePodanddeletePodmethods toKubernetesClientAlertmanagerPagepage object and navigation helpersTests migrated (19 Cypress → 19 Playwright)
integration-tests/tests/crd-extensions/console-cli-download.cy.tse2e/tests/console/crd-extensions/console-cli-download.spec.tsintegration-tests/tests/crd-extensions/console-external-log-link.cy.tse2e/tests/console/crd-extensions/console-external-log-link.spec.tsintegration-tests/tests/crd-extensions/console-link.cy.tse2e/tests/console/crd-extensions/console-link.spec.tsintegration-tests/tests/crd-extensions/console-notification.cy.tse2e/tests/console/crd-extensions/console-notification.spec.tsintegration-tests/tests/crd-extensions/console-yaml-sample.cy.tse2e/tests/console/crd-extensions/console-yaml-sample.spec.tsintegration-tests/tests/events/events.cy.tse2e/tests/console/events/events.spec.tsintegration-tests/tests/favorite/favorite-option.cy.tse2e/tests/console/favorites/favorites.spec.tsintegration-tests/tests/i18n/pseudolocalization.cy.tse2e/tests/console/i18n/pseudolocalization.spec.tsolm/integration-tests/tests/create-namespace.cy.tse2e/tests/olm/create-namespace.spec.tsintegration-tests/tests/alertmanager/alertmanager.cy.tse2e/tests/console/cluster-settings/alertmanager/alertmanager.spec.tsintegration-tests/tests/alertmanager/receivers/email.cy.tse2e/tests/console/cluster-settings/alertmanager/receivers/email.spec.tsintegration-tests/tests/alertmanager/receivers/pagerduty.cy.tse2e/tests/console/cluster-settings/alertmanager/receivers/pagerduty.spec.tsintegration-tests/tests/alertmanager/receivers/slack.cy.tse2e/tests/console/cluster-settings/alertmanager/receivers/slack.spec.tsintegration-tests/tests/alertmanager/receivers/webhook.cy.tse2e/tests/console/cluster-settings/alertmanager/receivers/webhook.spec.tsSource component changes
text-filter.tsx: Addeddata-test="item-filter"alongsidedata-test-idconsole-select.tsx: Changed shareddata-test="console-select-item"to uniquedata-test={console-select-item-${itemKey}}utilization-card.tsx(3 files): Addeddata-test="utilization-card"alongsidedata-test-iduseCRDAdditionalPrinterColumns.ts: Fixedreact-hooks/exhaustive-depslint warningExternalLink.tsx: Addeddata-testattributeTest plan
🤖 Generated with Claude Code