feat: add persistance to language selection
This commit is contained in:
@@ -1,30 +1,33 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ContactListTable } from './contact-list-table';
|
||||
import { STRINGS_INJECTOR } from '../../app.config';
|
||||
import { strings } from '../../strings';
|
||||
import { ContactService } from '../../services/contact.service';
|
||||
import { ContactDTO } from '../../models/ContactDTO';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { of } from 'rxjs';
|
||||
import { Router } from '@angular/router';
|
||||
import { LanguageManager } from '../../services/language-manager';
|
||||
|
||||
describe('ContactListTable', () => {
|
||||
let component: ContactListTable;
|
||||
let fixture: ComponentFixture<ContactListTable>;
|
||||
|
||||
let contactService: jasmine.SpyObj<ContactService>;
|
||||
let languageManager: jasmine.SpyObj<LanguageManager>;
|
||||
let router: jasmine.SpyObj<Router>;
|
||||
let CONTACT_LIST_MOCK: ContactDTO[];
|
||||
|
||||
beforeEach(async () => {
|
||||
contactService = jasmine.createSpyObj(ContactService.name, ['delete']);
|
||||
languageManager = jasmine.createSpyObj(LanguageManager.name, [], { strings: strings.en });
|
||||
router = jasmine.createSpyObj(Router.name, ['navigate']);
|
||||
CONTACT_LIST_MOCK = [new ContactDTO(1, 'MOCK', 'MOCK', '5491122222222')];
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [ContactListTable],
|
||||
providers: [
|
||||
{ provide: STRINGS_INJECTOR, useValue: strings },
|
||||
{ provide: ContactService, useValue: contactService },
|
||||
{ provide: LanguageManager, useValue: languageManager },
|
||||
{ provide: Router, useValue: router },
|
||||
],
|
||||
}).compileComponents();
|
||||
|
||||
Reference in New Issue
Block a user