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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 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
a1022cf
Cypress e2e Test - Admin Model Serving (Multi & Single Model) Tests (…
antowaddle Jan 22, 2025
3acd8dd
Comitting working tests
antowaddle Jan 29, 2025
ba65003
Merge branch 'main' into cypress-RHOAIENG-17501
antowaddle Jan 29, 2025
a270460
Small wording changes
antowaddle Jan 29, 2025
0c419f3
Merge branch 'cypress-RHOAIENG-17501' of https://github.com/antowaddl…
antowaddle Jan 29, 2025
f604b1b
Merge branch 'main' into cypress-RHOAIENG-17501
antowaddle Jan 30, 2025
3b26fa7
Merge branch 'main' into cypress-RHOAIENG-17501
antowaddle Jan 30, 2025
191fe58
Merge branch 'main' into cypress-RHOAIENG-17501
antowaddle Jan 30, 2025
b0552c0
Merge branch 'main' into cypress-RHOAIENG-17501
antowaddle Jan 30, 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,34 @@
projectDisplayName: "Cypress Test Project"
projectDescription: "Cypress Test project description."
projectResourceName: "cypress-test-project"
invalidResourceNames:
- Test-Project
- test project
- test.project
- test:project
- test/project
- test"project
- test[project]
- test(project)
- test&project
- test*project
- test?project
- largeprojectnametestthatshouldnotwork
- Test-Project-Invalid
- test project with spaces
- test.project.with.dots
- test:project:with:colons
- test/project/with/slashes
- test"project"with"quotes
- test[project]with[brackets]
- test(project)with(parentheses)
- test&project&with&ampersands
- test*project*with*asterisks
- test?project?with?questions
- -testprojectstartshyphen
- testprojectendswithhyphen-
- TestProjectUpperCase
- $testprojectspecialstart
- ^testprojectspecialstart
- (testproject)parentheses
- testprojecttoooooooooooooooooooooooooooooooooooooooooooooooooooolong
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,72 @@ describe('Verify Data Science Project - Creation and Deletion', () => {
projectListPage.findEmptyResults();
},
);
it(
'Verify users cannot create a project with Empty title',
{ tags: ['@Sanity', '@SanitySet1', '@ODS-1783', '@Dashboard', '@Tier1'] },
() => {
// Authentication and navigation
cy.step('Log into the application');
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);
projectListPage.navigate();

// Initiate project creation
cy.step('Open Create Data Science Project modal');
createProjectModal.shouldBeOpen(false);
projectListPage.findCreateProjectButton().click();

// Input project details
cy.step('Enter valid project information');
createProjectModal.k8sNameDescription
.findDescriptionInput()
.type(testData.projectDescription);

// Confirm that the Submit button is disabled
cy.step('Verify the submit button is disabled');
createProjectModal.findSubmitButton().should('be.disabled');
},
);
it(
'Verify User cannot create a project using special characters or long names in the Resource name field',
{ tags: ['@Sanity', '@SanitySet1', '@ODS-1875', '@Dashboard', '@Tier1'] },
() => {
// Authentication and navigation
cy.step('Log into the application');
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);
projectListPage.navigate();

// Initiate project creation
cy.step('Open Create Data Science Project modal');
createProjectModal.shouldBeOpen(false);
projectListPage.findCreateProjectButton().click();

// Enter invalid resource details
cy.step(
'Enter invalid resource details - iterate through the array defined in the fixtures file',
);
createProjectModal.k8sNameDescription.findResourceEditLink().click();
createProjectModal.k8sNameDescription
.findDisplayNameInput()
.type(testData.projectDisplayName);

// Test each invalid resource name
cy.step('Test invalid resource name and verify that project creation is prevented');

testData.invalidResourceNames.forEach((invalidResourceName) => {
cy.log(`Testing invalid resource name: ${invalidResourceName}`);

// Clear input, type invalid resource name, and validate behavior
createProjectModal.k8sNameDescription
.findResourceNameInput()
.clear()
.type(invalidResourceName);
createProjectModal.k8sNameDescription
.findResourceNameInput()
.should('have.attr', 'aria-invalid', 'true');
createProjectModal.findSubmitButton().should('be.disabled');
// Log success message for invalid resources names being rejected
cy.log(`✅ ${invalidResourceName}: not authorised as a Resource Name`);
});
},
);
});
1 change: 1 addition & 0 deletions frontend/src/__tests__/cypress/cypress/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export type DataScienceProjectData = {
pvStorageName: string;
pvStorageDescription: string;
pvStorageNameEdited: string;
invalidResourceNames: string[];
};

export type NotebookImageData = {
Expand Down
Loading