mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-02 18:17:46 +01:00
suggested changes
This commit is contained in:
parent
72cc46bf8a
commit
c698779511
@ -11,7 +11,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv
|
|||||||
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { PasswordRepromptService, DefaultCipherFormConfigService } from "@bitwarden/vault";
|
import { PasswordRepromptService, CipherFormConfigService } from "@bitwarden/vault";
|
||||||
|
|
||||||
// eslint-disable-next-line no-restricted-imports
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { ExposedPasswordsReportComponent as BaseExposedPasswordsReportComponent } from "../../../tools/reports/pages/exposed-passwords-report.component";
|
import { ExposedPasswordsReportComponent as BaseExposedPasswordsReportComponent } from "../../../tools/reports/pages/exposed-passwords-report.component";
|
||||||
@ -36,7 +36,7 @@ export class ExposedPasswordsReportComponent
|
|||||||
passwordRepromptService: PasswordRepromptService,
|
passwordRepromptService: PasswordRepromptService,
|
||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
syncService: SyncService,
|
syncService: SyncService,
|
||||||
cipherFormService: DefaultCipherFormConfigService,
|
cipherFormService: CipherFormConfigService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -10,7 +10,7 @@ import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.servi
|
|||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
// eslint-disable-next-line no-restricted-imports
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { InactiveTwoFactorReportComponent as BaseInactiveTwoFactorReportComponent } from "../../../tools/reports/pages/inactive-two-factor-report.component";
|
import { InactiveTwoFactorReportComponent as BaseInactiveTwoFactorReportComponent } from "../../../tools/reports/pages/inactive-two-factor-report.component";
|
||||||
@ -33,7 +33,7 @@ export class InactiveTwoFactorReportComponent
|
|||||||
organizationService: OrganizationService,
|
organizationService: OrganizationService,
|
||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
syncService: SyncService,
|
syncService: SyncService,
|
||||||
cipherFormConfigService: DefaultCipherFormConfigService,
|
cipherFormConfigService: CipherFormConfigService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -10,7 +10,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv
|
|||||||
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
// eslint-disable-next-line no-restricted-imports
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { ReusedPasswordsReportComponent as BaseReusedPasswordsReportComponent } from "../../../tools/reports/pages/reused-passwords-report.component";
|
import { ReusedPasswordsReportComponent as BaseReusedPasswordsReportComponent } from "../../../tools/reports/pages/reused-passwords-report.component";
|
||||||
@ -34,7 +34,7 @@ export class ReusedPasswordsReportComponent
|
|||||||
passwordRepromptService: PasswordRepromptService,
|
passwordRepromptService: PasswordRepromptService,
|
||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
syncService: SyncService,
|
syncService: SyncService,
|
||||||
cipherFormConfigService: DefaultCipherFormConfigService,
|
cipherFormConfigService: CipherFormConfigService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -10,7 +10,7 @@ import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.servi
|
|||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
// eslint-disable-next-line no-restricted-imports
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { UnsecuredWebsitesReportComponent as BaseUnsecuredWebsitesReportComponent } from "../../../tools/reports/pages/unsecured-websites-report.component";
|
import { UnsecuredWebsitesReportComponent as BaseUnsecuredWebsitesReportComponent } from "../../../tools/reports/pages/unsecured-websites-report.component";
|
||||||
@ -33,7 +33,7 @@ export class UnsecuredWebsitesReportComponent
|
|||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
syncService: SyncService,
|
syncService: SyncService,
|
||||||
collectionService: CollectionService,
|
collectionService: CollectionService,
|
||||||
cipherFormConfigService: DefaultCipherFormConfigService,
|
cipherFormConfigService: CipherFormConfigService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -11,7 +11,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv
|
|||||||
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
// eslint-disable-next-line no-restricted-imports
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { WeakPasswordsReportComponent as BaseWeakPasswordsReportComponent } from "../../../tools/reports/pages/weak-passwords-report.component";
|
import { WeakPasswordsReportComponent as BaseWeakPasswordsReportComponent } from "../../../tools/reports/pages/weak-passwords-report.component";
|
||||||
@ -36,7 +36,7 @@ export class WeakPasswordsReportComponent
|
|||||||
passwordRepromptService: PasswordRepromptService,
|
passwordRepromptService: PasswordRepromptService,
|
||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
syncService: SyncService,
|
syncService: SyncService,
|
||||||
cipherFormConfigService: DefaultCipherFormConfigService,
|
cipherFormConfigService: CipherFormConfigService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -16,7 +16,7 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
|||||||
import { DialogService, TableDataSource } from "@bitwarden/components";
|
import { DialogService, TableDataSource } from "@bitwarden/components";
|
||||||
import {
|
import {
|
||||||
CipherFormConfig,
|
CipherFormConfig,
|
||||||
DefaultCipherFormConfigService,
|
CipherFormConfigService,
|
||||||
PasswordRepromptService,
|
PasswordRepromptService,
|
||||||
} from "@bitwarden/vault";
|
} from "@bitwarden/vault";
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ export class CipherReportComponent implements OnDestroy {
|
|||||||
protected organizationService: OrganizationService,
|
protected organizationService: OrganizationService,
|
||||||
protected i18nService: I18nService,
|
protected i18nService: I18nService,
|
||||||
private syncService: SyncService,
|
private syncService: SyncService,
|
||||||
private cipherFormConfigService: DefaultCipherFormConfigService,
|
private cipherFormConfigService: CipherFormConfigService,
|
||||||
) {
|
) {
|
||||||
this.organizations$ = this.organizationService.organizations$;
|
this.organizations$ = this.organizationService.organizations$;
|
||||||
this.organizations$.pipe(takeUntil(this.destroyed$)).subscribe((orgs) => {
|
this.organizations$.pipe(takeUntil(this.destroyed$)).subscribe((orgs) => {
|
||||||
|
@ -10,7 +10,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
import { ExposedPasswordsReportComponent } from "./exposed-passwords-report.component";
|
import { ExposedPasswordsReportComponent } from "./exposed-passwords-report.component";
|
||||||
import { cipherData } from "./reports-ciphers.mock";
|
import { cipherData } from "./reports-ciphers.mock";
|
||||||
@ -23,6 +23,7 @@ describe("ExposedPasswordsReportComponent", () => {
|
|||||||
let syncServiceMock: MockProxy<SyncService>;
|
let syncServiceMock: MockProxy<SyncService>;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
let cipherFormConfigServiceMock: MockProxy<CipherFormConfigService>;
|
||||||
syncServiceMock = mock<SyncService>();
|
syncServiceMock = mock<SyncService>();
|
||||||
auditService = mock<AuditService>();
|
auditService = mock<AuditService>();
|
||||||
organizationService = mock<OrganizationService>();
|
organizationService = mock<OrganizationService>();
|
||||||
@ -61,8 +62,8 @@ describe("ExposedPasswordsReportComponent", () => {
|
|||||||
useValue: mock<I18nService>(),
|
useValue: mock<I18nService>(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: DefaultCipherFormConfigService,
|
provide: CipherFormConfigService,
|
||||||
useValue: mock<DefaultCipherFormConfigService>(),
|
useValue: cipherFormConfigServiceMock,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
schemas: [],
|
schemas: [],
|
||||||
|
@ -8,7 +8,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv
|
|||||||
import { CipherType } from "@bitwarden/common/vault/enums";
|
import { CipherType } from "@bitwarden/common/vault/enums";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
import { CipherReportComponent } from "./cipher-report.component";
|
import { CipherReportComponent } from "./cipher-report.component";
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ export class ExposedPasswordsReportComponent extends CipherReportComponent imple
|
|||||||
passwordRepromptService: PasswordRepromptService,
|
passwordRepromptService: PasswordRepromptService,
|
||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
syncService: SyncService,
|
syncService: SyncService,
|
||||||
cipherFormConfigService: DefaultCipherFormConfigService,
|
cipherFormConfigService: CipherFormConfigService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -10,7 +10,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
|||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
import { CipherReportComponent } from "./cipher-report.component";
|
import { CipherReportComponent } from "./cipher-report.component";
|
||||||
import { InactiveTwoFactorReportComponent } from "./inactive-two-factor-report.component";
|
import { InactiveTwoFactorReportComponent } from "./inactive-two-factor-report.component";
|
||||||
@ -23,6 +23,7 @@ describe("InactiveTwoFactorReportComponent", () => {
|
|||||||
let syncServiceMock: MockProxy<SyncService>;
|
let syncServiceMock: MockProxy<SyncService>;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
let cipherFormConfigServiceMock: MockProxy<CipherFormConfigService>;
|
||||||
organizationService = mock<OrganizationService>();
|
organizationService = mock<OrganizationService>();
|
||||||
organizationService.organizations$ = of([]);
|
organizationService.organizations$ = of([]);
|
||||||
syncServiceMock = mock<SyncService>();
|
syncServiceMock = mock<SyncService>();
|
||||||
@ -60,8 +61,8 @@ describe("InactiveTwoFactorReportComponent", () => {
|
|||||||
useValue: mock<I18nService>(),
|
useValue: mock<I18nService>(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: DefaultCipherFormConfigService,
|
provide: CipherFormConfigService,
|
||||||
useValue: mock<DefaultCipherFormConfigService>(),
|
useValue: cipherFormConfigServiceMock,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: CipherReportComponent,
|
provide: CipherReportComponent,
|
||||||
|
@ -11,7 +11,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv
|
|||||||
import { CipherType } from "@bitwarden/common/vault/enums";
|
import { CipherType } from "@bitwarden/common/vault/enums";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
import { CipherReportComponent } from "./cipher-report.component";
|
import { CipherReportComponent } from "./cipher-report.component";
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ export class InactiveTwoFactorReportComponent extends CipherReportComponent impl
|
|||||||
passwordRepromptService: PasswordRepromptService,
|
passwordRepromptService: PasswordRepromptService,
|
||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
syncService: SyncService,
|
syncService: SyncService,
|
||||||
cipherFormConfigService: DefaultCipherFormConfigService,
|
cipherFormConfigService: CipherFormConfigService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -9,7 +9,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
import { cipherData } from "./reports-ciphers.mock";
|
import { cipherData } from "./reports-ciphers.mock";
|
||||||
import { ReusedPasswordsReportComponent } from "./reused-passwords-report.component";
|
import { ReusedPasswordsReportComponent } from "./reused-passwords-report.component";
|
||||||
@ -21,6 +21,7 @@ describe("ReusedPasswordsReportComponent", () => {
|
|||||||
let syncServiceMock: MockProxy<SyncService>;
|
let syncServiceMock: MockProxy<SyncService>;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
let cipherFormConfigServiceMock: MockProxy<CipherFormConfigService>;
|
||||||
organizationService = mock<OrganizationService>();
|
organizationService = mock<OrganizationService>();
|
||||||
organizationService.organizations$ = of([]);
|
organizationService.organizations$ = of([]);
|
||||||
syncServiceMock = mock<SyncService>();
|
syncServiceMock = mock<SyncService>();
|
||||||
@ -54,8 +55,8 @@ describe("ReusedPasswordsReportComponent", () => {
|
|||||||
useValue: mock<I18nService>(),
|
useValue: mock<I18nService>(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: DefaultCipherFormConfigService,
|
provide: CipherFormConfigService,
|
||||||
useValue: mock<DefaultCipherFormConfigService>(),
|
useValue: cipherFormConfigServiceMock,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
schemas: [],
|
schemas: [],
|
||||||
|
@ -9,7 +9,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv
|
|||||||
import { CipherType } from "@bitwarden/common/vault/enums";
|
import { CipherType } from "@bitwarden/common/vault/enums";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
import { CipherReportComponent } from "./cipher-report.component";
|
import { CipherReportComponent } from "./cipher-report.component";
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ export class ReusedPasswordsReportComponent extends CipherReportComponent implem
|
|||||||
passwordRepromptService: PasswordRepromptService,
|
passwordRepromptService: PasswordRepromptService,
|
||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
syncService: SyncService,
|
syncService: SyncService,
|
||||||
cipherFormConfigService: DefaultCipherFormConfigService,
|
cipherFormConfigService: CipherFormConfigService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -10,7 +10,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
import { cipherData } from "./reports-ciphers.mock";
|
import { cipherData } from "./reports-ciphers.mock";
|
||||||
import { UnsecuredWebsitesReportComponent } from "./unsecured-websites-report.component";
|
import { UnsecuredWebsitesReportComponent } from "./unsecured-websites-report.component";
|
||||||
@ -23,6 +23,7 @@ describe("UnsecuredWebsitesReportComponent", () => {
|
|||||||
let collectionService: MockProxy<CollectionService>;
|
let collectionService: MockProxy<CollectionService>;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
let cipherFormConfigServiceMock: MockProxy<CipherFormConfigService>;
|
||||||
organizationService = mock<OrganizationService>();
|
organizationService = mock<OrganizationService>();
|
||||||
organizationService.organizations$ = of([]);
|
organizationService.organizations$ = of([]);
|
||||||
syncServiceMock = mock<SyncService>();
|
syncServiceMock = mock<SyncService>();
|
||||||
@ -61,8 +62,8 @@ describe("UnsecuredWebsitesReportComponent", () => {
|
|||||||
useValue: collectionService,
|
useValue: collectionService,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: DefaultCipherFormConfigService,
|
provide: CipherFormConfigService,
|
||||||
useValue: mock<DefaultCipherFormConfigService>(),
|
useValue: cipherFormConfigServiceMock,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
schemas: [],
|
schemas: [],
|
||||||
|
@ -8,7 +8,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv
|
|||||||
import { CipherType } from "@bitwarden/common/vault/enums";
|
import { CipherType } from "@bitwarden/common/vault/enums";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
import { CipherReportComponent } from "./cipher-report.component";
|
import { CipherReportComponent } from "./cipher-report.component";
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ export class UnsecuredWebsitesReportComponent extends CipherReportComponent impl
|
|||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
syncService: SyncService,
|
syncService: SyncService,
|
||||||
private collectionService: CollectionService,
|
private collectionService: CollectionService,
|
||||||
cipherFormConfigService: DefaultCipherFormConfigService,
|
cipherFormConfigService: CipherFormConfigService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -10,7 +10,7 @@ import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/pass
|
|||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
import { cipherData } from "./reports-ciphers.mock";
|
import { cipherData } from "./reports-ciphers.mock";
|
||||||
import { WeakPasswordsReportComponent } from "./weak-passwords-report.component";
|
import { WeakPasswordsReportComponent } from "./weak-passwords-report.component";
|
||||||
@ -23,6 +23,7 @@ describe("WeakPasswordsReportComponent", () => {
|
|||||||
let syncServiceMock: MockProxy<SyncService>;
|
let syncServiceMock: MockProxy<SyncService>;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
let cipherFormConfigServiceMock: MockProxy<CipherFormConfigService>;
|
||||||
syncServiceMock = mock<SyncService>();
|
syncServiceMock = mock<SyncService>();
|
||||||
passwordStrengthService = mock<PasswordStrengthServiceAbstraction>();
|
passwordStrengthService = mock<PasswordStrengthServiceAbstraction>();
|
||||||
organizationService = mock<OrganizationService>();
|
organizationService = mock<OrganizationService>();
|
||||||
@ -61,8 +62,8 @@ describe("WeakPasswordsReportComponent", () => {
|
|||||||
useValue: mock<I18nService>(),
|
useValue: mock<I18nService>(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: DefaultCipherFormConfigService,
|
provide: CipherFormConfigService,
|
||||||
useValue: mock<DefaultCipherFormConfigService>(),
|
useValue: cipherFormConfigServiceMock,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
schemas: [],
|
schemas: [],
|
||||||
|
@ -11,7 +11,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv
|
|||||||
import { CipherType } from "@bitwarden/common/vault/enums";
|
import { CipherType } from "@bitwarden/common/vault/enums";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { BadgeVariant, DialogService } from "@bitwarden/components";
|
import { BadgeVariant, DialogService } from "@bitwarden/components";
|
||||||
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
import { CipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
|
||||||
|
|
||||||
import { CipherReportComponent } from "./cipher-report.component";
|
import { CipherReportComponent } from "./cipher-report.component";
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ export class WeakPasswordsReportComponent extends CipherReportComponent implemen
|
|||||||
passwordRepromptService: PasswordRepromptService,
|
passwordRepromptService: PasswordRepromptService,
|
||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
syncService: SyncService,
|
syncService: SyncService,
|
||||||
cipherFormConfigService: DefaultCipherFormConfigService,
|
cipherFormConfigService: CipherFormConfigService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { CommonModule } from "@angular/common";
|
import { CommonModule } from "@angular/common";
|
||||||
import { NgModule } from "@angular/core";
|
import { NgModule } from "@angular/core";
|
||||||
|
|
||||||
import { DefaultCipherFormConfigService } from "@bitwarden/vault";
|
import { CipherFormConfigService, DefaultCipherFormConfigService } from "@bitwarden/vault";
|
||||||
|
|
||||||
import { HeaderModule } from "../../layouts/header/header.module";
|
import { HeaderModule } from "../../layouts/header/header.module";
|
||||||
import { SharedModule } from "../../shared";
|
import { SharedModule } from "../../shared";
|
||||||
@ -39,6 +39,11 @@ import { ReportsSharedModule } from "./shared";
|
|||||||
UnsecuredWebsitesReportComponent,
|
UnsecuredWebsitesReportComponent,
|
||||||
WeakPasswordsReportComponent,
|
WeakPasswordsReportComponent,
|
||||||
],
|
],
|
||||||
providers: [DefaultCipherFormConfigService],
|
providers: [
|
||||||
|
{
|
||||||
|
provide: CipherFormConfigService,
|
||||||
|
useClass: DefaultCipherFormConfigService,
|
||||||
|
},
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class ReportsModule {}
|
export class ReportsModule {}
|
||||||
|
Loading…
Reference in New Issue
Block a user