From 8d4c9c77bff3121360ec9395a5f451c0d0bde7df Mon Sep 17 00:00:00 2001 From: Jun Siang Cheah Date: Wed, 15 May 2024 23:49:26 +0800 Subject: [PATCH] fix: settings cypress test after style changes --- cypress/e2e/settings.cy.ts | 8 ++------ src/lib/components/layout/Navbar.svelte | 1 + 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cypress/e2e/settings.cy.ts b/cypress/e2e/settings.cy.ts index 560ce9794..5db232faa 100644 --- a/cypress/e2e/settings.cy.ts +++ b/cypress/e2e/settings.cy.ts @@ -15,12 +15,8 @@ describe('Settings', () => { cy.loginAdmin(); // Visit the home page cy.visit('/'); - // Open the sidebar if it is not already open - cy.get('[aria-label="Open sidebar"]').then(() => { - cy.get('button[id="sidebar-toggle-button"]').click(); - }); - // Click on the profile link - cy.get('button').contains(adminUser.name).click(); + // Click on the user menu + cy.get('button[aria-label="User Menu"]').click(); // Click on the settings link cy.get('button').contains('Settings').click(); }); diff --git a/src/lib/components/layout/Navbar.svelte b/src/lib/components/layout/Navbar.svelte index 58f34536b..746dd5c5a 100644 --- a/src/lib/components/layout/Navbar.svelte +++ b/src/lib/components/layout/Navbar.svelte @@ -141,6 +141,7 @@ >