Browse Source

Fixes tests and spelling error.

250807-notif-strict
Miles Blackwood 4 months ago
parent
commit
dc895ec902
No known key found for this signature in database
GPG Key ID: F0BBF20F9431DA1
  1. 14
      apps/browser/src/autofill/background/notification.background.spec.ts

14
apps/browser/src/autofill/background/notification.background.spec.ts

@ -514,7 +514,7 @@ describe("NotificationBackground", () => {
await notificationBackground.triggerChangedPasswordNotification(data, tab); await notificationBackground.triggerChangedPasswordNotification(data, tab);
expect(pushChangePasswordToQueueSpy).toHaveBeenCalledWith( expect(pushChangePasswordToQueueSpy).toHaveBeenCalledWith(
null, "",
"example.com", "example.com",
data?.newPassword, data?.newPassword,
sender.tab, sender.tab,
@ -1138,7 +1138,7 @@ describe("NotificationBackground", () => {
expect(convertAddLoginQueueMessageToCipherViewSpy).toHaveBeenCalledWith( expect(convertAddLoginQueueMessageToCipherViewSpy).toHaveBeenCalledWith(
queueMessage, queueMessage,
null, undefined,
); );
expect(cipherEncryptSpy).toHaveBeenCalledWith(cipherView, "testId"); expect(cipherEncryptSpy).toHaveBeenCalledWith(cipherView, "testId");
expect(createWithServerSpy).toHaveBeenCalled(); expect(createWithServerSpy).toHaveBeenCalled();
@ -1485,17 +1485,17 @@ describe("NotificationBackground", () => {
const message: NotificationBackgroundExtensionMessage = { const message: NotificationBackgroundExtensionMessage = {
command: "checkNotificationQueue", command: "checkNotificationQueue",
}; };
const currenTab = createChromeTabMock({ id: 2 }); const currentTab = createChromeTabMock({ id: 2 });
notificationBackground["notificationQueue"] = [ notificationBackground["notificationQueue"] = [
mock<AddLoginQueueMessage>({ tab: currenTab }), mock<AddLoginQueueMessage>({ tab: currentTab }),
]; ];
getTabFromCurrentWindowSpy.mockResolvedValueOnce(currenTab); getTabFromCurrentWindowSpy.mockResolvedValueOnce(currentTab);
sendMockExtensionMessage(message, mock<chrome.runtime.MessageSender>({ tab: null })); sendMockExtensionMessage(message, mock<chrome.runtime.MessageSender>({ tab: undefined }));
await flushPromises(); await flushPromises();
expect(getTabFromCurrentWindowSpy).toHaveBeenCalledWith(); expect(getTabFromCurrentWindowSpy).toHaveBeenCalledWith();
expect(doNotificationQueueCheckSpy).toHaveBeenCalledWith(currenTab); expect(doNotificationQueueCheckSpy).toHaveBeenCalledWith(currentTab);
}); });
}); });

Loading…
Cancel
Save