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

Add cypress tests to MR secure DB section #3631

Merged

Conversation

ppadti
Copy link
Contributor

@ppadti ppadti commented Jan 10, 2025

followup PR to #3623 and #3618

Description

This PR aims to add cypress test for MR secureDB section and address few bugs mentioned here

How Has This Been Tested?

Test Impact

  1. Run the cypress tests
  2. Also test these scenarios:
  • When fetching certificate names fail, Create model registry button should be disabled
  • PEM upload file under "Upload new certificate" section is readOnly
  • when the first radio option is disabled the form will switch to second option. And when both first and second options are disabled the form selects the third option.

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

@ppadti ppadti force-pushed the RHOAIENG-15900-tests branch from 0ab949a to b663ff1 Compare January 10, 2025 09:36
@ppadti ppadti requested a review from mturley January 10, 2025 09:37
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.40%. Comparing base (c4dfc57) to head (b663ff1).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3631      +/-   ##
==========================================
+ Coverage   85.14%   85.40%   +0.26%     
==========================================
  Files        1406     1406              
  Lines       32298    32313      +15     
  Branches     9060     9067       +7     
==========================================
+ Hits        27499    27596      +97     
+ Misses       4799     4717      -82     
Files with missing lines Coverage Δ
.../modelRegistrySettings/CreateMRSecureDBSection.tsx 96.62% <100.00%> (+37.05%) ⬆️
...nd/src/pages/modelRegistrySettings/CreateModal.tsx 94.81% <100.00%> (+13.86%) ⬆️
.../src/pages/modelRegistrySettings/PemFileUpload.tsx 80.76% <ø> (+76.92%) ⬆️
frontend/src/pages/modelRegistrySettings/utils.ts 100.00% <100.00%> (+53.84%) ⬆️

... and 6 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 c4dfc57...b663ff1. Read the comment docs.

Copy link
Contributor

@manaswinidas manaswinidas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

The tests for scenarios discussed are covered

@@ -51,3 +51,20 @@ export const constructRequestBody = (

return mr;
};

export const isClusterWideCABundleEnabled = (
Copy link
Contributor

@manaswinidas manaswinidas Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may require unit tests but codecov didn't catch this.. so we can maybe ignore the unit tests.. the cypress tests cover this scenario.

Copy link
Contributor

@mturley mturley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks guys!

Copy link
Contributor

openshift-ci bot commented Jan 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mturley

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-merge-bot openshift-merge-bot bot merged commit d339863 into opendatahub-io:main Jan 10, 2025
6 checks passed
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.

3 participants