Skip to content

Commit

Permalink
Re-build sidebar UI (#8680)
Browse files Browse the repository at this point in the history
Co-authored-by: Mohammed Nihal <[email protected]>
  • Loading branch information
bodhish and nihal467 authored Oct 8, 2024
1 parent 8f55271 commit 6e4d06b
Show file tree
Hide file tree
Showing 32 changed files with 369 additions and 222 deletions.
4 changes: 2 additions & 2 deletions care.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const careConfig = {
dark: "https://cdn.ohc.network/header_logo.png",
}),
mainLogo: logo(env.REACT_MAIN_LOGO, {
light: "https://cdn.ohc.network/light-logo.svg",
dark: "https://cdn.ohc.network/black-logo.svg",
light: "/images/care_logo.svg",
dark: "/images/care_logo.svg",
}),
stateLogo: logo(env.REACT_STATE_LOGO),
customLogo: logo(env.REACT_CUSTOM_LOGO),
Expand Down
20 changes: 20 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/style/index.css",
"baseColor": "zinc",
"cssVariables": false,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
}
}
2 changes: 1 addition & 1 deletion cypress/e2e/auth_spec/auth.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe("Authorisation/Authentication", () => {
it("Try login as admin with correct password", () => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
cy.awaitUrl("/facility");
cy.get("p").contains("Sign Out").click();
cy.get("#sign-out-button").contains("Sign Out").click();
cy.url().should("include", "/");
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/auth_spec/roles.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe("authentication", () => {
});
afterEach(() => {
cy.log("Logging out");
cy.get("p").contains("Sign Out").click();
cy.get("#sign-out-button").contains("Sign Out").click();
cy.getLocalStorage("care_access_token").should("be.null");
cy.getLocalStorage("care_refresh_token").should("be.null");
cy.url().should("include", "/");
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/PatientDoctorNotes.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("Patient Discussion notes in the consultation page", () => {
cy.verifyNotification(discussionNotesSuccessMessage);
cy.closeNotification();
// verify the auto-switching of tab to nurse notes if the user is a nurse
cy.get("p").contains("Sign Out").click();
cy.get("#sign-out-button").contains("Sign Out").click();
loginPage.loginManuallyAsNurse();
loginPage.ensureLoggedIn();
cy.visit("/patients");
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/users_spec/UsersCreation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe("User Creation", () => {
});

it("Update the existing user profile and verify its reflection", () => {
userCreationPage.clickElementById("profilenamelink");
userCreationPage.clickElementById("user-profile-name");
userCreationPage.verifyElementContainsText(
"username-profile-details",
"devdistrictadmin",
Expand Down Expand Up @@ -128,7 +128,7 @@ describe("User Creation", () => {
});

it("Update the existing user profile Form Mandatory File Error", () => {
userCreationPage.clickElementById("profilenamelink");
userCreationPage.clickElementById("user-profile-name");
userCreationPage.clickElementById("edit-cancel-profile-button");
userCreationPage.clearIntoElementById("firstName");
userCreationPage.clearIntoElementById("lastName");
Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobject/Login/LoginPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class LoginPage {
}

ensureLoggedIn(): void {
cy.get("p").contains("Sign Out").should("exist");
cy.get("#sign-out-button").contains("Sign Out").should("exist");
}
}

Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobject/Users/ManageUserPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class ManageUserPage {

navigateToProfile() {
cy.intercept("GET", "**/api/v1/users/**").as("getUsers");
cy.get("#profilenamelink").click();
cy.get("#user-profile-name").click();
cy.wait("@getUsers").its("response.statusCode").should("eq", 200);
}

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<div class="temp-loading">
<img
class="App-logo"
src="https://cdn.ohc.network/light-logo.svg"
src="/images/care_logo_gray.svg"
alt="Care is loading"
/>
</div>
Expand Down
Loading

0 comments on commit 6e4d06b

Please sign in to comment.