Skip to content

Commit

Permalink
Bump cypress version and remove unncecessary imports of "local-cypres…
Browse files Browse the repository at this point in the history
…s" (#8485)
  • Loading branch information
rithviknishad authored Sep 4, 2024
1 parent 83c56f0 commit 8b7cdb7
Show file tree
Hide file tree
Showing 42 changed files with 16 additions and 91 deletions.
5 changes: 1 addition & 4 deletions cypress/e2e/assets_spec/asset_homepage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference types="cypress" />

import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import { AssetSearchPage } from "../../pageobject/Asset/AssetSearch";
import { AssetQRScanPage } from "../../pageobject/Asset/AssetQRScan";
import { AssetPagination } from "../../pageobject/Asset/AssetPagination";
Expand Down Expand Up @@ -65,7 +62,7 @@ describe("Asset Tab", () => {
"Dummy Facility 40",
"ACTIVE",
"ONVIF Camera",
"Camera Loc"
"Camera Loc",
);
assetFilters.clickadvancefilter();
assetFilters.clickslideoverbackbutton(); // to verify the back button doesn't clear applied filters
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/assets_spec/assets_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/// <reference types="cypress" />
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import { AssetPage } from "../../pageobject/Asset/AssetCreation";
import { v4 as uuidv4 } from "uuid";
import LoginPage from "../../pageobject/Login/LoginPage";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/assets_spec/assets_manage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import { AssetPage } from "../../pageobject/Asset/AssetCreation";
import LoginPage from "../../pageobject/Login/LoginPage";
import { AssetSearchPage } from "../../pageobject/Asset/AssetSearch";
Expand Down
4 changes: 0 additions & 4 deletions cypress/e2e/auth_spec/auth.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/// <reference types="cypress" />

import { cy, describe, beforeEach, it } from "local-cypress";

describe("Authorisation/Authentication", () => {
beforeEach(() => {
cy.awaitUrl("/", true);
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/auth_spec/forget_password.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { cy, describe, beforeEach, it } from "local-cypress";

describe("Forgot Password", () => {
beforeEach(() => {
cy.awaitUrl("/", true);
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/auth_spec/redirect.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cy, describe, it, beforeEach, Cypress } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";

describe("redirect", () => {
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/auth_spec/roles.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, cy, describe, it } from "local-cypress";
import * as users from "../../fixtures/users.json";

describe("authentication", () => {
Expand Down
12 changes: 1 addition & 11 deletions cypress/e2e/external_results_spec/external_result.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
import {
cy,
describe,
it,
before,
beforeEach,
afterEach,
expect,
} from "local-cypress";

describe("Edit Profile Testing", () => {
before(() => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
Expand Down Expand Up @@ -52,7 +42,7 @@ describe("Edit Profile Testing", () => {
});

it("export", () => {
cy.intercept("**", (req: Cypress.Request) => {
cy.intercept("**", (req) => {
const url = new URL(req.url);
const params = new URLSearchParams(url.search);
if (
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/external_results_spec/filter.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";

describe("External Results Filters", () => {
before(() => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
Expand Down
10 changes: 0 additions & 10 deletions cypress/e2e/facility_spec/facility_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// FacilityCreation
import {
cy,
describe,
before,
beforeEach,
it,
afterEach,
expect,
} from "local-cypress";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
import LoginPage from "../../pageobject/Login/LoginPage";
import FacilityHome from "../../pageobject/Facility/FacilityHome";
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/facility_spec/facility_homepage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FacilityCreation
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";

import LoginPage from "../../pageobject/Login/LoginPage";
import FacilityHome from "../../pageobject/Facility/FacilityHome";
import ManageUserPage from "../../pageobject/Users/ManageUserPage";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/facility_spec/facility_manage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import FacilityManage from "../../pageobject/Facility/FacilityManage";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/facility_spec/inventory.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
import LoginPage from "../../pageobject/Login/LoginPage";
import FacilityHome from "../../pageobject/Facility/FacilityHome";
Expand Down
15 changes: 7 additions & 8 deletions cypress/e2e/facility_spec/locations.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import { AssetPage } from "../../pageobject/Asset/AssetCreation";
import { UserCreationPage } from "../../pageobject/Users/UserCreation";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
Expand Down Expand Up @@ -92,7 +91,7 @@ describe("Location Management Section", () => {
facilityLocation.selectBedType(bedType);
assetPage.clickassetupdatebutton();
facilityLocation.verifyNotification(
"Name - Bed with same name already exists in location"
"Name - Bed with same name already exists in location",
);
facilityHome.verifyAndCloseNotifyModal();
// edit the created bed
Expand Down Expand Up @@ -185,7 +184,7 @@ describe("Location Management Section", () => {
facilityLocation.deleteLocation("Test Location");
assetPage.clickassetupdatebutton();
facilityLocation.verifyNotification(
"Location Test Location deleted successfully"
"Location Test Location deleted successfully",
);
facilityLocation.closeNotification();
});
Expand All @@ -204,7 +203,7 @@ describe("Location Management Section", () => {
facilityLocation.deleteLocation("Test Location with Beds");
assetPage.clickassetupdatebutton();
facilityLocation.verifyNotification(
"Cannot delete a Location with associated Beds"
"Cannot delete a Location with associated Beds",
);
facilityLocation.closeNotification();

Expand All @@ -219,7 +218,7 @@ describe("Location Management Section", () => {
facilityLocation.deleteLocation("Test Location with Beds");
assetPage.clickassetupdatebutton();
facilityLocation.verifyNotification(
"Location Test Location with Beds deleted successfully"
"Location Test Location with Beds deleted successfully",
);
facilityLocation.closeNotification();
});
Expand Down Expand Up @@ -249,14 +248,14 @@ describe("Location Management Section", () => {
"Vendor's Name",
serialNumber,
"25122021",
"Test note for asset creation!"
"Test note for asset creation!",
);
assetPage.clickassetupdatebutton();
facilityLocation.loadLocationManagementPage("Dummy Shifting Center");
facilityLocation.deleteLocation("Test Location with linked Assets");
assetPage.clickassetupdatebutton();
facilityLocation.verifyNotification(
"Cannot delete a Location with associated Assets"
"Cannot delete a Location with associated Assets",
);
facilityLocation.closeNotification();

Expand All @@ -271,7 +270,7 @@ describe("Location Management Section", () => {
facilityLocation.deleteLocation("Test Location with linked Assets");
assetPage.clickassetupdatebutton();
facilityLocation.verifyNotification(
"Location Test Location with linked Assets deleted successfully"
"Location Test Location with linked Assets deleted successfully",
);
facilityLocation.closeNotification();
});
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_consultation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import { PatientConsultationPage } from "../../pageobject/Patient/PatientConsultation";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_discharge.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import PatientDischarge from "../../pageobject/Patient/PatientDischarge";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_fileupload.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import { PatientFileUpload } from "../../pageobject/Patient/PatientFileupload";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_logupdate.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientConsultationPage } from "../../pageobject/Patient/PatientConsultation";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_manage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientConsultationPage } from "../../pageobject/Patient/PatientConsultation";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_prescription.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import PatientPrescription from "../../pageobject/Patient/PatientPrescription";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_registration.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/resource_spec/filter.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";

describe("Resource filter", () => {
before(() => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/resource_spec/resources.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import ResourcePage from "../../pageobject/Resource/ResourcePage";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/sample_test_spec/filter.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";

describe("Sample Filter", () => {
before(() => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/sample_test_spec/sample_test.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";

describe("Sample List", () => {
before(() => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/shifting_spec/filter.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import ShiftingPage from "../../pageobject/Shift/ShiftFilters";

describe("Shifting section filter", () => {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/shifting_spec/shifting.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";

describe("Shifting Page", () => {
before(() => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/users_spec/user_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
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";
Expand Down
3 changes: 0 additions & 3 deletions cypress/e2e/users_spec/user_homepage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference types="cypress" />

import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { UserPage } from "../../pageobject/Users/UserSearch";

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/users_spec/user_manage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
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";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/users_spec/user_profile.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import UserProfilePage from "../../pageobject/Users/UserProfilePage";
import ManageUserPage from "../../pageobject/Users/ManageUserPage";
Expand Down
1 change: 0 additions & 1 deletion cypress/pageobject/Asset/AssetCreation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// assetPage.ts
import { cy, expect } from "local-cypress";

export class AssetPage {
createAsset() {
Expand Down
1 change: 0 additions & 1 deletion cypress/pageobject/Facility/FacilityCreation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// FacilityPage.ts
import { cy } from "local-cypress";

class FacilityPage {
visitCreateFacilityPage() {
Expand Down
2 changes: 0 additions & 2 deletions cypress/pageobject/Facility/FacilityHome.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// cypress/support/pageObjects/FacilityHome.ts

class FacilityHome {
// Selectors
exportButton = "#export-button";
Expand Down
1 change: 0 additions & 1 deletion cypress/pageobject/Login/LoginPage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// LoginPage.ts
import { cy } from "local-cypress";

class LoginPage {
loginAsDisctrictAdmin(): void {
Expand Down
2 changes: 0 additions & 2 deletions cypress/pageobject/Patient/PatientFileupload.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { cy } from "local-cypress";

export class PatientFileUpload {
clickFileUploadIcon() {
cy.get("#patient-details").click();
Expand Down
1 change: 0 additions & 1 deletion cypress/pageobject/Patient/PatientPrescription.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cy } from "local-cypress";
export class PatientPrescription {
clickAddPrescription() {
cy.get("#add-prescription").scrollIntoView();
Expand Down
2 changes: 0 additions & 2 deletions cypress/pageobject/Users/UserProfilePage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { cy } from "local-cypress";

export default class UserProfilePage {
assertVideoConnectLink(link: string) {
cy.get("#videoconnectlink-profile-details").should("contain.text", link);
Expand Down
2 changes: 0 additions & 2 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import "cypress-localstorage-commands";

import { Cypress, cy } from "local-cypress";

const apiUrl = Cypress.env("API_URL");

Cypress.Commands.add("login", (username: string, password: string) => {
Expand Down
1 change: 0 additions & 1 deletion cypress/support/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="cypress" />
import "./commands";

declare global {
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@vitejs/plugin-react-swc": "^3.6.0",
"autoprefixer": "^10.4.19",
"cypress": "^13.13.1",
"cypress": "^13.14.1",
"cypress-localstorage-commands": "^2.2.5",
"cypress-split": "^1.23.2",
"eslint-config-prettier": "^9.1.0",
Expand Down

0 comments on commit 8b7cdb7

Please sign in to comment.