Skip to content

Commit

Permalink
Merge branch 'develop' into test1#6858
Browse files Browse the repository at this point in the history
  • Loading branch information
konavivekramakrishna authored Jan 1, 2024
2 parents dbb1310 + f066a36 commit 49874bd
Show file tree
Hide file tree
Showing 52 changed files with 992 additions and 960 deletions.
77 changes: 42 additions & 35 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ jobs:
needs: build-staging
name: Deploy to staging GCP cluster
runs-on: ubuntu-latest
- uses: actions/setup-node@v3
with:
node-version: '20'
environment:
name: Staging-GCP
url: https://care-staging.ohc.network/
Expand All @@ -202,15 +199,19 @@ jobs:
token: ${{ secrets.GIT_ACCESS_TOKEN }}
path: kube
ref: main

- uses: actions/setup-node@v3
with:
node-version: '20'

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v2
- 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@v2
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ secrets.GKE_CLUSTER }}
location: ${{ secrets.GKE_ZONE }}
Expand All @@ -233,9 +234,6 @@ jobs:
needs: build-production
name: Deploy to GKE Manipur
runs-on: ubuntu-latest
- uses: actions/setup-node@v3
with:
node-version: '20'
environment:
name: Production-Manipur
url: https://care.mn.gov.in
Expand All @@ -248,14 +246,18 @@ jobs:
path: kube
ref: main

- uses: actions/setup-node@v3
with:
node-version: '20'

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v2
- 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@v2
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ secrets.GKE_CLUSTER }}
location: ${{ secrets.GKE_ZONE }}
Expand All @@ -278,9 +280,6 @@ jobs:
needs: build-production
name: Deploy to GKE Karnataka
runs-on: ubuntu-latest
- uses: actions/setup-node@v3
with:
node-version: '20'
environment:
name: Production-Karnataka
url: https://karnataka.care
Expand All @@ -293,14 +292,18 @@ jobs:
path: kube
ref: main

- uses: actions/setup-node@v3
with:
node-version: '20'

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v2
- 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@v2
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ secrets.GKE_CLUSTER }}
location: ${{ secrets.GKE_ZONE }}
Expand All @@ -323,9 +326,6 @@ jobs:
needs: build-production
name: Deploy to GKE Sikkim
runs-on: ubuntu-latest
- uses: actions/setup-node@v3
with:
node-version: '20'
environment:
name: Production-Sikkim
url: https://care.sikkim.gov.in
Expand All @@ -338,14 +338,18 @@ jobs:
path: kube
ref: main

- uses: actions/setup-node@v3
with:
node-version: '20'

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v2
- 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@v2
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ secrets.GKE_CLUSTER }}
location: ${{ secrets.GKE_ZONE }}
Expand All @@ -368,9 +372,6 @@ jobs:
needs: build-production
name: Deploy to GKE Assam
runs-on: ubuntu-latest
- uses: actions/setup-node@v3
with:
node-version: '20'
environment:
name: Production-Assam
url: https://care.assam.gov.in
Expand All @@ -383,14 +384,18 @@ jobs:
path: kube
ref: main

- uses: actions/setup-node@v3
with:
node-version: '20'

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v2
- 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@v2
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ secrets.GKE_CLUSTER }}
location: ${{ secrets.GKE_ZONE }}
Expand All @@ -413,9 +418,6 @@ jobs:
needs: build-production
name: Deploy to GKE Nagaland
runs-on: ubuntu-latest
- uses: actions/setup-node@v3
with:
node-version: '20'
environment:
name: Production - Nagaland
url: https://care.nagaland.gov.in
Expand All @@ -427,15 +429,19 @@ jobs:
token: ${{ secrets.GIT_ACCESS_TOKEN }}
path: kube
ref: main

