forked from DIGI-UW/OpenELIS-Global-2
-
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.
Merge pull request DIGI-UW#1425 from Bahati308/E2E
Updated dashboard E2E
- Loading branch information
Showing
5 changed files
with
119 additions
and
113 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,93 @@ | ||
import LoginPage from "../pages/LoginPage"; | ||
import DashBoardPage from "../pages/DashBoard"; | ||
|
||
let homePage = null; | ||
let loginPage = null; | ||
let dashboard = null; | ||
|
||
before("login", () => { | ||
before(() => { | ||
loginPage = new LoginPage(); | ||
loginPage.visit(); | ||
}); | ||
|
||
describe("Pathology Dashboard", function () { | ||
it("User Visits Pathology Dashboard", function () { | ||
homePage = loginPage.goToHomePage(); | ||
dashboard = homePage.goToPathologyDashboard(); | ||
dashboard = new DashBoardPage(); | ||
homePage = loginPage.goToHomePage(); | ||
|
||
dashboard.checkForHeader("Pathology"); | ||
}); | ||
cy.fixture("Order").as("dashBData"); | ||
}); | ||
|
||
it("User adds a new Pathology order", function () { | ||
homePage.goToOrderPage(); | ||
dashboard.addOrder("Histopathology"); | ||
describe("Dashboard for the Home Page", function () { | ||
it("User clicks search bar", function () { | ||
dashboard.homeSearchBar(); | ||
}); | ||
it("Check For Order", () => { | ||
homePage.goToPathologyDashboard(); | ||
dashboard.checkForHeader("Pathology"); | ||
|
||
cy.fixture("DashBoard").then((order) => { | ||
dashboard.validatePreStatus(order.labNo); | ||
it("User types the patient to search and closes it", function () { | ||
cy.fixture("Order").then((dashBData) => { | ||
dashboard.searchBarInput(dashBData.searchName); | ||
}); | ||
dashboard.homeSearchBar(); | ||
}); | ||
|
||
it("Change The Status of Order and save it", () => { | ||
dashboard.changeStatus("Completed"); | ||
dashboard.enterDetails(); | ||
dashboard.saveOrder(); | ||
it("User interacts with the notifications icon", function () { | ||
dashboard.notificationIcon(); | ||
dashboard.notificationIconClose(); | ||
}); | ||
|
||
it("Validate the Status of Order", () => { | ||
cy.fixture("DashBoard").then((order) => { | ||
// dashboard.validateOrderStatus(order.labNo, 4); | ||
it("User interacts with the user icon", function () { | ||
dashboard.userIcon(); | ||
cy.fixture("Order").then((dashBData) => { | ||
dashboard.userSelectsEng(dashBData.engLang); | ||
}); | ||
dashboard.userIcon(); | ||
}); | ||
}); | ||
|
||
describe("ImmunoChemistry Dashboard", function () { | ||
it("User Visits ImmunoChemistry Dashboard", function () { | ||
homePage = loginPage.goToHomePage(); | ||
dashboard = homePage.goToImmunoChemistryDashboard(); | ||
dashboard.checkForHeader("Immunohistochemistry"); | ||
|
||
// cy.fixture("DashBoard").then((order) => { | ||
// dashboard.validatePreStatus(order.labNo); | ||
|
||
// }); | ||
describe("Pathology Dashboard", function () { | ||
it("User Visits the Dashboard", function () { | ||
dashboard = homePage.goToPathology(); | ||
}); | ||
|
||
it("User adds a new ImmunioChemistry order", function () { | ||
homePage.goToOrderPage(); | ||
dashboard.addOrder("Immunohistochemistry"); | ||
it("User checks filters, selects cases and items per page", function () { | ||
dashboard.checkFilters(); | ||
cy.fixture("Order").then((dashBData) => { | ||
dashboard.selectCases(dashBData.myCases); | ||
dashboard.enterLabNumber(dashBData.labNumb); | ||
dashboard.pageItems(dashBData.itemsPerPage); | ||
}); | ||
}); | ||
}); | ||
|
||
it("Check For Order", () => { | ||
homePage.goToImmunoChemistryDashboard(); | ||
|
||
dashboard.checkForHeader("Immunohistochemistry"); | ||
describe("Immunohistochemistry Dashboard", function () { | ||
it("User Visits the Dashboard", function () { | ||
dashboard = homePage.goToImmunoChemistryDashboard(); | ||
}); | ||
|
||
cy.fixture("DashBoard").then((order) => { | ||
dashboard.validatePreStatus(order.labNo); | ||
it("User checks filters, selects cases and items per page", function () { | ||
dashboard.checkFilters(); | ||
cy.fixture("Order").then((dashBData) => { | ||
dashboard.selectCompletedCases(dashBData.myCases2); | ||
dashboard.enterLabNumber(dashBData.labNumb); | ||
dashboard.pageItems(dashBData.itemsPerPage); | ||
}); | ||
}); | ||
}); | ||
|
||
it("Change The Status of Order and save it", () => { | ||
dashboard.changeStatus("Completed"); | ||
dashboard.selectPathologist("ELIS,Open"); | ||
dashboard.saveOrder(); | ||
describe("Cytology Dashboard", function () { | ||
it("User Visits the Dashboard", function () { | ||
dashboard = homePage.goToCytology(); | ||
}); | ||
|
||
it("Validate the Status of Order", () => { | ||
cy.fixture("DashBoard").then((order) => { | ||
//TO DO : needs to be properly re-writen with proper selector | ||
//dashboard.validateOrderStatus(order.labNo, 3); | ||
it("User checks filters, selects cases and items per page", function () { | ||
dashboard.checkFilters(); | ||
cy.fixture("Order").then((dashBData) => { | ||
dashboard.selectScreeningCases(dashBData.myCases3); | ||
dashboard.enterLabNumber(dashBData.labNumb); | ||
dashboard.pageItems(dashBData.itemsPerPage); | ||
}); | ||
}); | ||
}); | ||
|
||
describe("Back to home page", function () { | ||
it("User navigates back to home page", function () { | ||
dashboard = homePage.backToHomePage(); | ||
}); | ||
}); |
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
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