-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cypress] Fix failed tests in v1.4.0-rc5 and v1.4.0 #1691
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @TachunLin make cypress tests compatible to v1.4.0.
but cypress/.package-lock.json.swp
is not required in this PR, right ?
@@ -153,20 +153,20 @@ export class VmsPage extends CruResourcePo { | |||
|
|||
clickVMSnapshotAction(name: string, snapshotName: string) { | |||
this.clickAction(name, 'Take Virtual Machine Snapshot'); | |||
cy.get('.v--modal-box .card-title').find('h4').contains('Take Virtual Machine Snapshot'); | |||
cy.get('.modal-container .card-title').find('h4').contains('Take Virtual Machine Snapshot'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related PR : harvester/dashboard#1187
Thanks @a110605 for the review and check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Which issue(s) this PR fixes:
Issue #1535
What this PR does / why we need it:
Continue from the previous PR: #1588.
After fixed the cypress script for v1.4.0 string changes, we still have
22
failed tests.This pull request is based on the fix already works on
v1.4.0-rc5
.According to the following result:
And verified the entire cypress test suite on official
v1.4.0
release to improve some flaky and unstable issue.Test Result - fixed the following test cases:
Verified on
v1.4.0
to confirm can PASS the following cypress testsFix all tests in the vmBackup.spec.ts
Fix all tests in the vmSnapshot.spec.ts
Fix all tests in the volumeSnapshot.spec.ts
Fix one test in the hosts.spec.ts
Check edit hosts
Fix one test in the image.spec.ts
Image filtering by labels
Fix two tests in the virtual-machine.spec.ts
VM RunStategy Validation (Halted)
All Namespace filtering in VM list
Fix two tests in the volumes.spec.ts
Support Volume Hot Unplug
Edit volume increase size via form
Setup Test Environment (Similar to the Jenkins pipeline jobs)
We can use the ipxe-example to build the cypress test environment similar with the Jenkins pipeline job.
harvester_cluster_nodes: 3
andrancher_config.enabled: true
Follow the steps to setup docker and minio container service
https://confluence.suse.com/display/HARV/Setup+Harvester+Related+Endpoints#SetupHarvesterRelatedEndpoints-S3
Clone the pr of harvester/tests
Replace the
cypress.env.json
with the following one (Used for the Jenkins pipeline, reduce the time find configuration)Run
npm install
to install depdenciesRun
npm ci
to install cypressThen we can trigger the test from our local environment using
npm run
ornpm open
Special notes for your reviewer:
If you plan to test specific test spec file instead of the entire e2e test run.
Ensure to run the
0_FirstTimeLogin.spec.ts
and1_login.spec.ts
before testing any specific test suite file