feat: add persistance to language selection

This commit is contained in:
2025-12-23 23:48:35 -03:00
parent 06f1769f5c
commit 882b0e2132
11 changed files with 74 additions and 26 deletions

View File

@@ -1,19 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ContactSearchBar } from './contact-search-bar';
import { STRINGS_INJECTOR } from '../../app.config';
import { strings } from '../../strings';
import { LanguageManager } from '../../services/language-manager';
describe('ContactSearchBar', () => {
let component: ContactSearchBar;
let fixture: ComponentFixture<ContactSearchBar>;
let languageManager: jasmine.SpyObj<LanguageManager>;
beforeEach(async () => {
languageManager = jasmine.createSpyObj(LanguageManager.name, [], { strings: strings.en });
await TestBed.configureTestingModule({
imports: [ContactSearchBar],
providers: [{provide: STRINGS_INJECTOR, useValue: strings}]
})
.compileComponents();
providers: [{ provide: LanguageManager, useValue: languageManager }],
}).compileComponents();
fixture = TestBed.createComponent(ContactSearchBar);
component = fixture.componentInstance;