diff --git a/frontend/cypress/e2e/login.cy.ts b/frontend/cypress/e2e/login.cy.ts index 334b8b1cd3..0552d9a0d2 100644 --- a/frontend/cypress/e2e/login.cy.ts +++ b/frontend/cypress/e2e/login.cy.ts @@ -7,12 +7,12 @@ describe('OKR Login', () => { it('Login and check correct name is displayed', () => { cy.title().should('equal', 'Puzzle OKR'); - cy.get("pzsh-menu-dropdown > div[slot='toggle']").contains(users.gl.name); + cy.getByTestId('user-name').contains(users.gl.name); }); it('Login and logout', () => { cy.title().should('equal', 'Puzzle OKR'); - cy.get("pzsh-menu-dropdown > div[slot='toggle']").click(); + cy.getByTestId('user-options').click(); cy.getByTestId('logout').click(); cy.origin(Cypress.env('login_url'), () => { cy.url().should('include', Cypress.env('login_url')); diff --git a/frontend/src/app/application-top-bar/application-top-bar.component.html b/frontend/src/app/application-top-bar/application-top-bar.component.html index bd0df16c64..edb8d90cba 100644 --- a/frontend/src/app/application-top-bar/application-top-bar.component.html +++ b/frontend/src/app/application-top-bar/application-top-bar.component.html @@ -15,6 +15,7 @@ (menuClosed)="menuIsOpen = false" (menuOpened)="menuIsOpen = true" [matMenuTriggerFor]="menu" + [attr.data-testId]="'user-options'" class="topBarEntry text-white me-md-5 me-1" mat-button > @@ -23,7 +24,7 @@ person_outline -

{{ username | async }}

+

{{ username | async }}

expand_more expand_less diff --git a/frontend/src/app/overview/overview.component.ts b/frontend/src/app/overview/overview.component.ts index 2693252fa9..a8cf954da4 100644 --- a/frontend/src/app/overview/overview.component.ts +++ b/frontend/src/app/overview/overview.component.ts @@ -40,8 +40,8 @@ export class OverviewComponent implements OnDestroy { .subscribe(() => this.loadOverviewWithParams()); combineLatest([ - >refreshDataService.teamFilterReady, - >refreshDataService.quarterFilterReady, + refreshDataService.teamFilterReady.asObservable(), + refreshDataService.quarterFilterReady.asObservable(), ]) .pipe(take(1)) .subscribe(() => {