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 - Verify That "Usage Data Collection" Can Be Set In "Cluster Settings" #3647

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

ConorOM1
Copy link
Contributor

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

Description

Migrate ODS-1218 to Cypress

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

  • Tested against ODH-Nightly & RHOAI nightly

image

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 testDataCollection.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/settings/clusterSettings/testDataCollection.cy.ts" --browser chrome

Test Impact:

  • This is already a test

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work

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

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.78%. Comparing base (0ce1fbb) to head (be13397).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3647      +/-   ##
==========================================
- Coverage   85.79%   85.78%   -0.02%     
==========================================
  Files        1419     1419              
  Lines       32688    32688              
  Branches     9195     9195              
==========================================
- Hits        28044    28040       -4     
- Misses       4644     4648       +4     

see 2 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 0ce1fbb...be13397. Read the comment docs.

Copy link
Contributor

@antowaddle antowaddle left a comment

Choose a reason for hiding this comment

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

@ConorOM1 Good work here, 2 very minor comments, otherwise lgtm.


it(
'Verify Usage Data Collection can be Enabled/Disabled',
{ tags: ['@Sanity', '@ODS-1218', '@Dashboard', '@ExcludeOnODH'] },
Copy link
Contributor

Choose a reason for hiding this comment

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

@SanitySet1 - please add this tag also, it's something i wanted to discuss on our call today.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@@ -49,7 +49,7 @@ export const getCustomResource = (
kind: string,
labelSelector: string,
): Cypress.Chainable<CommandLineResult> => {
const ocCommand = `Oc Get kind=${kind}, label_selector=${labelSelector}, namespace=${resourceNamespace}`;
const ocCommand = `oc get ${kind} -l ${labelSelector} -n ${resourceNamespace}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you execute the other related tests that use this function also please? Just to ensure that they are also still working.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see it in use anywhere else at the moment ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I'm doing a search now and seeing the same thing. I think you are good then, apologies.

@antowaddle
Copy link
Contributor

/lgtm

Copy link
Contributor

openshift-ci bot commented Jan 16, 2025

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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 67669d6 into opendatahub-io:main Jan 16, 2025
27 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