CONSOLE-4912: update machine config tests
- Update
machine-config.cy.tsto check exact content and more details
@yapei: This pull request references CONSOLE-4912 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 "4.21.0" version, but no target version was set.
In response to this:
- Update
machine-config.cy.tsto check exact content and more 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 openshift-eng/jira-lifecycle-plugin repository.
Walkthrough
Added a Cypress helper to validate machine-config file details, extended a test to fetch machine-config contents via an oc JSONPath query and verify them in the UI, added an afterEach error check, closed the guided tour in test setup, replaced a hardcoded Info ARIA label with a translated string, and moved the "Info" key in the English locale JSON.
Changes
| Cohort / File(s) | Summary |
|---|---|
Cypress test enhancements frontend/packages/integration-tests-cypress/tests/app/machine-config.cy.ts |
Added checkMachineConfigDetails(mode, overwrite, content) to open the info panel and assert mode, overwrite, and a decoded/truncated snippet of content; added test steps to run oc get mc <MC_WITH_CONFIG_FILES> -o jsonpath='{.spec.config.storage.files[0]}', parse source, mode, overwrite, and pass them to the helper; invoked guidedTour.close() in setup; added afterEach to call checkErrors(). |
UI i18n tweak frontend/public/components/machine-config.tsx |
Replaced a hardcoded Info ARIA label with t('public~Info') using the existing useTranslation hook. |
Locale ordering change frontend/public/locales/en/public.json |
Moved the "Info": "Info" entry within the file (removed prior occurrence and added it after "Overwrite"), preserving the translation key but changing its position. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
- Verify the
oc get ... -o jsonpathinvocation and JSON parsing handle missing or differently-shapedspec.config.storage.files[0]payloads. - Confirm the decoding/truncation used by
checkMachineConfigDetails()matches the UI rendering and encoding expectations. - Ensure the guided tour close and
afterEachcheckErrors()play correctly with other tests and cleanup behavior.
✨ Finishing touches
- [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Comment @coderabbitai help to get the list of available commands and usage tips.
@rhamilto could you help give a review? Thanks!
e2e-gcp-console is failing at other tests, app/machine-config.cy.ts are passing though
@logonoff comments resolved ~ PTAL, thanks!
flaky test
Enable dev perspective: P-01-TC04: Enable dev perspective Enable dev perspective: P-01-TC04
/retest-required
/retest-required
/verified by CI
@yapei: This PR has been marked as verified by CI.
In response to this:
/verified by CI
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.
/retest-required
/retest-required
/label acknowledge-critical-fixes-only /label docs-apporved
@yapei: The label(s) /label docs-apporved cannot be applied. These labels are supported: acknowledge-critical-fixes-only, platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, ux-approved, no-qe, downstream-change-needed, rebase/manual, cluster-config-api-changed, run-integration-tests, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, ok-to-test, plugin-api-approved, plugin-api-changed, stability-fix-approved, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?
In response to this:
/label acknowledge-critical-fixes-only /label docs-apporved
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.
/label px-approved /label docs-approved
/retest-required
Remaining retests: 0 against base HEAD 370e6b0c82e414a473fb3fb30ede556d9b92aee4 and 2 for PR HEAD 1427c04d69975dd234b700614948f7d823ebe757 in total
/retest-required
/retest-required
Remaining retests: 0 against base HEAD 2db4d6278e766aee65982a8d49ecdd5286438511 and 1 for PR HEAD 1427c04d69975dd234b700614948f7d823ebe757 in total
/retest-required
Remaining retests: 0 against base HEAD d93076f2c6250e13f0f9d05ad1e1d5dd22910e75 and 0 for PR HEAD 1427c04d69975dd234b700614948f7d823ebe757 in total
/hold
Revision 1427c04d69975dd234b700614948f7d823ebe757 was retested 3 times: holding
/retest-required
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: logonoff, yapei
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~frontend/OWNERS~~ [logonoff]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest-required
/verified by CI
@yapei: This PR has been marked as verified by CI.
In response to this:
![]()
/verified by CI
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.
/test okd-scos-images
/test okd-scos-images
@yapei: 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/okd-scos-images | 48380cd7a8ff34bc00871d6a830eef06b69e932c | link | true | /test okd-scos-images |
Full PR test history. Your PR dashboard.
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.