mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
Fixed tests to initialize creation date
This commit is contained in:
@@ -75,6 +75,7 @@ describe("AccountSwitcherService", () => {
|
||||
name: "Test User 1",
|
||||
email: "test1@email.com",
|
||||
emailVerified: true,
|
||||
creationDate: "2024-01-01T00:00:00.000Z",
|
||||
};
|
||||
|
||||
avatarService.getUserAvatarColor$.mockReturnValue(of("#cccccc"));
|
||||
@@ -113,6 +114,7 @@ describe("AccountSwitcherService", () => {
|
||||
email: `test${i}@email.com`,
|
||||
emailVerified: true,
|
||||
name: "Test User ${i}",
|
||||
creationDate: "2024-01-01T00:00:00.000Z",
|
||||
};
|
||||
seedStatuses[`${i}` as UserId] = AuthenticationStatus.Unlocked;
|
||||
}
|
||||
@@ -137,6 +139,7 @@ describe("AccountSwitcherService", () => {
|
||||
name: "Test User 1",
|
||||
email: "",
|
||||
emailVerified: true,
|
||||
creationDate: "2024-01-01T00:00:00.000Z",
|
||||
};
|
||||
accountsSubject.next({ ["1" as UserId]: user1AccountInfo });
|
||||
authStatusSubject.next({ ["1" as UserId]: AuthenticationStatus.LoggedOut });
|
||||
|
||||
@@ -85,6 +85,7 @@ describe("NotificationBackground", () => {
|
||||
email: "test@example.com",
|
||||
emailVerified: true,
|
||||
name: "Test User",
|
||||
creationDate: "2024-01-01T00:00:00.000Z",
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -28,11 +28,13 @@ const accounts: Record<UserId, AccountInfo> = {
|
||||
name: "some user",
|
||||
email: "some.user@example.com",
|
||||
emailVerified: true,
|
||||
creationDate: "2024-01-01T00:00:00.000Z",
|
||||
},
|
||||
[AnotherUser]: {
|
||||
name: "some other user",
|
||||
email: "some.other.user@example.com",
|
||||
emailVerified: true,
|
||||
creationDate: "2024-01-01T00:00:00.000Z",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -28,7 +28,12 @@ describe("VaultBannersService", () => {
|
||||
const getEmailVerified = jest.fn().mockResolvedValue(true);
|
||||
const lastSync$ = new BehaviorSubject<Date | null>(null);
|
||||
const accounts$ = new BehaviorSubject<Record<UserId, AccountInfo>>({
|
||||
[userId]: { email: "test@bitwarden.com", emailVerified: true, name: "name" } as AccountInfo,
|
||||
[userId]: {
|
||||
email: "test@bitwarden.com",
|
||||
emailVerified: true,
|
||||
name: "name",
|
||||
creationDate: "2024-01-01T00:00:00.000Z",
|
||||
} as AccountInfo,
|
||||
});
|
||||
const pendingAuthRequests$ = new BehaviorSubject<Array<AuthRequestResponse>>([]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user