mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
[PM-8322] Firefox Inline Autofill Menu Not Propagation Correctly When Switching Tabs
This commit is contained in:
@@ -971,6 +971,14 @@ describe("AutofillOverlayContentService", () => {
|
|||||||
expect(document.body.contains(overlayButtonElement)).toEqual(false);
|
expect(document.body.contains(overlayButtonElement)).toEqual(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("sends a message to the background indicating that the overlay button has been closed", () => {
|
||||||
|
autofillOverlayContentService.removeAutofillOverlay();
|
||||||
|
|
||||||
|
expect(sendExtensionMessageSpy).toHaveBeenCalledWith("autofillOverlayElementClosed", {
|
||||||
|
overlayElement: AutofillOverlayElement.Button,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it("removes the overlay reposition event listeners", () => {
|
it("removes the overlay reposition event listeners", () => {
|
||||||
jest.spyOn(globalThis.document.body, "removeEventListener");
|
jest.spyOn(globalThis.document.body, "removeEventListener");
|
||||||
jest.spyOn(globalThis, "removeEventListener");
|
jest.spyOn(globalThis, "removeEventListener");
|
||||||
@@ -1012,6 +1020,14 @@ describe("AutofillOverlayContentService", () => {
|
|||||||
expect(autofillOverlayContentService["isOverlayListVisible"]).toEqual(false);
|
expect(autofillOverlayContentService["isOverlayListVisible"]).toEqual(false);
|
||||||
expect(document.body.contains(overlayListElement)).toEqual(false);
|
expect(document.body.contains(overlayListElement)).toEqual(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("sends a message to the extension background indicating that the overlay list has closed", () => {
|
||||||
|
autofillOverlayContentService.removeAutofillOverlay();
|
||||||
|
|
||||||
|
expect(sendExtensionMessageSpy).toHaveBeenCalledWith("autofillOverlayElementClosed", {
|
||||||
|
overlayElement: AutofillOverlayElement.List,
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("addNewVaultItem", () => {
|
describe("addNewVaultItem", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user