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
Show file tree
Hide file tree
Changes from all commits
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
84 changes: 84 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,48 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

deploy-staging-gcp:
needs: build-staging
name: Deploy to staging GCP cluster
runs-on: ubuntu-latest
environment:
name: Staging-GCP
url: https://care-staging.ohc.network/
steps:
- name: Checkout Kube Config
uses: actions/checkout@v3
with:
repository: coronasafe/care-staging-gcp
token: ${{ secrets.GIT_ACCESS_TOKEN }}
path: kube
ref: main

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
with:
service_account_key: ${{ secrets.GKE_SA_KEY }}
project_id: ${{ secrets.GKE_PROJECT }}

# Get the GKE credentials so we can deploy to the cluster
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ secrets.GKE_CLUSTER }}
location: ${{ secrets.GKE_ZONE }}
credentials: ${{ secrets.GKE_SA_KEY }}

- name: install kubectl
uses: azure/[email protected]
with:
version: "v1.23.6"
id: install

- name: Deploy Care Fe Production
run: |
mkdir -p $HOME/.kube/
cd kube/deployments/
sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml
kubectl apply -f care-fe.yaml

deploy-production-manipur:
needs: build-production
name: Deploy to GKE Manipur
Expand Down Expand Up @@ -389,3 +431,45 @@ jobs:
cd kube/deployments/
sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml
kubectl apply -f care-fe.yaml

deploy-production-meghalaya:
needs: build-production
name: Deploy to GKE Meghalaya
runs-on: ubuntu-latest
environment:
name: Production-Meghalaya
url: https://care.meghealth.gov.in
steps:
- name: Checkout Kube Config
uses: actions/checkout@v3
with:
repository: coronasafe/ml-care-infra
token: ${{ secrets.GIT_ACCESS_TOKEN }}
path: kube
ref: main

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
with:
service_account_key: ${{ secrets.GKE_SA_KEY }}
project_id: ${{ secrets.GKE_PROJECT }}

# Get the GKE credentials, so we can deploy to the cluster
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ secrets.GKE_CLUSTER }}
location: ${{ secrets.GKE_ZONE }}
credentials: ${{ secrets.GKE_SA_KEY }}

- name: install kubectl
uses: azure/[email protected]
with:
version: "v1.23.6"
id: install

