feat: add persistance to language selection
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ContactForm } from './contact-form';
|
||||
import { STRINGS_INJECTOR } from '../../app.config';
|
||||
import { strings } from '../../strings';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ContactDTO } from '../../models/ContactDTO';
|
||||
import { LanguageManager } from '../../services/language-manager';
|
||||
|
||||
describe('ContactForm', () => {
|
||||
let component: ContactForm;
|
||||
let fixture: ComponentFixture<ContactForm>;
|
||||
let languageManager: jasmine.SpyObj<LanguageManager>;
|
||||
|
||||
beforeEach(async () => {
|
||||
languageManager = jasmine.createSpyObj(LanguageManager.name, [], { strings: strings.en });
|
||||
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [ContactForm],
|
||||
providers: [{ provide: STRINGS_INJECTOR, useValue: strings }],
|
||||
providers: [{ provide: LanguageManager, useValue: languageManager }],
|
||||
}).compileComponents();
|
||||
|
||||
TestBed.inject(STRINGS_INJECTOR);
|
||||
fixture = TestBed.createComponent(ContactForm);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
|
||||
Reference in New Issue
Block a user