mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
fix failing test
This commit is contained in:
@@ -280,10 +280,10 @@ describe("VaultPopupAutofillService", () => {
|
|||||||
|
|
||||||
it("should close popup after a timeout for chromium browsers", async () => {
|
it("should close popup after a timeout for chromium browsers", async () => {
|
||||||
mockPlatformUtilsService.isFirefox.mockReturnValue(false);
|
mockPlatformUtilsService.isFirefox.mockReturnValue(false);
|
||||||
jest.spyOn(global, "setTimeout");
|
jest.spyOn(global, "requestAnimationFrame");
|
||||||
await service.doAutofill(mockCipher);
|
await service.doAutofill(mockCipher);
|
||||||
jest.advanceTimersByTime(50);
|
jest.advanceTimersByTime(50);
|
||||||
expect(setTimeout).toHaveBeenCalledTimes(1);
|
expect(requestAnimationFrame).toHaveBeenCalled();
|
||||||
expect(BrowserApi.closePopup).toHaveBeenCalled();
|
expect(BrowserApi.closePopup).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user