1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-05 09:10:53 +01:00

Fixing the test for unsecured reports (#10185)

This commit is contained in:
Tom 2024-07-19 11:27:23 -04:00 committed by GitHub
parent 05e8b45edb
commit 087440989e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,7 @@ import { ModalService } from "@bitwarden/angular/services/modal.service";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service";
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
import { PasswordRepromptService } from "@bitwarden/vault";
@ -19,11 +20,13 @@ describe("UnsecuredWebsitesReportComponent", () => {
let fixture: ComponentFixture<UnsecuredWebsitesReportComponent>;
let organizationService: MockProxy<OrganizationService>;
let syncServiceMock: MockProxy<SyncService>;
let collectionService: MockProxy<CollectionService>;
beforeEach(() => {
organizationService = mock<OrganizationService>();
organizationService.organizations$ = of([]);
syncServiceMock = mock<SyncService>();
collectionService = mock<CollectionService>();
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
TestBed.configureTestingModule({
@ -53,6 +56,10 @@ describe("UnsecuredWebsitesReportComponent", () => {
provide: I18nService,
useValue: mock<I18nService>(),
},
{
provide: CollectionService,
useValue: collectionService,
},
],
schemas: [],
}).compileComponents();