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 - Verifies users can create, edit and delete a Persistent Volume #3689

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
cacbfe5
Initial WIP version of resource creation test
antowaddle Nov 20, 2024
0fa2201
Experimental changes to poll the UI for updates
antowaddle Nov 21, 2024
af87ad1
Working version if resource is present
antowaddle Nov 21, 2024
0e9868a
increase card timeout and delete active wait
FedeAlonso Nov 21, 2024
429f086
Merge pull request #1 from FedeAlonso/fix/active_wait
antowaddle Nov 21, 2024
443e530
Added changes to find namespace from variables
antowaddle Nov 22, 2024
966917f
Final changes to read variables, cleaned up utils
antowaddle Nov 22, 2024
69db944
Merge branch 'main' into cypress-RHOAIENG-14368
antowaddle Nov 22, 2024
a9ecfa3
Small change to a comment
antowaddle Nov 22, 2024
6cd6a3e
Dummy change to trigger mocks
antowaddle Nov 22, 2024
fcc6d18
Merge branch 'opendatahub-io:main' into main
antowaddle Nov 22, 2024
c7d471a
Merge branch 'main' into cypress-RHOAIENG-14368
antowaddle Nov 22, 2024
7628316
Save changes on cypress-RHOAIENG-12649
antowaddle Nov 25, 2024
847ad11
Changed file directories and names as requested on a PR comment
antowaddle Nov 25, 2024
552a516
Merge branch 'main' into cypress-RHOAIENG-14368
antowaddle Nov 25, 2024
80cc894
Merge branch 'cypress-RHOAIENG-14368' of https://github.com/antowaddl…
antowaddle Nov 25, 2024
163ed94
Merge remote-tracking branch 'origin/main' into cypress-RHOAIENG-12649
antowaddle Nov 25, 2024
0f7eead
Saving changes to current branch
antowaddle Nov 25, 2024
48c7435
Additional directory/file name changes
antowaddle Nov 25, 2024
14a39de
Additional changes to save
antowaddle Nov 25, 2024
6a93ec2
Resolving timeout issue breaking mock tests, also resolved latest PR …
antowaddle Nov 25, 2024
31b9723
Further changes for this test
antowaddle Nov 25, 2024
f2b636d
Changes to revert the exist method appended to getCardView.
antowaddle Nov 25, 2024
a9feb1b
Fixed linting
antowaddle Nov 25, 2024
aa9430e
Linting fixes
antowaddle Nov 25, 2024
eddd7d8
Merge branch 'main' into cypress-RHOAIENG-12649Merge branch 'main' of…
antowaddle Nov 25, 2024
680a0ee
Final comments added
antowaddle Nov 25, 2024
b6bc5b3
Merge branch 'main' into cypress-RHOAIENG-12649
antowaddle Nov 26, 2024
781e952
Fixed merge conflict
antowaddle Nov 26, 2024
b05b676
Small change to page object name
antowaddle Nov 26, 2024
3681244
dummy commit
antowaddle Nov 26, 2024
fb11cc5
Removed RHOAI bug workaround
antowaddle Nov 26, 2024
e0b9cca
Removed comments
antowaddle Nov 26, 2024
06167d8
Last comment change
antowaddle Nov 26, 2024
ae51479
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Dec 9, 2024
dac0574
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Dec 10, 2024
2cd1f7e
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Dec 11, 2024
645dca1
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Dec 13, 2024
f044a29
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Dec 16, 2024
7aa9059
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Dec 16, 2024
ff28a5d
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Dec 18, 2024
bca2ef3
Merge branch 'main' of https://github.com/antowaddle/odh-dashboard
antowaddle Dec 18, 2024
45dd834
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Dec 31, 2024
bd20cdd
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Jan 2, 2025
d7afb9d
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Jan 6, 2025
290d114
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Jan 7, 2025
60d6e41
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Jan 9, 2025
a87272f
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Jan 10, 2025
cf25d91
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Jan 20, 2025
b92780d
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Jan 22, 2025
2036e59
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Jan 22, 2025
69edb21
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Jan 23, 2025
cebd375
Merge branch 'main' of github.com:opendatahub-io/odh-dashboard
antowaddle Jan 28, 2025
6f62a94
Committing completed test
antowaddle Jan 28, 2025
1cec691
Merge branch 'main' into cypress-RHOAIENG-17427
antowaddle Jan 28, 2025
2535e00
Edited requested on pr - added backend check for PVC size, also added…
antowaddle Jan 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Final changes to read variables, cleaned up utils
  • Loading branch information