- uses: actions/setup-node@v3
with:
node-version: '20'

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v2
- 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@v2
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ secrets.GKE_CLUSTER }}
location: ${{ secrets.GKE_ZONE }}
Expand All @@ -458,9 +464,6 @@ jobs:
needs: build-production
name: Deploy to GKE Meghalaya
runs-on: ubuntu-latest
- uses: actions/setup-node@v3
with:
node-version: '20'
environment:
name: Production-Meghalaya
url: https://care.meghealth.gov.in
Expand All @@ -472,15 +475,19 @@ jobs:
token: ${{ secrets.GIT_ACCESS_TOKEN }}
path: kube
ref: main

- uses: actions/setup-node@v3
with:
node-version: '20'

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v2
- 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@v2
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ secrets.GKE_CLUSTER }}
location: ${{ secrets.GKE_ZONE }}
Expand Down
35 changes: 33 additions & 2 deletions cypress/e2e/facility_spec/facility_homepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,23 @@ import FacilityHome from "../../pageobject/Facility/FacilityHome";
import ManageUserPage from "../../pageobject/Users/ManageUserPage";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
import { UserPage } from "../../pageobject/Users/UserSearch";
import { AssetPagination } from "../../pageobject/Asset/AssetPagination";

describe("Facility Homepage Function", () => {
const loginPage = new LoginPage();
const facilityHome = new FacilityHome();
const facilityPage = new FacilityPage();
const manageUserPage = new ManageUserPage();
const userPage = new UserPage();
const assetPagination = new AssetPagination();
const facilitiesAlias = "downloadFacilitiesCSV";
const capacitiesAlias = "downloadCapacitiesCSV";
const doctorsAlias = "downloadDoctorsCSV";
const triagesAlias = "downloadTriagesCSV";
const facilityname = "Dummy Facility 1";
const statename = "Kerala";
const district = "Ernakulam";
const localbody = "Aikaranad";
const facilitytype = "Private Hospital";

before(() => {
Expand All @@ -31,24 +34,52 @@ describe("Facility Homepage Function", () => {
cy.awaitUrl("/facility");
});

it("Verify the Facility card button redirection", () => {
// view cns button
facilityHome.clickViewCnsButton();
facilityHome.verifyCnsUrl();
facilityHome.navigateBack();
// view notify button
facilityHome.clickFacilityNotifyButton();
facilityHome.verifyAndCloseNotifyModal();
// view facility button
facilityHome.clickViewFacilityDetails();
facilityPage.getFacilityName().should("be.visible");
facilityHome.verifyFacilityDetailsUrl();
facilityHome.navigateBack();
// view patient button
manageUserPage.clickFacilityPatients();
facilityHome.verifyPatientListVisibility();
facilityHome.verifyPatientListUrl();
facilityHome.navigateBack();
// occupancy badge
facilityHome.verifyOccupancyBadgeVisibility();
});

it("Verify the functionality of advance filter", () => {
userPage.clickAdvancedFilters();
facilityPage.selectState(statename);
facilityPage.selectDistrict(district);
// facilityPage.selectLocalBody("Anthikad Grama"); current dummy data have issue in local body
facilityPage.selectLocalBody(localbody);
facilityPage.clickUpdateFacilityType(facilitytype);
userPage.applyFilter();
facilityPage.verifyStateBadgeContent(statename);
facilityPage.verifyDistrictBadgeContent(district);
facilityPage.verifyLocalBodyBadgeContent(localbody);
facilityPage.verifyFacilityTypeBadgeContent(facilitytype);
manageUserPage.assertFacilityInCard(facilityname);
userPage.clearFilters();
userPage.verifyDataTestIdNotVisible("State");
userPage.verifyDataTestIdNotVisible("District");
userPage.verifyDataTestIdNotVisible("Facility type");
userPage.verifyDataTestIdNotVisible("Local Body");
});

it("Search a facility in homepage", () => {
it("Search a facility in homepage and pagination", () => {
// pagination of the facility page
assetPagination.navigateToNextPage();
assetPagination.navigateToPreviousPage();
// search for a facility
manageUserPage.typeFacilitySearch(facilityname);
facilityPage.verifyFacilityBadgeContent(facilityname);
manageUserPage.assertFacilityInCard(facilityname);
Expand Down
Loading

0 comments on commit 49874bd

Please sign in to comment.