mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
[PM-8027] Fixing jest tests for the collectPageDetails method
This commit is contained in:
@@ -35,6 +35,7 @@ describe("CollectAutofillContentService", () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
globalThis.requestIdleCallback = jest.fn((cb, options) => setTimeout(cb, 100));
|
globalThis.requestIdleCallback = jest.fn((cb, options) => setTimeout(cb, 100));
|
||||||
|
globalThis.cancelIdleCallback = jest.fn((id) => clearTimeout(id));
|
||||||
document.body.innerHTML = mockLoginForm;
|
document.body.innerHTML = mockLoginForm;
|
||||||
collectAutofillContentService = new CollectAutofillContentService(
|
collectAutofillContentService = new CollectAutofillContentService(
|
||||||
domElementVisibilityService,
|
domElementVisibilityService,
|
||||||
@@ -2606,6 +2607,7 @@ describe("CollectAutofillContentService", () => {
|
|||||||
expect(setupAutofillOverlayListenerOnFieldSpy).toHaveBeenCalledWith(
|
expect(setupAutofillOverlayListenerOnFieldSpy).toHaveBeenCalledWith(
|
||||||
formFieldElement,
|
formFieldElement,
|
||||||
autofillField,
|
autofillField,
|
||||||
|
expect.anything(),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user