Fixing the test for unsecured reports (#10185)
This commit is contained in:
parent
05e8b45edb
commit
087440989e
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue