1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-21 16:18:28 +01:00

test fixes

This commit is contained in:
--global 2024-12-19 15:55:35 -05:00
parent 578c3d40fa
commit d730852c27
3 changed files with 24 additions and 12 deletions

View File

@ -4,13 +4,13 @@ import { mock, MockProxy } from "jest-mock-extended";
import { of } from "rxjs";
import { I18nPipe } from "@bitwarden/angular/platform/pipes/i18n.pipe";
import { ModalService } from "@bitwarden/angular/services/modal.service";
import { AuditService } from "@bitwarden/common/abstractions/audit.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 { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
import { PasswordRepromptService } from "@bitwarden/vault";
import { DialogService } from "@bitwarden/components";
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
import { ExposedPasswordsReportComponent } from "./exposed-passwords-report.component";
import { cipherData } from "./reports-ciphers.mock";
@ -45,8 +45,8 @@ describe("ExposedPasswordsReportComponent", () => {
useValue: organizationService,
},
{
provide: ModalService,
useValue: mock<ModalService>(),
provide: DialogService,
useValue: mock<DialogService>(),
},
{
provide: PasswordRepromptService,
@ -60,6 +60,10 @@ describe("ExposedPasswordsReportComponent", () => {
provide: I18nService,
useValue: mock<I18nService>(),
},
{
provide: DefaultCipherFormConfigService,
useValue: mock<DefaultCipherFormConfigService>(),
},
],
schemas: [],
}).compileComponents();

View File

@ -4,12 +4,12 @@ import { MockProxy, mock } from "jest-mock-extended";
import { of } from "rxjs";
import { I18nPipe } from "@bitwarden/angular/platform/pipes/i18n.pipe";
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 { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
import { PasswordRepromptService } from "@bitwarden/vault";
import { DialogService } from "@bitwarden/components";
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
import { cipherData } from "./reports-ciphers.mock";
import { ReusedPasswordsReportComponent } from "./reused-passwords-report.component";
@ -38,8 +38,8 @@ describe("ReusedPasswordsReportComponent", () => {
useValue: organizationService,
},
{
provide: ModalService,
useValue: mock<ModalService>(),
provide: DialogService,
useValue: mock<DialogService>(),
},
{
provide: PasswordRepromptService,
@ -53,6 +53,10 @@ describe("ReusedPasswordsReportComponent", () => {
provide: I18nService,
useValue: mock<I18nService>(),
},
{
provide: DefaultCipherFormConfigService,
useValue: mock<DefaultCipherFormConfigService>(),
},
],
schemas: [],
}).compileComponents();

View File

@ -5,12 +5,12 @@ import { of } from "rxjs";
import { CollectionService } from "@bitwarden/admin-console/common";
import { I18nPipe } from "@bitwarden/angular/platform/pipes/i18n.pipe";
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 { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
import { PasswordRepromptService } from "@bitwarden/vault";
import { DialogService } from "@bitwarden/components";
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
import { cipherData } from "./reports-ciphers.mock";
import { UnsecuredWebsitesReportComponent } from "./unsecured-websites-report.component";
@ -41,8 +41,8 @@ describe("UnsecuredWebsitesReportComponent", () => {
useValue: organizationService,
},
{
provide: ModalService,
useValue: mock<ModalService>(),
provide: DialogService,
useValue: mock<DialogService>(),
},
{
provide: PasswordRepromptService,
@ -60,6 +60,10 @@ describe("UnsecuredWebsitesReportComponent", () => {
provide: CollectionService,
useValue: collectionService,
},
{
provide: DefaultCipherFormConfigService,
useValue: mock<DefaultCipherFormConfigService>(),
},
],
schemas: [],
}).compileComponents();