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 Skill to a User | Us…
…er Tab (#6568)

* linking skill to a user

* fixed failure

* removed duplicate code in asset module

* minor-fix-assertion
nihal467 authored Nov 9, 2023
commit f7ac211a193a5846b30f9c370a31f0391b0ef044
17 changes: 0 additions & 17 deletions cypress/e2e/assets_spec/assets_manage.cy.ts
Original file line number Diff line number Diff line change
@@ -117,23 +117,6 @@ describe("Asset", () => {
assetPage.verifyDeleteStatus();
});

it("Verify Facility Asset Page Redirection", () => {
cy.visit("/facility");
assetSearchPage.typeSearchKeyword(fillFacilityName);
assetSearchPage.pressEnter();
facilityPage.verifyFacilityBadgeContent(fillFacilityName);
facilityPage.visitAlreadyCreatedFacility();
facilityPage.clickManageFacilityDropdown();
facilityPage.clickCreateAssetFacilityOption();
facilityPage.verifyfacilitycreateassetredirection();
facilityPage.verifyassetfacilitybackredirection();
facilityPage.clickManageFacilityDropdown();
facilityPage.clickviewAssetFacilityOption();
facilityPage.verifyfacilityviewassetredirection();
assetFilters.assertFacilityText(fillFacilityName);
facilityPage.verifyassetfacilitybackredirection();
});

afterEach(() => {
cy.saveLocalStorage();
});
49 changes: 46 additions & 3 deletions cypress/e2e/users_spec/user_manage.cy.ts
Original file line number Diff line number Diff line change
@@ -10,10 +10,13 @@ describe("Manage User", () => {
const usernametolinkfacilitydoc1 = "dummydoctor4";
const usernametolinkfacilitydoc2 = "dummydoctor5";
const usernametolinkfacilitydoc3 = "dummydoctor6";
const usernametolinkskill = "devdistrictadmin";
const usernametolinkskill = "devdoctor";
const usernameforworkinghour = "devdistrictadmin";
const usernamerealname = "Dummy Doctor";
const facilitytolinkusername = "Dummy Shifting Center";
const facilitytolinkskill = "Dummy Facility 1";
const workinghour = "23";
const linkedskill = "General Medicine";

before(() => {
loginPage.loginAsDisctrictAdmin();
@@ -25,10 +28,50 @@ describe("Manage User", () => {
cy.awaitUrl("/users");
});

it("add working hour for a user and verify its reflection in card and user profile", () => {
// verify mandatory field error and select working hour for a user
it("linking skills for a users and verify its reflection in profile", () => {
// select the district user and select one skill link and verify its profile reflection
userPage.typeInSearchInput(usernameforworkinghour);
userPage.checkUsernameText(usernameforworkinghour);
manageUserPage.clicklinkedskillbutton();
manageUserPage.typeSkill(linkedskill);
manageUserPage.selectFacilityFromDropdown(linkedskill);
manageUserPage.clickAddSkillButton();
manageUserPage.clickCloseSlideOver();
manageUserPage.navigateToProfile();
manageUserPage.assertSkillInAlreadyLinkedSkills(linkedskill);
});

it("linking skills for a doctor users and verify its reflection in doctor connect", () => {
// select a doctor user and link and unlink same skill twice and verify the badge is only shown once in doctor connect
userPage.typeInSearchInput(usernametolinkskill);
userPage.checkUsernameText(usernametolinkskill);
manageUserPage.clicklinkedskillbutton();
manageUserPage.typeSkill(linkedskill);
manageUserPage.selectFacilityFromDropdown(linkedskill);
manageUserPage.clickAddSkillButton();
manageUserPage.clickCloseSlideOver();
cy.wait(5000); // temporary hack to fix the failure
manageUserPage.clicklinkedskillbutton();
manageUserPage.assertSkillInAddedUserSkills(linkedskill);
manageUserPage.clickUnlinkSkill();
manageUserPage.clickSubmit();
manageUserPage.typeSkill(linkedskill);
manageUserPage.selectFacilityFromDropdown(linkedskill);
manageUserPage.clickAddSkillButton();
manageUserPage.clickCloseSlideOver();
// verifying the doctor connect
manageUserPage.navigateToFacility();
manageUserPage.typeFacilitySearch(facilitytolinkskill);
manageUserPage.assertFacilityInCard(facilitytolinkskill);
manageUserPage.clickFacilityPatients();
manageUserPage.clickDoctorConnectButton();
manageUserPage.assertSkillIndoctorconnect(linkedskill);
});

it("add working hour for a user and verify its reflection in card and user profile", () => {
// verify mandatory field error and select working hour for a user
userPage.typeInSearchInput(usernameforworkinghour);
userPage.checkUsernameText(usernameforworkinghour);
manageUserPage.clicksetaveragehourbutton();
manageUserPage.clearweeklyhourfield();
manageUserPage.clickSubmit();
34 changes: 34 additions & 0 deletions cypress/pageobject/Users/ManageUserPage.ts
Original file line number Diff line number Diff line change
@@ -103,10 +103,44 @@ export class ManageUserPage {
cy.get("#facility-patients").click();
}

clicklinkedskillbutton() {
cy.get("#skills").click();
}

clickAddSkillButton() {
cy.intercept("GET", "**/api/v1/skill/**").as("getSkills");
cy.get("#add-skill-button").click();
cy.wait("@getSkills").its("response.statusCode").should("eq", 200);
}

assertSkillInAlreadyLinkedSkills(skillName) {
cy.get("#already-linked-skills")
.contains(skillName)
.should("have.length", 1);
}

assertSkillIndoctorconnect(skillName) {
cy.get("#doctor-connect-home-doctor")
.contains(skillName)
.should("have.length", 1);
}

typeSkill(skillName) {
cy.get("#select-skill").click().type(skillName);
}

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

clickUnlinkSkill() {
cy.get("#unlink-skill").click();
}

assertSkillInAddedUserSkills(skillName) {
cy.get("#added-user-skills").should("contain", skillName);
}

assertDoctorConnectVisibility(realName) {
cy.get("#doctor-connect-home-doctor").should("contain.text", realName);
cy.get("#doctor-connect-remote-doctor").should("contain.text", realName);
3 changes: 3 additions & 0 deletions src/Components/Common/SkillSelect.tsx
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ import AutoCompleteAsync from "../Form/AutoCompleteAsync";
import { SkillObjectModel } from "../Users/models";

interface SkillSelectProps {
id?: string;
name: string;
errors?: string | undefined;
className?: string;
@@ -20,6 +21,7 @@ interface SkillSelectProps {

export const SkillSelect = (props: SkillSelectProps) => {
const {
id,
name,
multiple,
selected,
@@ -64,6 +66,7 @@ export const SkillSelect = (props: SkillSelectProps) => {

return (
<AutoCompleteAsync
id={id}
name={name}
multiple={multiple}
selected={selected}
3 changes: 3 additions & 0 deletions src/Components/Form/AutoCompleteAsync.tsx
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ import {
import { useTranslation } from "react-i18next";

interface Props {
id?: string;
name?: string;
selected: any | any[];
fetchData: (search: string) => Promise<any> | undefined;
@@ -31,6 +32,7 @@ interface Props {

const AutoCompleteAsync = (props: Props) => {
const {
id,
name,
selected,
fetchData,
@@ -82,6 +84,7 @@ const AutoCompleteAsync = (props: Props) => {
<div className="relative mt-1">
<div className="flex">
<Combobox.Input
id={id}
name={name}
className="cui-input-base truncate pr-16"
placeholder={
4 changes: 3 additions & 1 deletion src/Components/Users/SkillsSlideOver.tsx
Original file line number Diff line number Diff line change
@@ -117,6 +117,7 @@ export default ({ show, setShow, username }: IProps) => {
{!isLoading && (
<div className="tooltip flex items-center gap-2">
<SkillSelect
id="select-skill"
multiple={false}
name="skill"
disabled={!authorizeForAddSkill}
@@ -128,6 +129,7 @@ export default ({ show, setShow, username }: IProps) => {
username={username}
/>
<ButtonV2
id="add-skill-button"
disabled={!authorizeForAddSkill}
onClick={() => addSkill(username, selectedSkill)}
className="w-6rem"
@@ -146,7 +148,7 @@ export default ({ show, setShow, username }: IProps) => {
<CircularProgress />
</div>
) : (
<div className="mb-2 mt-4">
<div className="mb-2 mt-4" id="added-user-skills">
{hasSkills ? (
<SkillsArray
isLoading={isLoading}
1 change: 1 addition & 0 deletions src/Components/Users/SkillsSlideOverComponents.tsx
Original file line number Diff line number Diff line change
@@ -45,6 +45,7 @@ export const SkillsArray = ({
<div className="text-lg font-bold">{skill.skill_object.name}</div>
<div>
<ButtonV2
id="unlink-skill"
size="small"
variant="danger"
ghost={true}
5 changes: 4 additions & 1 deletion src/Components/Users/UserProfile.tsx
Original file line number Diff line number Diff line change
@@ -559,7 +559,10 @@ export default function UserProfile() {
Skills
</dt>
<dd className="mt-1 text-sm leading-5 text-gray-900">
<div className="flex flex-wrap gap-2">
<div
className="flex flex-wrap gap-2"
id="already-linked-skills"
>
{details.skills && details.skills.length
? details.skills?.map((skill: SkillObjectModel) => {
return (