Skip to content
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 Test - Multiple Project Creation Negative Tests #3696

Merged

Conversation

antowaddle
Copy link
Contributor

@antowaddle antowaddle commented Jan 29, 2025

https://issues.redhat.com/browse/RHOAIENG-17501

Description

  • Migrate ODS-1783 & ODS-1875 to Cypress
  • These tests validate negative scenarios relating to project creation
    • Validating that a project cannot be created without a Project Name
    • Validating that a project cannot be created with invalid Resource Names, this test iterates through an array of resource names with both special characters and extra long names

How Has This Been Tested?

  • An oc login should be performed in the cluster before running the test
  • test-variables.yml should be configured properly
  • Export the path to the test-variables.yml: $ export CY_TEST_CONFIG=<path_to>/test-variables.yml
  • Locally against a PSI cluster and ODH-Nightly
    image

Test Impact

  • None - this is a test

How to run?
Go to odh-dashboard/frontend/src/tests/cypress and run the command npx cypress open . This will open the Cypress UI where testProjectCreation.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

or Execute 'npx cypress run --env grepTags=@ODS-1783' and 'npx cypress run --env grepTags=@ODS-1875'

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

antowaddle and others added 30 commits November 20, 2024 17:07
increase card timeout and delete active wait
antowaddle and others added 3 commits January 22, 2025 09:22
…pendatahub-io#3662)

* Initial WIP version of resource creation test

* Experimental changes to poll the UI for updates

* Working version if resource is present

* increase card timeout and delete active wait

* Added changes to find namespace from variables

* Final changes to read variables, cleaned up utils

* Small change to a comment

* Dummy change to trigger mocks

* Save changes on cypress-RHOAIENG-12649

* Changed file directories and names as requested on a PR comment

* Saving changes to current branch

* Additional directory/file name changes

* Additional changes to save

* Resolving timeout issue breaking mock tests, also resolved latest PR comments

* Further changes for this test

* Changes to revert the exist method appended to getCardView.

* Fixed linting

* Linting fixes

* Final comments added

* Fixed merge conflict

* Small change to page object name

* dummy commit

* Removed RHOAI bug workaround

* Removed comments

* Last comment change

* Committing intermediate changes

* Initial changes

* Initial changes

* Messy working test

* Committing working test - not linted/cleaned up

* Committing working test with exception of status check on UI

* Committing fully working test on RHOAI

* Linting fixes

* Adding in description for bug relating to manifest links

* Actioning PR comments

* Comitting initial changes

* Comitting working test for Single Model Creation

* Comitting final completed test

* Small amendment to select model server on ODH

* Linting after merge conflict resolution

---------

Co-authored-by: Fede Alonso <fealonso@redhat.com>

