Fix unit tests
This commit is contained in:
parent
c01e1b7c04
commit
bf632dc515
|
@ -211,6 +211,7 @@ describe("SsoLoginStrategy", () => {
|
||||||
HasAdminApproval: true,
|
HasAdminApproval: true,
|
||||||
HasLoginApprovingDevice: true,
|
HasLoginApprovingDevice: true,
|
||||||
HasManageResetPasswordPermission: false,
|
HasManageResetPasswordPermission: false,
|
||||||
|
IsTdeOffboarding: false,
|
||||||
EncryptedPrivateKey: mockEncDevicePrivateKey,
|
EncryptedPrivateKey: mockEncDevicePrivateKey,
|
||||||
EncryptedUserKey: mockEncUserKey,
|
EncryptedUserKey: mockEncUserKey,
|
||||||
},
|
},
|
||||||
|
@ -322,6 +323,7 @@ describe("SsoLoginStrategy", () => {
|
||||||
HasAdminApproval: true,
|
HasAdminApproval: true,
|
||||||
HasLoginApprovingDevice: false,
|
HasLoginApprovingDevice: false,
|
||||||
HasManageResetPasswordPermission: false,
|
HasManageResetPasswordPermission: false,
|
||||||
|
IsTdeOffboarding: false,
|
||||||
EncryptedPrivateKey: mockEncDevicePrivateKey,
|
EncryptedPrivateKey: mockEncDevicePrivateKey,
|
||||||
EncryptedUserKey: mockEncUserKey,
|
EncryptedUserKey: mockEncUserKey,
|
||||||
},
|
},
|
||||||
|
|
|
@ -29,10 +29,12 @@ export class FakeTrustedDeviceUserDecryptionOption extends TrustedDeviceUserDecr
|
||||||
hasAdminApproval: boolean,
|
hasAdminApproval: boolean,
|
||||||
hasLoginApprovingDevice: boolean,
|
hasLoginApprovingDevice: boolean,
|
||||||
hasManageResetPasswordPermission: boolean,
|
hasManageResetPasswordPermission: boolean,
|
||||||
|
isTdOffboarding: boolean,
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
this.hasAdminApproval = hasAdminApproval;
|
this.hasAdminApproval = hasAdminApproval;
|
||||||
this.hasLoginApprovingDevice = hasLoginApprovingDevice;
|
this.hasLoginApprovingDevice = hasLoginApprovingDevice;
|
||||||
this.hasManageResetPasswordPermission = hasManageResetPasswordPermission;
|
this.hasManageResetPasswordPermission = hasManageResetPasswordPermission;
|
||||||
|
this.isTdeOffboarding = isTdOffboarding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@ import {
|
||||||
} from "@bitwarden/common/spec";
|
} from "@bitwarden/common/spec";
|
||||||
import { UserId } from "@bitwarden/common/types/guid";
|
import { UserId } from "@bitwarden/common/types/guid";
|
||||||
|
|
||||||
|
import { UserDecryptionOptions } from "../../models/domain/user-decryption-options";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
USER_DECRYPTION_OPTIONS,
|
USER_DECRYPTION_OPTIONS,
|
||||||
UserDecryptionOptionsService,
|
UserDecryptionOptionsService,
|
||||||
|
@ -27,12 +29,13 @@ describe("UserDecryptionOptionsService", () => {
|
||||||
sut = new UserDecryptionOptionsService(fakeStateProvider);
|
sut = new UserDecryptionOptionsService(fakeStateProvider);
|
||||||
});
|
});
|
||||||
|
|
||||||
const userDecryptionOptions = {
|
const userDecryptionOptions: UserDecryptionOptions = {
|
||||||
hasMasterPassword: true,
|
hasMasterPassword: true,
|
||||||
trustedDeviceOption: {
|
trustedDeviceOption: {
|
||||||
hasAdminApproval: false,
|
hasAdminApproval: false,
|
||||||
hasLoginApprovingDevice: false,
|
hasLoginApprovingDevice: false,
|
||||||
hasManageResetPasswordPermission: true,
|
hasManageResetPasswordPermission: true,
|
||||||
|
isTdeOffboarding: false,
|
||||||
},
|
},
|
||||||
keyConnectorOption: {
|
keyConnectorOption: {
|
||||||
keyConnectorUrl: "https://keyconnector.bitwarden.com",
|
keyConnectorUrl: "https://keyconnector.bitwarden.com",
|
||||||
|
|
|
@ -5,6 +5,7 @@ export interface ITrustedDeviceUserDecryptionOptionServerResponse {
|
||||||
HasAdminApproval: boolean;
|
HasAdminApproval: boolean;
|
||||||
HasLoginApprovingDevice: boolean;
|
HasLoginApprovingDevice: boolean;
|
||||||
HasManageResetPasswordPermission: boolean;
|
HasManageResetPasswordPermission: boolean;
|
||||||
|
IsTdeOffboarding: boolean;
|
||||||
EncryptedPrivateKey?: string;
|
EncryptedPrivateKey?: string;
|
||||||
EncryptedUserKey?: string;
|
EncryptedUserKey?: string;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue