-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into facility-features
- Loading branch information
Showing
122 changed files
with
2,818 additions
and
1,633 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
eyJrZXlzIjogW3sibiI6ICJ4X21fNGNKQ3NHTHN4WkFIa2VCbFZQa2ZqNFNSckdHN3UySERFM3VLX3dFNERhTWhHQ2lxTXFsaTFDM2pxSE5JTVhuWV9ab1M5R3pHbnJpdGg1UUZGVDlLMGtBdF9YaXBJNnV1djcwOWtOV2FFNXZrYks4VlFRcFd2UFp4NUJSeTBGay0wU2lxZG1xOTNJRXdUTnNTLUpETnRXQm5VX0F1cjU0UXptQmI3SmhfOGttRDAtaHhROVZVejRpSUU3QTlySU5vQXNHSHhfdGtuNXd6YmpPR3F2Q3JqRi1RWXo0OGJXVkZzVVliNkFqUlFrZER2RWVwQlpNSHZsNVUxQlZxOVdRTTJGTmRUR0tJb3ZYeDRuTDFybUVONHpxbEpqWmc2bEZiODVuOUhkc01VblFiSXhkUjVlVl8wWmNVaHBrQWc0NldrejRZWkxMNm5NaGR0RmFTMXciLCAiZSI6ICJBUUFCIiwgImQiOiAiRXo4T3dDZ2xxZnREWlhwSXVEbjhGck1KWGhNNHZfb0NDdlZNUko1QjBPd3BuR3BrWDRKZWF4VFJYYkZ5OVQzdkowX2VXZjRQcl9XZUloMk5HZnpkaGw5NmtJUzd5R2JxQkhSY0U3a2ZhVWFkbHlDTVdnZDV5TEk1aWVOQUw5N2w4X1o2N0w5NHRIX3VlUF80Q1pXV0hGVTNieXJ4bHVzSld6NmZ5SFVPczlVSDFxV284V1RNOVp0RndqV0cxOWpkUXZ1RkQ0Z0x4UEJYZEk5ZV9zdTNwbmZHR0Zk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09Zb0RVR0Q4Zno2ZEoxVHp2NkxpdWRwOTg4TXJTUThHZGdLU3pMd2dCWTdEeUE3MkR2UG9CUHQtODgiLCAicWkiOiAiSlF0UUJERXdnQVVMcWJFRWoybmdyXy02aV9pUmdRWmJTQ0hXNGdpZG5fdHlwdUJWS2R0ZW1jT3J6M3NnTnk0ekZrZElTbUZfbmdnbFlJb080TjNza1NNUXdGY1B0S1kzWUVlT2ZGNzMzRDZaTVJtSTFTby12QU54YVBDUkREbnUwTWk1TnUzbS02SkhGSFF5RDU2ZTFsQUlwUS1lakpuTWR6MXQ0aUplbEFzIiwgImt0eSI6ICJSU0EiLCAia2lkIjogIlhjckcyVS0tR3B4SVhORXpKOWNWREdRaEUzeXlIamREMDN1aDZmYXpRX2siLCAiYWxnIjogIlJTMjU2In1dfQ== |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import LoginPage from "../../pageobject/Login/LoginPage"; | ||
import { PatientPage } from "../../pageobject/Patient/PatientCreation"; | ||
import PatientLogupdate from "../../pageobject/Patient/PatientLogupdate"; | ||
import { PatientConsultationPage } from "../../pageobject/Patient/PatientConsultation"; | ||
|
||
describe("Patient swtich bed functionality", () => { | ||
const loginPage = new LoginPage(); | ||
const patientPage = new PatientPage(); | ||
const patientLogupdate = new PatientLogupdate(); | ||
const patientConsultationPage = new PatientConsultationPage(); | ||
const switchBedOne = "Dummy Bed 4"; | ||
const switchBedTwo = "Dummy Bed 1"; | ||
const switchBedThree = "Dummy Bed 3"; | ||
const switchPatientOne = "Dummy Patient 6"; | ||
const switchPatientTwo = "Dummy Patient 7"; | ||
|
||
before(() => { | ||
loginPage.loginAsDisctrictAdmin(); | ||
cy.saveLocalStorage(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.restoreLocalStorage(); | ||
cy.clearLocalStorage(/filters--.+/); | ||
cy.awaitUrl("/patients"); | ||
}); | ||
|
||
it("Assign a bed for a admitted patient from update consultation page", () => { | ||
// Open the update consultation page and assign a bed | ||
patientPage.visitPatient(switchPatientTwo); | ||
patientConsultationPage.clickEditConsultationButton(); | ||
patientLogupdate.selectBed(switchBedThree); | ||
// verify the notification | ||
cy.verifyNotification("Bed allocated successfully"); | ||
}); | ||
|
||
it("Assign a bed for a admitted patient from patient dashboard", () => { | ||
// Assign a bed to a patient | ||
patientPage.visitPatient(switchPatientOne); | ||
patientLogupdate.clickSwitchBed(); | ||
patientLogupdate.selectBed(switchBedOne); | ||
cy.verifyNotification("Bed allocated successfully"); | ||
// Clear the bed and reassign | ||
patientLogupdate.clickSwitchBed(); | ||
cy.get("#clear-button").click(); | ||
patientLogupdate.selectBed(switchBedTwo); | ||
cy.verifyNotification("Bed allocated successfully"); | ||
// verify the card is reflected | ||
patientLogupdate.clickSwitchBed(); | ||
cy.verifyContentPresence("#previousbed-list", [switchBedOne, switchBedTwo]); | ||
}); | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import LoginPage from "../../pageobject/Login/LoginPage"; | ||
import PatientHome from "../../pageobject/Patient/PatientHome"; | ||
|
||
describe("Patient Homepage present functionalities", () => { | ||
const loginPage = new LoginPage(); | ||
const patientHome = new PatientHome(); | ||
|
||
before(() => { | ||
loginPage.loginAsDisctrictAdmin(); | ||
cy.saveLocalStorage(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.restoreLocalStorage(); | ||
cy.clearLocalStorage(/filters--.+/); | ||
cy.awaitUrl("/patients"); | ||
}); | ||
|
||
it("Verify the functionality of the patient tab pagination", () => { | ||
let firstPatientPageOne: string; | ||
cy.get('[data-cy="patient"]') | ||
.first() | ||
.invoke("text") | ||
.then((patientOne: string) => { | ||
firstPatientPageOne = patientOne.trim(); | ||
patientHome.clickNextPage(); | ||
patientHome.verifySecondPageUrl(); | ||
cy.get('[data-cy="patient"]') | ||
.first() | ||
.invoke("text") | ||
.then((patientTwo: string) => { | ||
const firstPatientPageTwo = patientTwo.trim(); | ||
expect(firstPatientPageOne).not.to.eq(firstPatientPageTwo); | ||
patientHome.clickPreviousPage(); | ||
}); | ||
}); | ||
}); | ||
|
||
afterEach(() => { | ||
cy.saveLocalStorage(); | ||
}); | ||
}); |
Oops, something went wrong.