- name: Deploy Care Fe Production
run: |
mkdir -p $HOME/.kube/
cd kube/deployments/
sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml
kubectl apply -f care-fe.yaml
17 changes: 0 additions & 17 deletions cypress/e2e/assets_spec/assets_manage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/shifting_spec/filter.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe("Shifting section filter", () => {
shiftingPage.filterByFacility(
"Dummy Shifting",
"Dummy Shifting",
"District Admin"
"District"
);

shiftingPage.facilityAssignedBadge().should("exist");
Expand Down
199 changes: 199 additions & 0 deletions cypress/e2e/users_spec/user_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { AssetSearchPage } from "../../pageobject/Asset/AssetSearch";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
import { UserPage } from "../../pageobject/Users/UserSearch";
import { UserCreationPage } from "../../pageobject/Users/UserCreation";
import {
emergency_phone_number,
phone_number,
} from "../../pageobject/constants";

describe("User Creation", () => {
const userPage = new UserPage();
const loginPage = new LoginPage();
const userCreationPage = new UserCreationPage();
const facilityPage = new FacilityPage();
const assetSearchPage = new AssetSearchPage();
const fillFacilityName = "Dummy Facility 1";
const makeid = (length: number) => {
let result = "";
const characters = "abcdefghijklmnopqrstuvwxyz0123456789";
const charactersLength = characters.length;
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
};
const username = makeid(25);
const alreadylinkedusersviews = [
"devdoctor",
"devstaff2",
"devdistrictadmin",
];
const EXPECTED_ERROR_MESSAGES = [
"Please select the User Type",
"Please enter valid phone number",
"Please enter the username",
"Please enter date in YYYY/MM/DD format",
"Please enter the password",
"Confirm password is required",
"First Name is required",
"Last Name is required",
"Please enter a valid email address",
"Please select the Gender",
"Please select the state",
"Please select the district",
"Please select the local body",
];

const EXPECTED_PROFILE_ERROR_MESSAGES = [
"Field is required",
"Field is required",
"This field is required",
"Please enter valid phone number",
"This field is required",
"This field is required",
];

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

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

it("Update the existing user profile and verify its reflection", () => {
userCreationPage.clickElementById("profilenamelink");
userCreationPage.verifyElementContainsText(
"username-profile-details",
"devdistrictadmin"
);
userCreationPage.clickElementById("edit-cancel-profile-button");
userCreationPage.typeIntoElementByIdPostClear(
"firstName",
"District Editted"
);
userCreationPage.typeIntoElementByIdPostClear("lastName", "Cypress");
userCreationPage.typeIntoElementByIdPostClear("age", "22");
userCreationPage.selectDropdownOption("gender", "Male");
userCreationPage.typeIntoElementByIdPostClear(
"phoneNumber",
"+91" + phone_number
);
userCreationPage.typeIntoElementByIdPostClear(
"altPhoneNumber",
"+91" + emergency_phone_number
);
userCreationPage.typeIntoElementByIdPostClear("email", "[email protected]");
userCreationPage.typeIntoElementByIdPostClear("weekly_working_hours", "14");
userCreationPage.clickElementById("submit");
userCreationPage.verifyElementContainsText(
"contactno-profile-details",
"+91" + phone_number
);
userCreationPage.verifyElementContainsText(
"whatsapp-profile-details",
"+91" + emergency_phone_number
);
userCreationPage.verifyElementContainsText(
"firstname-profile-details",
"District Editted"
);
userCreationPage.verifyElementContainsText(
"lastname-profile-details",
"Cypress"
);
userCreationPage.verifyElementContainsText("age-profile-details", "22");
userCreationPage.verifyElementContainsText(
"emailid-profile-details",
"[email protected]"
);
userCreationPage.verifyElementContainsText(
"gender-profile-details",
"Male"
);
userCreationPage.verifyElementContainsText(
"averageworkinghour-profile-details",
"14"
);
});

it("Update the existing user profile Form Mandatory File Error", () => {
userCreationPage.clickElementById("profilenamelink");
userCreationPage.clickElementById("edit-cancel-profile-button");
userCreationPage.clearIntoElementById("firstName");
userCreationPage.clearIntoElementById("lastName");
userCreationPage.clearIntoElementById("age");
userCreationPage.clearIntoElementById("phoneNumber");
userCreationPage.clearIntoElementById("altPhoneNumber");
userCreationPage.clearIntoElementById("weekly_working_hours");
userCreationPage.clickElementById("submit");
userCreationPage.verifyErrorMessages(EXPECTED_PROFILE_ERROR_MESSAGES);
});

it("create new user and verify reflection", () => {
userCreationPage.clickElementById("addUserButton");
userCreationPage.selectFacility("Dummy Shifting Center");
userCreationPage.typeIntoElementById("username", username);
userCreationPage.typeIntoElementById("password", "Test@123");
userCreationPage.selectHomeFacility("Dummy Shifting Center");
userCreationPage.typeIntoElementById("phone_number", phone_number);
userCreationPage.setInputDate("date_of_birth", "date-input", "25081999");
userCreationPage.selectDropdownOption("user_type", "Doctor");
userCreationPage.typeIntoElementById("c_password", "Test@123");
userCreationPage.typeIntoElementById("doctor_qualification", "MBBS");
userCreationPage.typeIntoElementById("doctor_experience_commenced_on", "2");
userCreationPage.typeIntoElementById(
"doctor_medical_council_registration",
"123456789"
);
userCreationPage.typeIntoElementById("first_name", "cypress test");
userCreationPage.typeIntoElementById("last_name", "staff user");
userCreationPage.typeIntoElementById("email", "[email protected]");
userCreationPage.selectDropdownOption("gender", "Male");
userCreationPage.selectDropdownOption("state", "Kerala");
userCreationPage.selectDropdownOption("district", "Ernakulam");
userCreationPage.clickElementById("submit");
userCreationPage.verifyNotification("User added successfully");
userPage.typeInSearchInput(username);
userPage.checkUsernameText(username);
userCreationPage.verifyElementContainsText("name", "cypress test");
userCreationPage.verifyElementContainsText("role", "Doctor");
userCreationPage.verifyElementContainsText("district", "Ernakulam");
userCreationPage.verifyElementContainsText(
"home_facility",
"Dummy Shifting Center"
);
userCreationPage.verifyElementContainsText("doctor-qualification", "MBBS");
userCreationPage.verifyElementContainsText("doctor-experience", "2");
userCreationPage.verifyElementContainsText(
"medical-council-registration",
"123456789"
);
});

it("create new user form throwing mandatory field error", () => {
userCreationPage.clickElementById("addUserButton");
userCreationPage.clickElementById("submit");
userCreationPage.verifyErrorMessages(EXPECTED_ERROR_MESSAGES);
});

it("view user redirection from facility page", () => {
cy.visit("/facility");
assetSearchPage.typeSearchKeyword(fillFacilityName);
assetSearchPage.pressEnter();
facilityPage.verifyFacilityBadgeContent(fillFacilityName);
facilityPage.visitAlreadyCreatedFacility();
facilityPage.clickManageFacilityDropdown();
facilityPage.clickViewUsersOption();
userPage.verifyMultipleBadgesWithSameId(alreadylinkedusersviews);
});

afterEach(() => {
cy.saveLocalStorage();
});
});
Loading
Loading