-
Notifications
You must be signed in to change notification settings - Fork 502
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 | Create Partial Investigation Log Update (#9034)
- Loading branch information
Showing
5 changed files
with
51 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { PatientPage } from "pageobject/Patient/PatientCreation"; | ||
import PatientInvestigation from "pageobject/Patient/PatientInvestigation"; | ||
|
||
import LoginPage from "../../pageobject/Login/LoginPage"; | ||
|
||
describe("Patient Investigation Creation from Patient consultation page", () => { | ||
const loginPage = new LoginPage(); | ||
const patientPage = new PatientPage(); | ||
const patientInvestigation = new PatientInvestigation(); | ||
const patientName = "Dummy Patient 12"; | ||
|
||
before(() => { | ||
loginPage.loginAsDistrictAdmin(); | ||
cy.saveLocalStorage(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.restoreLocalStorage(); | ||
cy.clearLocalStorage(/filters--.+/); | ||
cy.awaitUrl("/patients"); | ||
}); | ||
|
||
it("Create a investigation for a patient and verify its reflection", () => { | ||
patientPage.visitPatient(patientName); | ||
patientInvestigation.clickInvestigationTab(); | ||
patientInvestigation.clickLogLabResults(); | ||
patientInvestigation.selectInvestigationOption([ | ||
"Haematology", | ||
"Urine Test", | ||
]); | ||
cy.submitButton("Save Investigation"); | ||
cy.verifyNotification("Please Enter at least one value"); | ||
cy.closeNotification(); | ||
// Temporary workflow for investigation since we dont have dummy data and moving away from existing module | ||
}); | ||
|
||
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