-
Notifications
You must be signed in to change notification settings - Fork 187
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 e2e Project Creation/Deletion #3388
Cypress e2e Project Creation/Deletion #3388
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3388 +/- ##
==========================================
- Coverage 85.89% 85.87% -0.02%
==========================================
Files 1338 1338
Lines 30127 30127
Branches 8274 8274
==========================================
- Hits 25877 25872 -5
- Misses 4250 4255 +5 see 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
frontend/src/__tests__/cypress/cypress/tests/e2e/ui/dataScienceProject/verifyDSPCreation.cy.ts
Outdated
Show resolved
Hide resolved
frontend/src/__tests__/cypress/cypress/utils/oc_commands/project.ts
Outdated
Show resolved
Hide resolved
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 @antowaddle for your first PR!
See some suggestions I have.
frontend/src/__tests__/cypress/cypress/fixtures/e2e/dataScienceProject.yaml
Outdated
Show resolved
Hide resolved
frontend/src/__tests__/cypress/cypress/support/commands/application.ts
Outdated
Show resolved
Hide resolved
frontend/src/__tests__/cypress/cypress/support/commands/application.ts
Outdated
Show resolved
Hide resolved
frontend/src/__tests__/cypress/cypress/tests/e2e/ui/dataScienceProject/verifyDSPCreation.cy.ts
Outdated
Show resolved
Hide resolved
frontend/src/__tests__/cypress/cypress/tests/e2e/ui/dataScienceProject/verifyDSPCreation.cy.ts
Outdated
Show resolved
Hide resolved
frontend/src/__tests__/cypress/cypress/utils/oc_commands/project.ts
Outdated
Show resolved
Hide resolved
…dling and changed main test to use new split oc command
cf178b4
to
113d069
Compare
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
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.
Looks good, thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeAlonso, manosnoam The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
// Verify project creation | ||
cy.step(`Verify that the project ${testData.dsProjectName} has been created`); |
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.
Is it normal practice to always have a comment and then a cy.step("") with a string that says the same thing as the comment? Or is it just because the test was written without cy.step initially and the comments are leftovers?
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.
I've intentionally left comments also, in some more intricate tests we may also want to add comments but not necessarily print that information to the console in cy.step.
https://issues.redhat.com/browse/RHOAIENG-14367
Description
Migration of the below Robot test to Cypress
ODS-1775
https://opendatascience-jenkins-csb-rhods.apps.ocp-c1.prod.psi.redhat.com/job/rhoai/job/2.13/job/selfmanaged/job/cli/job/aws/job/rhoai-smoke/1/robot/report/log.html#s1-s4-s2-s4-s1-t3
How Has This Been Tested?
How to run
After exporting the test-variables.yml we have 2 different ways:
Using the UI
Go to odh-dashboard/frontend/src/tests/cypress and run the command npx cypress open . This will open the Cypress UI where verifyDSPCreation.cy.ts can be run.
Headless
Go to odh-dashboard/frontend/src/tests/cypress and run the command npx cypress run --spec "cypress/tests/e2e/dataScienceProjects/testProjectCreation.cy.ts" --browser chrome
How Has This Been Tested?
Locally, against a live cluster.

Test Impact
This is already a test
Self checklist (all need to be checked):
After the PR is posted & before it merges:
main
This PR also introduces a plugin - https://github.com/filiphric/cypress-plugin-steps This plugin will display text contained within cy.step('...') numbered and highlighted on the Cypress Console to allow for improved test bugging, maintainability and readability.
