Skip to content

Commit

Permalink
update test and change const cname
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 authored and MasterEvarior committed Nov 6, 2024
1 parent 5e3c614 commit 66803d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import { BehaviorSubject, map, Observable, Subject, Subscription } from 'rxjs';
styleUrl: 'okr-tangram.component.scss',
})
export class OkrTangramComponent {
private readonly defaultTrianglesSrc = 'assets/images/empty.svg';
private readonly DEFAULT_TRIANGLE_SRC = 'assets/images/empty.svg';
trianglesSrc$ = new Observable<string>();

constructor(private readonly configService: ConfigService) {
this.trianglesSrc$ = this.configService.config$.pipe(map((config) => config.triangles || this.defaultTrianglesSrc));
this.trianglesSrc$ = this.configService.config$.pipe(
map((config) => config.triangles || this.DEFAULT_TRIANGLE_SRC),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatTableModule } from '@angular/material/table';
import { testUser, users } from '../shared/testData';
import { UserService } from '../services/user.service';
import { ConfigService } from '../services/config.service';

describe('TeamManagementComponent', () => {
let component: TeamManagementComponent;
Expand All @@ -37,6 +38,10 @@ describe('TeamManagementComponent', () => {
getUsers: () => of(users),
};

const configServiceMock = {
config$: of({}),
};

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
Expand Down Expand Up @@ -69,6 +74,7 @@ describe('TeamManagementComponent', () => {
providers: [
{ provide: ActivatedRoute, useValue: activatedRouteMock },
{ provide: UserService, useValue: userServiceMock },
{ provide: ConfigService, useValue: configServiceMock },
],
}).compileComponents();
});
Expand Down

0 comments on commit 66803d3

Please sign in to comment.