forked from bcgov/SIMS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Velang RN
authored and
Velang RN
committed
Aug 31, 2022
1 parent
3a2c66d
commit d32f51c
Showing
7 changed files
with
158 additions
and
80 deletions.
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
10 changes: 5 additions & 5 deletions
10
testing/src/cypress/custom-command/institution/InstitutionCustomCommand.ts
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import LoginInstitutionObject from "../../page-objects/Institution-objects/LoginInstitutionObject"; | ||
|
||
export default class InstitutionCustomCommand { | ||
loginWithCredentials(uname: string, pass: string) { | ||
loginWithCredentials(username: string, password: string) { | ||
const loginInstitutionObject = new LoginInstitutionObject(); | ||
|
||
loginInstitutionObject.loginWithBCEID().should("be.visible").click(); | ||
loginInstitutionObject.loginInWithBCEIDtext().should("be.visible"); | ||
|
||
loginInstitutionObject | ||
.bceidInputText() | ||
.type(uname) | ||
.should("have.value", uname); | ||
.type(username) | ||
.should("have.value", username); | ||
loginInstitutionObject | ||
.passwordInputText() | ||
.type(pass) | ||
.should("have.value", pass); | ||
.type(password) | ||
.should("have.value", password); | ||
loginInstitutionObject.continueButton().click(); | ||
} | ||
} |
23 changes: 15 additions & 8 deletions
23
testing/src/cypress/e2e/02-institution/01-login-institution-page.cy.ts
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
34 changes: 34 additions & 0 deletions
34
testing/src/cypress/e2e/02-institution/common-helper-functions.cy.ts
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,34 @@ | ||
export default class InstitutionHelperActions { | ||
|
||
getBaseUrlForTestEnv() { | ||
return Cypress.env("TEST").BASE_URL; | ||
} | ||
|
||
getLoginUrlForTestEnv(){ | ||
return this.getBaseUrlForTestEnv() + "/institution/login" | ||
} | ||
|
||
getApiUrlForTest(){ | ||
return this.getBaseUrlForTestEnv() + "/api/institutions" | ||
} | ||
|
||
getUserNameSingleLocation() { | ||
return Cypress.env("TEST").USERNAME_SINGLE_LOCATION; | ||
} | ||
|
||
getUserPasswordSingleLocation() { | ||
return Cypress.env("TEST").USER_PASSWORD_SINGLE_LOCATION; | ||
} | ||
|
||
getUserDetailsSingleLocation(){ | ||
return Cypress.env("USER_DETAILS").USER_SINGLE_LOCATION; | ||
} | ||
|
||
getInstitutionDetailsSingleLocation(){ | ||
return Cypress.env("INSTITUTION_DETAILS_SINGLE_LOCATION"); | ||
} | ||
|
||
getToken(){ | ||
return Cypress.env("TEST").TOKEN | ||
} | ||
} |
Oops, something went wrong.