Skip to content

Commit

Permalink
fix locale sort's path and fix format script to sort cypress dir (ohc…
Browse files Browse the repository at this point in the history
…network#9070)

Co-authored-by: rithviknishad <[email protected]>
  • Loading branch information
JavidSumra and rithviknishad authored Nov 9, 2024
1 parent cc368a9 commit 84fdffe
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 15 deletions.
9 changes: 5 additions & 4 deletions cypress/e2e/facility_spec/FacilityLocation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { v4 as uuidv4 } from "uuid";

import { AssetPage } from "../../pageobject/Asset/AssetCreation";
import { UserCreationPage } from "../../pageobject/Users/UserCreation";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
import FacilityLocation from "../../pageobject/Facility/FacilityLocation";
import { AssetPagination } from "../../pageobject/Asset/AssetPagination";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
import FacilityHome from "../../pageobject/Facility/FacilityHome";
import { v4 as uuidv4 } from "uuid";
import FacilityLocation from "../../pageobject/Facility/FacilityLocation";
import { UserCreationPage } from "../../pageobject/Users/UserCreation";

describe("Location Management Section", () => {
const assetPage = new AssetPage();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/users_spec/UsersProfile.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import LoginPage from "../../pageobject/Login/LoginPage";
import UserProfilePage from "../../pageobject/Users/UserProfilePage";
import ManageUserPage from "../../pageobject/Users/ManageUserPage";
import UserProfilePage from "../../pageobject/Users/UserProfilePage";

describe("Manage User Profile", () => {
const loginPage = new LoginPage();
Expand Down
5 changes: 2 additions & 3 deletions cypress/pageobject/Patient/PatientPredefined.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// PatientPredefined.js

import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import PatientMedicalHistory from "../../pageobject/Patient/PatientMedicalHistory";
import {
generatePhoneNumber,
generateEmergencyPhoneNumber,
generatePhoneNumber,
} from "../utils/constants";

class PatientPredefined {
Expand Down
15 changes: 12 additions & 3 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@
"compilerOptions": {
"baseUrl": "./",
"target": "es5",
"lib": ["es5", "dom", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020"],
"lib": [
"es5",
"dom",
"es2015",
"es2016",
"es2017",
"es2018",
"es2019",
"es2020"
],
"typeRoots": ["./support"],
"resolveJsonModule": true
},
"include": ["**/*.cy.ts", "support/commands.ts","**/*.ts"],
}
"include": ["**/*.cy.ts", "support/commands.ts", "**/*.ts"]
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"prepare": "husky",
"lint": "eslint ./src",
"lint-fix": "eslint ./src --fix",
"format": "prettier ./src --write",
"format": "prettier ./src ./cypress --write",
"sort-locales": "node ./scripts/sort-locales.js"
},
"dependencies": {
Expand Down Expand Up @@ -166,12 +166,12 @@
"eslint --fix",
"git update-index --again"
],
"src/Locale/*.json": [
"public/locale/*.json": [
"npm run sort-locales"
]
},
"engines": {
"node": ">=22.11.0"
},
"packageManager": "[email protected]"
}
}
2 changes: 1 addition & 1 deletion scripts/sort-locales.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const fs = require("fs");

const file = "src/Locale/en.json";
const file = "public/locale/en.json";

const data = JSON.parse(fs.readFileSync(file, "utf8"));

Expand Down

0 comments on commit 84fdffe

Please sign in to comment.