generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test case for bceid user update an application
Added test case for bceid user update an application
- Loading branch information
1 parent
1f04ec6
commit e2a684f
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
describe('Login Test for OnRouteBC', () => { | ||
it('Should navigate to the login page, find the login button, and enter credentials', () => { | ||
// Retrieve the environment variables | ||
const username = Cypress.env('bceid_username'); | ||
const password = Cypress.env('bceid_password'); | ||
const update_term_oversize_url = Cypress.env('update_term_oversize_url'); | ||
|
||
// Step 1: Visit the base URL | ||
cy.visit('/'); | ||
|
||
// Step 2: Find and click the login button by its idir | ||
cy.get('#login-bceid').click(); | ||
cy.wait(5000); | ||
|
||
// Step 3: Enter credentials | ||
cy.get('#user').type(username); | ||
cy.get('#password').type(password); | ||
cy.wait(5000); | ||
|
||
// Step 4: Submit the login form | ||
cy.get('[name="btnSubmit"]').click(); | ||
cy.wait(5000); | ||
|
||
cy.visit(update_term_oversize_url); | ||
cy.wait(5000); | ||
|
||
// update phone ext | ||
cy.get('[name="permitData.contactDetails.phone1Extension"]').clear().type('0003'); | ||
cy.wait(5000); | ||
|
||
// save updates | ||
cy.get('[data-testid="save-application-button"]').click(); | ||
cy.wait(5000); | ||
}); | ||
}); |