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

Re-build sidebar UI #8680

Merged
merged 17 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading