1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-08 12:40:26 +00:00

Fixes test.

This commit is contained in:
Miles Blackwood
2026-02-04 12:50:55 -05:00
parent ab47094ff7
commit dad6bbab68

View File

@@ -2315,7 +2315,7 @@ describe("CollectAutofillContentService", () => {
collectAutofillContentService["pendingShadowDomCheck"] = false;
jest.spyOn(domQueryService, "checkMutationsInShadowRoots").mockReturnValue(false);
jest.spyOn(collectAutofillContentService as any, "checkForNewShadowRoots");
jest.spyOn(domQueryService, "checkForNewShadowRoots").mockReturnValue(false);
collectAutofillContentService["handleMutationObserverMutation"]([mutationRecord]);
@@ -2325,7 +2325,7 @@ describe("CollectAutofillContentService", () => {
// Fast-forward time to trigger the debounced check
jest.advanceTimersByTime(500);
expect(collectAutofillContentService["checkForNewShadowRoots"]).toHaveBeenCalled();
expect(domQueryService.checkForNewShadowRoots).toHaveBeenCalled();
expect(collectAutofillContentService["pendingShadowDomCheck"]).toBe(false);
jest.useRealTimers();