antowaddle committed Nov 22, 2024
commit 966917ffe281948f4ca5ec7050f7bb2161a45713
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe('Create a custom resource Quickstart by using Dashboard CRDs', () => {
let resourcesData: ResourcesData;
let resourceNames: ReturnType<typeof getResourceValues>;

// Setup: Load test data and setup custom resources
before(() => {
return loadResourcesFixture('e2e/resources/testCustomResourceCreation.yaml').then((data) => {
resourcesData = data;
Expand All @@ -25,18 +26,20 @@ describe('Create a custom resource Quickstart by using Dashboard CRDs', () => {
return setupCustomResources(resourcesData);
});
});

after(() => {
return cleanupCustomResources(resourcesData);
});
// Delete custom resources
after(() => {
return cleanupCustomResources(resourcesData);
});

it('Upload custom resource and verify', () => {
// Authentication and navigation
cy.step('Log into the application');
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);

cy.step('Navigate to Resources tab and search for the Custom Resources');
resources.visit();

// Verify the resources have been created by iterating over the resources created in before method
cy.step('Check for newly created resources');
checkResources([
{
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/__tests__/cypress/cypress/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export type TestConfig = {
TEST_USER_3: UserAuthConfig;
OCP_ADMIN_USER: UserAuthConfig;
S3: AWSS3Buckets;
APPLICATIONS_NAMESPACE: NamespaceConfig;
};

export type DataScienceProjectData = {
Expand Down Expand Up @@ -150,3 +151,6 @@ export type ResourcesData = {
CustomTutorial: ResourceData[];
};
};
export type NamespaceConfig = {
APPLICATIONS_NAMESPACE: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { resources } from '~/__tests__/cypress/cypress/pages/resources';
interface ResourceInfo {
name: string;
metaDataName: string;
description: string;
description: string;
}

// Specify the return type of the function
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/__tests__/cypress/cypress/utils/resourceUtils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { ResourcesData } from '~/__tests__/cypress/cypress/types';
import { createCustomResource, deleteCustomResource } from './oc_commands/customResources';

const applicationNamespace = Cypress.env('APPLICATIONS_NAMESPACE');
console.log('This is the ApplicationNamespace: ' + applicationNamespace);
const applicationNamespace = Cypress.env('TEST_NAMESPACE');

export const setupCustomResources = (resourcesData: ResourcesData): Cypress.Chainable<void> => {
const resourceTypes: (keyof ResourcesData['resources'])[] = [
Expand Down Expand Up @@ -41,7 +40,7 @@ export const cleanupCustomResources = (resourcesData: ResourcesData): Cypress.Ch

const cleanupPromises = resourceTypes.map((resourceType) => {
const resource = resourcesData.resources[resourceType][0];
return deleteCustomResource(applicationNamespace, resource.kind, `app=custom-odsci-app`).then(
return deleteCustomResource(applicationNamespace, resource.kind, resource.labelSelector).then(
(result) => {
cy.log(`Command execution result: ${JSON.stringify(result)}`);
expect(result.code).to.equal(0);
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/__tests__/cypress/cypress/utils/testConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,15 @@ const AWS_PIPELINES: AWSS3Buckets = {
testConfig?.S3.AWS_SECRET_ACCESS_KEY || env.AWS_PIPELINES_BUCKET_SECRET_ACCESS_KEY || '',
BUCKET_2: AWS_PIPELINES_BUCKET_DETAILS,
};
//export const BASE_URL = testConfig?.ODH_DASHBOARD_URL || env.BASE_URL || '';
const TEST_NAMESPACE = testConfig?.APPLICATIONS_NAMESPACE;

// spread the cypressEnv variables into the cypress config
export const cypressEnv = {
LDAP_CONTRIBUTOR_USER,
HTPASSWD_CLUSTER_ADMIN_USER,
AWS_PIPELINES,
TEST_NAMESPACE,
};

// re-export the updated process env
Expand Down
Loading