Skip to content

Commit

Permalink
chore: fix webapp build
Browse files Browse the repository at this point in the history
  • Loading branch information
mghilardelli committed Oct 16, 2024
1 parent e430b61 commit 23eb95a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions webapp/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
import { AuthService, Tenant } from "./auth.service";
import { AuthService } from "./auth.service";
import { MqService } from "./mq.service";
import { OidcSecurityService, UserDataResult } from "angular-auth-oidc-client";
import { signal } from "@angular/core";
import { of } from "rxjs";
import { SbbIconTestingModule } from "@sbb-esta/angular/icon/testing";
import { NoopAnimationsModule } from "@angular/platform-browser/animations";
import { By } from "@angular/platform-browser";
import { SbbMenuItem } from "@sbb-esta/angular/menu";
import { RouterTestingModule } from "@angular/router/testing";

const mockAuth: Partial<AuthService> = {
tenant: () => of({name: 'Organisation'} as Tenant)
};
const mockAuth: Partial<AuthService> = {};
const mockOidc: Partial<OidcSecurityService> = {
userData: signal({userData: {name: 'User'}} as UserDataResult),
logoffLocalMultiple: () => Promise.resolve(true),
Expand Down Expand Up @@ -51,10 +48,10 @@ describe('AppComponent', () => {
).toContain('DAS playground');
});

it('should render organisation', () => {
it('should render name', () => {
expect(
fixture.nativeElement.querySelector('.sbb-usermenu-user-info-display-name').textContent,
).toContain('Organisation');
).toContain('User');
});

it('should logout', () => {
Expand Down

0 comments on commit 23eb95a

Please sign in to comment.