From 5ddca3ff84dd62576becee40e268b348b80cbbf3 Mon Sep 17 00:00:00 2001 From: Olivia Guyot Date: Wed, 15 Jan 2025 10:56:44 +0100 Subject: [PATCH] fix(ME): improve appearance and fonctionality of logout/profile buttons in sidebar --- .../src/e2e/dashboard.cy.ts | 6 +-- .../dashboard/sidebar/sidebar.component.html | 43 +++++++++---------- .../dashboard/sidebar/sidebar.component.ts | 18 ++++++-- .../src/assets/system-shut.svg | 11 ----- 4 files changed, 38 insertions(+), 40 deletions(-) delete mode 100644 apps/metadata-editor/src/assets/system-shut.svg diff --git a/apps/metadata-editor-e2e/src/e2e/dashboard.cy.ts b/apps/metadata-editor-e2e/src/e2e/dashboard.cy.ts index 07e5185ad8..7a0f58dc86 100644 --- a/apps/metadata-editor-e2e/src/e2e/dashboard.cy.ts +++ b/apps/metadata-editor-e2e/src/e2e/dashboard.cy.ts @@ -523,9 +523,7 @@ describe('dashboard (authenticated)', () => { it('should navigate to the account settings page', () => { cy.visit('/catalog/search') cy.get('md-editor-sidebar') - .find('gn-ui-button') - .first() - .find('a') + .find('[data-cy=account-link]') .invoke('removeAttr', 'target') .click() cy.url().should('include', '/admin.console') @@ -549,7 +547,7 @@ describe('Logging in and out', () => { }) it('logs out the user', () => { cy.get('gn-ui-avatar').should('be.visible') - cy.get('md-editor-sidebar').find('gn-ui-button').eq(1).click() + cy.get('md-editor-sidebar').find('[data-cy=logout-button]').click() cy.url().should('include', '/catalog.signin?redirect=') cy.get('gn-ui-avatar').should('not.exist') }) diff --git a/apps/metadata-editor/src/app/dashboard/sidebar/sidebar.component.html b/apps/metadata-editor/src/app/dashboard/sidebar/sidebar.component.html index d20f4982ee..0daad02611 100644 --- a/apps/metadata-editor/src/app/dashboard/sidebar/sidebar.component.html +++ b/apps/metadata-editor/src/app/dashboard/sidebar/sidebar.component.html @@ -16,31 +16,30 @@
- - - - - + + - +
@@ -52,7 +51,7 @@ - - - - - - - - - -