Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production Release Mid November #6600

Merged
merged 45 commits into from
Nov 21, 2023
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c074144
New Cypress Test | Advance Filters Functionality | User Tab (#6510)
nihal467 Oct 30, 2023
d1d863e
Existing Cypress POM Conversion | Page Navigation | User Tab (#6511)
nihal467 Oct 30, 2023
edd6a7e
FixedSignoutFlow#6504 (#6509)
shyamprakash123 Oct 30, 2023
66aa48b
Fixed responsive issue in facility page (#6507)
shyamprakash123 Oct 30, 2023
23bdb1f
Fixed pressure sore popup not closing after clicking outside (#6482)
thedevildude Oct 30, 2023
fa3b4a7
New Cypress Test | Facility Redirection to view user page | User Tab …
nihal467 Oct 30, 2023
9005adf
Existing Cypress POM Conversion | Create New User & Verify its reflec…
nihal467 Oct 30, 2023
7703f1f
existing user profile updation (#6527)
nihal467 Oct 30, 2023
bcd9730
Track patient card button clicks (#6521)
Ashesh3 Oct 31, 2023
6746359
Replaced useDispatch w. useQuery/request: Resource (src/Components/Re…
konavivekramakrishna Oct 31, 2023
343ff7e
Fixed bed number coming up two time in patients page. (#6526)
AshrafMd-1 Oct 31, 2023
b43f8d5
Make header in patient dashboard more responsive. Fixes #6488 (#6515)
Omkar76 Oct 31, 2023
abe4be9
Add location filter for patients (#6456)
Ashesh3 Oct 31, 2023
ed3a547
Show only those facilties that aren't linked to user (#6253)
Pranshu1902 Oct 31, 2023
5891df3
Refactor middleware hostname in Feed component (#6538)
Ashesh3 Nov 3, 2023
ac405ce
Show camera feed button only for specific roles (#6540)
Ashesh3 Nov 3, 2023
e1eac85
add auto deployment for staging gcp deployment (#6519)
sainak Nov 3, 2023
e30d6bd
Redirect to Original URL After Session Expiry and Re-login (#6495)
AshrafMd-1 Nov 6, 2023
fbf8eee
Group medicine administration by 4 hours + Support for archiving medi…
rithviknishad Nov 6, 2023
e7fbde8
🔧 Hide Camera Feed Tab for bed with no camera attached. (#6536)
shyamprakash123 Nov 7, 2023
46c19a7
Remove redundant facility selection pop-up for single facility users …
sriharsh05 Nov 7, 2023
585cb5a
Added Loading component while the assets are being fetched. (#6532)
shyamprakash123 Nov 7, 2023
e8091bf
change the NIBP display from last 30 mins to current bed assignment d…
sriharsh05 Nov 7, 2023
bf932d5
Replace useDispatch w. useQuery/request: Notifications (src/Component…
adriansliva Nov 7, 2023
01d5b16
Replaced useDispatch w. useQuery/request: Shifting (src/Components/Sh…
konavivekramakrishna Nov 7, 2023
c94a54c
Added LiveFeedScreen page (#6497)
kshitijv256 Nov 7, 2023
60278f9
fixes #6504 (#6559)
rithviknishad Nov 7, 2023
6c4f151
New Cypress Test | Functionality test of Linking and Unlinking Facili…
nihal467 Nov 8, 2023
f0db72e
working hour cypress test (#6566)
nihal467 Nov 8, 2023
a3b7318
Added max width constraint to the cards. (#6563)
konavivekramakrishna Nov 8, 2023
c8e5c94
fix responsive issue in sidebar (#6547)
khavinshankar Nov 8, 2023
05df8c0
fix commentSection in resource (#6562)
konavivekramakrishna Nov 8, 2023
88c64b7
fix cypress: resource and sample test (#6569)
rithviknishad Nov 9, 2023
f575710
Refactor Consultation Diagnosis (M2M relation, additional verificatio…
rithviknishad Nov 9, 2023
f7ac211
New Cypress Test | Functionality test of Linking Skill to a User | Us…
nihal467 Nov 9, 2023
c67ced2
quick patch: hide not working sort filter (#6577)
rithviknishad Nov 10, 2023
8e2148f
Fix clear button for CNS location filter (#6581)
Ashesh3 Nov 10, 2023
9f36488
Fixed Flaky Cypress Test in the User_Manage File (#6583)
nihal467 Nov 10, 2023
5b9c618
refresh administrations upon archive (#6586)
rithviknishad Nov 10, 2023
28bb1df
iOS: fix add user button alignment (#6588)
rithviknishad Nov 10, 2023
7e50f8a
Syncing package-lock with package.json for cypress (#6589)
nihal467 Nov 11, 2023
d411946
deploy to staging gcp instance from staging image (#6548)
sainak Nov 14, 2023
fb69380
add job to deploy to GKE Meghalaya (#6594)
sainak Nov 14, 2023
03b8e0a
fix dosage (#6626)
AshrafMd-1 Nov 15, 2023
43d08e1
Add delay before live feed reconnect (#6655)
Ashesh3 Nov 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
New Cypress Test | Functionality test of Linking and Unlinking Facili…
…ty | User Tab (#6564)

* add test to link and unlink a facility and verify its reflection

* added a little bit comment

* fixed the changes requested
  • Loading branch information
nihal467 authored Nov 8, 2023
commit 6c4f151829919817cd92ceccb483ad957bbebfa0
12 changes: 0 additions & 12 deletions cypress/e2e/users_spec/user_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -193,18 +193,6 @@ describe("User Creation", () => {
userPage.verifyMultipleBadgesWithSameId(alreadylinkedusersviews);
});

// the below commented out codes, will be used in the upcoming refactoring of this module, since it is a inter-dependent of partially converted code, currently taking it down

// it("link facility for user", () => {
// cy.contains("Linked Facilities").click();
// cy.intercept(/\/api\/v1\/facility/).as("getFacilities");
// cy.get("[name='facility']")
// .click()
// .type("Dummy Facility 1")
// .wait("@getFacilities");
// cy.get("li[role='option']").should("not.exist");
// });

afterEach(() => {
cy.saveLocalStorage();
});
83 changes: 83 additions & 0 deletions cypress/e2e/users_spec/user_manage.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { UserPage } from "../../pageobject/Users/UserSearch";
import ManageUserPage from "../../pageobject/Users/ManageUserPage";

describe("Manage User", () => {
const loginPage = new LoginPage();
const userPage = new UserPage();
const manageUserPage = new ManageUserPage();
const usernametolinkfacilitydoc1 = "dummydoctor4";
const usernametolinkfacilitydoc2 = "dummydoctor5";
const usernametolinkfacilitydoc3 = "dummydoctor6";
const usernamerealname = "Dummy Doctor";
const facilitytolinkusername = "Dummy Shifting Center";

before(() => {
loginPage.loginAsDisctrictAdmin();
cy.saveLocalStorage();
});

beforeEach(() => {
cy.restoreLocalStorage();
cy.awaitUrl("/users");
});

it("linking and unlinking facility for multiple users, and confirm reflection in user cards and doctor connect", () => {
// verify the user doesn't have any home facility
userPage.typeInSearchInput(usernametolinkfacilitydoc1);
userPage.checkUsernameText(usernametolinkfacilitydoc1);
manageUserPage.assertHomeFacility("No Home Facility");
// Link a new facility and ensure it is under linked facility - doctor username (1)
manageUserPage.clickFacilitiesTab();
manageUserPage.typeFacilityName(facilitytolinkusername);
manageUserPage.selectFacilityFromDropdown(facilitytolinkusername);
manageUserPage.clickLinkFacility();
manageUserPage.assertLinkedFacility(facilitytolinkusername);
// Verify in the already linked facility are not present in droplist
manageUserPage.assertFacilityNotInDropdown(facilitytolinkusername);
manageUserPage.clickCloseSlideOver();
// Link a new facility and ensure it is under home facility - doctor username (2)
userPage.clearSearchInput();
userPage.typeInSearchInput(usernametolinkfacilitydoc2);
userPage.checkUsernameText(usernametolinkfacilitydoc2);
manageUserPage.clickFacilitiesTab();
manageUserPage.typeFacilityName(facilitytolinkusername);
manageUserPage.selectFacilityFromDropdown(facilitytolinkusername);
manageUserPage.clickLinkFacility();
manageUserPage.clickHomeFacilityIcon();
manageUserPage.assertnotLinkedFacility(facilitytolinkusername);
manageUserPage.assertHomeFacilitylink(facilitytolinkusername);
manageUserPage.clickCloseSlideOver();
// verify the home facility doctor id have reflection in user card
userPage.clearSearchInput();
userPage.typeInSearchInput(usernametolinkfacilitydoc2);
userPage.checkUsernameText(usernametolinkfacilitydoc2);
manageUserPage.assertHomeFacility(facilitytolinkusername);
// Link a new facility and unlink the facility from the doctor username (3)
userPage.clearSearchInput();
userPage.typeInSearchInput(usernametolinkfacilitydoc3);
userPage.checkUsernameText(usernametolinkfacilitydoc3);
manageUserPage.clickFacilitiesTab();
manageUserPage.typeFacilityName(facilitytolinkusername);
manageUserPage.selectFacilityFromDropdown(facilitytolinkusername);
manageUserPage.clickLinkFacility();
manageUserPage.clickUnlinkFacilityButton();
manageUserPage.clickSubmit();
manageUserPage.assertnotLinkedFacility;
manageUserPage.linkedfacilitylistnotvisible();
manageUserPage.clickCloseSlideOver();
// Go to particular facility doctor connect and all user-id are reflected based on there access
// Path will be facility page to patient page then doctor connect button
manageUserPage.navigateToFacility();
manageUserPage.typeFacilitySearch(facilitytolinkusername);
manageUserPage.assertFacilityInCard(facilitytolinkusername);
manageUserPage.clickFacilityPatients();
manageUserPage.clickDoctorConnectButton();
manageUserPage.assertDoctorConnectVisibility(usernamerealname);
});

afterEach(() => {
cy.saveLocalStorage();
});
});
85 changes: 85 additions & 0 deletions cypress/pageobject/Users/ManageUserPage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
export class ManageUserPage {
assertHomeFacility(expectedText) {
cy.get("#home_facility").should("contain.text", expectedText);
}

clickFacilitiesTab() {
cy.get("#facilities").click();
}

typeFacilityName(facilityName) {
cy.get("input[name='facility']").click().type(facilityName);
}

selectFacilityFromDropdown(facilityName) {
cy.get("[role='option']").contains(facilityName).click();
}

clickLinkFacility() {
cy.get("#link-facility").click();
}

assertLinkedFacility(facilityName) {
cy.get("#linked-facility-list").should("contain.text", facilityName);
}

assertnotLinkedFacility(facilityName) {
cy.get("#linked-facility-list").should("not.contain", facilityName);
}

linkedfacilitylistnotvisible() {
cy.get("#linked-facility-list").should("not.exist");
}

assertHomeFacilitylink(facilityName) {
cy.get("#home-facility").should("contain.text", facilityName);
}

assertFacilityNotInDropdown(facilityName) {
this.typeFacilityName(facilityName);
cy.get("[role='option']").should("not.exist");
}

clickCloseSlideOver() {
cy.get("#close-slide-over").click();
}

clickHomeFacilityIcon() {
cy.get("#home-facility-icon").click();
}

clickUnlinkFacilityButton() {
cy.get("#unlink-facility-button").click();
}

clickSubmit() {
cy.get("#submit").click();
}

navigateToFacility() {
cy.visit("/facility");
}

typeFacilitySearch(facilityName) {
cy.get("#search").click().type(facilityName);
}

assertFacilityInCard(facilityName) {
cy.get("#facility-name-card").should("contain", facilityName);
}

clickFacilityPatients() {
cy.get("#facility-patients").click();
}

clickDoctorConnectButton() {
cy.get("#doctor-connect-patient-button").click();
}

assertDoctorConnectVisibility(realName) {
cy.get("#doctor-connect-home-doctor").should("contain.text", realName);
cy.get("#doctor-connect-remote-doctor").should("contain.text", realName);
}
}

export default ManageUserPage;
8 changes: 7 additions & 1 deletion src/Components/Facility/DoctorVideoSlideover.tsx
Original file line number Diff line number Diff line change
@@ -68,7 +68,13 @@ export default function DoctorVideoSlideover(props: {
home: false,
},
].map((type, i) => (
<div key={i} className="mb-4">
<div
key={i}
className="mb-4"
id={`doctor-connect-${
type.home ? "home" : "remote"
}-${type.user_type.toLowerCase()}`}
>
<div>
<span className="text-lg font-semibold">{type.title}</span>
</div>
5 changes: 4 additions & 1 deletion src/Components/Facility/FacilityCard.tsx
Original file line number Diff line number Diff line change
@@ -88,7 +88,10 @@ export const FacilityCard = (props: { facility: any; userType: any }) => {
{kasp_string}
</div>
)}
<div className="flex flex-wrap items-center justify-between">
<div
className="flex flex-wrap items-center justify-between"
id="facility-name-card"
>
<Link
href={`/facility/${facility.id}`}
className="float-left text-xl font-bold capitalize text-inherit hover:text-inherit"
1 change: 1 addition & 0 deletions src/Components/Facility/FacilityHome.tsx
Original file line number Diff line number Diff line change
@@ -639,6 +639,7 @@ export const FacilityHome = (props: any) => {
<span className="text-sm">Add Details of a Patient</span>
</ButtonV2>
<ButtonV2
id="view-patient-facility-list"
variant="primary"
ghost
border
1 change: 1 addition & 0 deletions src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
@@ -814,6 +814,7 @@ export const PatientManager = () => {
/>
{showDoctorConnect && (
<ButtonV2
id="doctor-connect-patient-button"
onClick={() => {
triggerGoal("Doctor Connect Clicked", {
facilityId: qParams.facility,
6 changes: 4 additions & 2 deletions src/Components/Users/ManageUsers.tsx
Original file line number Diff line number Diff line change
@@ -731,7 +731,7 @@ function UserFacilities(props: { user: any }) {
<div className="flex flex-col">
{/* Home Facility section */}
{user?.home_facility_object && (
<div className="mt-2">
<div className="mt-2" id="home-facility">
<div className="mb-2 ml-2 text-lg font-bold">Home Facility</div>
<div className="relative rounded p-2 transition hover:bg-gray-200 focus:bg-gray-200 md:rounded-lg">
<div className="flex items-center justify-between">
@@ -762,7 +762,7 @@ function UserFacilities(props: { user: any }) {

{/* Linked Facilities section */}
{facilities.length > 0 && (
<div className="mt-2">
<div className="mt-2" id="linked-facility-list">
<div className="mb-2 ml-2 text-lg font-bold">
Linked Facilities
</div>
@@ -785,6 +785,7 @@ function UserFacilities(props: { user: any }) {
<div className="flex items-center gap-2">
<button
className="tooltip text-lg hover:text-primary-500"
id="home-facility-icon"
onClick={() => {
if (user?.home_facility_object) {
// has previous home facility
@@ -806,6 +807,7 @@ function UserFacilities(props: { user: any }) {
</span>
</button>
<button
id="unlink-facility-button"
className="tooltip text-lg text-red-600"
onClick={() =>
setUnlinkFacilityData({
Loading