-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Cypress Test | Facility Redirection to view user page | User Tab (#…
…6513) * cypress new test for advance filter * convert navigation to POM * facility redirection * minor change * revert package-lock
- Loading branch information
Showing
4 changed files
with
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress"; | ||
import LoginPage from "../../pageobject/Login/LoginPage"; | ||
import { AssetSearchPage } from "../../pageobject/Asset/AssetSearch"; | ||
import FacilityPage from "../../pageobject/Facility/FacilityCreation"; | ||
import { UserPage } from "../../pageobject/Users/UserSearch"; | ||
|
||
describe("User Creation", () => { | ||
const userPage = new UserPage(); | ||
const loginPage = new LoginPage(); | ||
const facilityPage = new FacilityPage(); | ||
const assetSearchPage = new AssetSearchPage(); | ||
const fillFacilityName = "Dummy Facility 1"; | ||
const alreadylinkedusersviews = [ | ||
"devdoctor", | ||
"devstaff2", | ||
"devdistrictadmin", | ||
]; | ||
|
||
before(() => { | ||
loginPage.loginAsDisctrictAdmin(); | ||
cy.saveLocalStorage(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.restoreLocalStorage(); | ||
cy.awaitUrl("/users"); | ||
}); | ||
|
||
it("view user redirection from facility page", () => { | ||
cy.visit("/facility"); | ||
assetSearchPage.typeSearchKeyword(fillFacilityName); | ||
assetSearchPage.pressEnter(); | ||
facilityPage.verifyFacilityBadgeContent(fillFacilityName); | ||
facilityPage.visitAlreadyCreatedFacility(); | ||
facilityPage.clickManageFacilityDropdown(); | ||
facilityPage.clickViewUsersOption(); | ||
userPage.verifyMultipleBadgesWithSameId(alreadylinkedusersviews); | ||
}); | ||
|
||
afterEach(() => { | ||
cy.saveLocalStorage(); | ||
}); | ||
}); |
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
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