made wording more consistent in storage dialog (opendatahub-io#3665)

remove deprecated enabled nvidia manifest from rhoai (opendatahub-io#3666)

Co-authored-by: “Bob <“bgregor@redhat.com”>

Add Exclusions to Cypress e2e Nightly Executions (opendatahub-io#3671)

* Initial WIP version of resource creation test

* Experimental changes to poll the UI for updates

* Working version if resource is present

* increase card timeout and delete active wait

* Added changes to find namespace from variables

* Final changes to read variables, cleaned up utils

* Small change to a comment

* Dummy change to trigger mocks

* Save changes on cypress-RHOAIENG-12649

* Changed file directories and names as requested on a PR comment

* Saving changes to current branch

* Additional directory/file name changes

* Additional changes to save

* Resolving timeout issue breaking mock tests, also resolved latest PR comments

* Further changes for this test

* Changes to revert the exist method appended to getCardView.

* Fixed linting

* Linting fixes

* Final comments added

* Fixed merge conflict

* Small change to page object name

* dummy commit

* Removed RHOAI bug workaround

* Removed comments

* Last comment change

* Initial commit

* Fixed linting

* adding package json

* Swapped out cypress:run for cypress:e2e

---------

Co-authored-by: Fede Alonso <fealonso@redhat.com>

Adds required to environment variables (opendatahub-io#3653)

* Adds required to environment variables

* Accessibility fix

Fix for notebook route link font size (opendatahub-io#3678)

Update the positions of DW tabs (opendatahub-io#3677)

Add default deployment mode selector as read only (opendatahub-io#3664)

* Add default deployment mode selector read only

* Use DashboardHelpTooltip and fix popper width

Fix for page header layout when page has long description (opendatahub-io#3679)

Update ownedByDSC to use correct label for checking what is created by operator (opendatahub-io#3682)

feat: remove the NIM tile from Enabled page (opendatahub-io#3663)

* feat: remove the NIM tile from Enabled page

Signed-off-by: Olga Lavtar <olavtar@redhat.com>

* fix: rename function

Signed-off-by: Olga Lavtar <olavtar@redhat.com>

* fix: add space after the here.

Signed-off-by: Olga Lavtar <olavtar@redhat.com>

---------

Signed-off-by: Olga Lavtar <olavtar@redhat.com>

fix: label update for nim project from single serving to NVIDIA NIM Serving Enabled (opendatahub-io#3680)

* fix: label update for nim from single serving to NVIDIA NIM Serving Enabled

Signed-off-by: Olga Lavtar <olavtar@redhat.com>

* fix: label update

Signed-off-by: Olga Lavtar <olavtar@redhat.com>

* fix: label update

Signed-off-by: Olga Lavtar <olavtar@redhat.com>

* fix: fix cypress test

Signed-off-by: Olga Lavtar <olavtar@redhat.com>

---------

Signed-off-by: Olga Lavtar <olavtar@redhat.com>

fix: move the permissions from the cluster-role to the role yaml file (opendatahub-io#3687)

Signed-off-by: Olga Lavtar <olavtar@redhat.com>

Apply hardware profile to notebook image settings table (opendatahub-io#3645)

* Apply hardware profile to notebook image settings table

* address comment

* add name tooltip for the hardware profile table

* Reuse recommended accelerator annotation for hardware profiles

* Change name resource field to fix layout issues

* fix tests

refractor UsageBar and StorageSizeBar (opendatahub-io#3667)

Hardware Profile Display Name is not trimmed (opendatahub-io#3670)

Name, resource label, tolerations and Node selector fields - Unlimited size string (opendatahub-io#3672)

CVE-2025-22150 odh-dashboard-container: Undici Uses Insufficiently Random Values [main] (opendatahub-io#3685)
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress This PR is in WIP state label Jan 29, 2025
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.16%. Comparing base (240a695) to head (b0552c0).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3696   +/-   ##
=======================================
  Coverage   84.15%   84.16%           
=======================================
  Files        1453     1453           
  Lines       33866    33866           
  Branches     9384     9384           
=======================================
+ Hits        28500    28503    +3     
+ Misses       5366     5363    -3     

see 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 240a695...b0552c0. Read the comment docs.

@antowaddle antowaddle changed the title WIP - Cypress e2e Test - Multiple Project Creation Negative Tests Cypress e2e Test - Multiple Project Creation Negative Tests Jan 29, 2025
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress This PR is in WIP state label Jan 29, 2025
@ConorOM1
Copy link
Contributor

/lgtm

@ConorOM1
Copy link
Contributor

/lgtm

@manosnoam manosnoam self-requested a review January 30, 2025 14:33
Copy link
Contributor

openshift-ci bot commented Jan 30, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot removed the lgtm label Jan 30, 2025
Copy link
Contributor

openshift-ci bot commented Jan 30, 2025

New changes are detected. LGTM label has been removed.

@openshift-merge-bot openshift-merge-bot bot merged commit 791a8b5 into opendatahub-io:main Jan 30, 2025
29 checks passed
@antowaddle antowaddle deleted the cypress-RHOAIENG-17501 branch January 30, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants