1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 05:43:41 +00:00

fix failing test

This commit is contained in:
jaasen-livefront
2025-01-16 09:51:00 -08:00
parent 09a236b1e7
commit cb24266e9d

View File

@@ -280,10 +280,10 @@ describe("VaultPopupAutofillService", () => {
it("should close popup after a timeout for chromium browsers", async () => {
mockPlatformUtilsService.isFirefox.mockReturnValue(false);
jest.spyOn(global, "setTimeout");
jest.spyOn(global, "requestAnimationFrame");
await service.doAutofill(mockCipher);
jest.advanceTimersByTime(50);
expect(setTimeout).toHaveBeenCalledTimes(1);
expect(requestAnimationFrame).toHaveBeenCalled();
expect(BrowserApi.closePopup).toHaveBeenCalled();
});