Skip to content

Commit

Permalink
fix cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Nov 14, 2023
1 parent 9b0bf50 commit 12280cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions frontend/cypress/e2e/login.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
>
Expand All @@ -23,7 +24,7 @@
<mat-icon>person_outline</mat-icon>
</span>

<p class="fw-normal fs-6 d-none d-md-flex">{{ username | async }}</p>
<p class="fw-normal fs-6 d-none d-md-flex" [attr.data-testId]="'user-name'">{{ username | async }}</p>
<span class="mt-1">
<mat-icon *ngIf="!menuIsOpen">expand_more</mat-icon>
<mat-icon *ngIf="menuIsOpen">expand_less</mat-icon>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/overview/overview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export class OverviewComponent implements OnDestroy {
.subscribe(() => this.loadOverviewWithParams());

combineLatest([
<Observable<void>>refreshDataService.teamFilterReady,
<Observable<void>>refreshDataService.quarterFilterReady,
refreshDataService.teamFilterReady.asObservable(),
refreshDataService.quarterFilterReady.asObservable(),
])
.pipe(take(1))
.subscribe(() => {
Expand Down

0 comments on commit 12280cd

Please sign in to comment.