diff --git a/apps/browser/src/autofill/background/abstractions/overlay.background.ts b/apps/browser/src/autofill/background/abstractions/overlay.background.ts index 26cf214bd78..4d2533f6b0c 100644 --- a/apps/browser/src/autofill/background/abstractions/overlay.background.ts +++ b/apps/browser/src/autofill/background/abstractions/overlay.background.ts @@ -96,7 +96,7 @@ type OverlayBackgroundExtensionMessageHandlers = { closeAutofillInlineMenu: ({ message, sender }: BackgroundOnMessageHandlerParams) => void; autofillOverlayElementClosed: ({ message }: BackgroundMessageParam) => void; autofillOverlayAddNewVaultItem: ({ message, sender }: BackgroundOnMessageHandlerParams) => void; - getInlineMenuVisibilitySetting: () => void; + getAutofillInlineMenuVisibility: () => void; checkAutofillInlineMenuFocused: () => void; focusAutofillInlineMenuList: () => void; updateAutofillInlineMenuPosition: ({ diff --git a/apps/browser/src/autofill/background/overlay.background.spec.ts b/apps/browser/src/autofill/background/overlay.background.spec.ts index d19cd0966cd..732322b5413 100644 --- a/apps/browser/src/autofill/background/overlay.background.spec.ts +++ b/apps/browser/src/autofill/background/overlay.background.spec.ts @@ -638,7 +638,7 @@ describe("OverlayBackground", () => { }); }); - describe("getInlineMenuVisibilitySetting message handler", () => { + describe("getAutofillInlineMenuVisibility message handler", () => { beforeEach(() => { jest .spyOn(overlayBackground as any, "getInlineMenuVisibility") @@ -646,7 +646,7 @@ describe("OverlayBackground", () => { }); it("will set the overlayVisibility property", async () => { - sendMockExtensionMessage({ command: "getInlineMenuVisibilitySetting" }); + sendMockExtensionMessage({ command: "getAutofillInlineMenuVisibility" }); await flushPromises(); expect(await overlayBackground["getInlineMenuVisibility"]()).toBe( @@ -658,7 +658,7 @@ describe("OverlayBackground", () => { const sendMessageSpy = jest.fn(); sendMockExtensionMessage( - { command: "getInlineMenuVisibilitySetting" }, + { command: "getAutofillInlineMenuVisibility" }, undefined, sendMessageSpy, ); diff --git a/apps/browser/src/autofill/background/overlay.background.ts b/apps/browser/src/autofill/background/overlay.background.ts index c544da71382..7ec83466582 100644 --- a/apps/browser/src/autofill/background/overlay.background.ts +++ b/apps/browser/src/autofill/background/overlay.background.ts @@ -68,7 +68,7 @@ class OverlayBackground implements OverlayBackgroundInterface { closeAutofillInlineMenu: ({ message, sender }) => this.closeInlineMenu(sender, message), autofillOverlayElementClosed: ({ message }) => this.overlayElementClosed(message), autofillOverlayAddNewVaultItem: ({ message, sender }) => this.addNewVaultItem(message, sender), - getInlineMenuVisibilitySetting: () => this.getInlineMenuVisibility(), + getAutofillInlineMenuVisibility: () => this.getInlineMenuVisibility(), checkAutofillInlineMenuFocused: () => this.checkInlineMenuFocused(), focusAutofillInlineMenuList: () => this.focusInlineMenuList(), updateAutofillInlineMenuPosition: ({ message, sender }) => diff --git a/apps/browser/src/autofill/services/autofill-overlay-content.service.spec.ts b/apps/browser/src/autofill/services/autofill-overlay-content.service.spec.ts index 8a90e69d8ca..ffe963dc688 100644 --- a/apps/browser/src/autofill/services/autofill-overlay-content.service.spec.ts +++ b/apps/browser/src/autofill/services/autofill-overlay-content.service.spec.ts @@ -230,7 +230,7 @@ describe("AutofillOverlayContentService", () => { autofillFieldData, ); - expect(sendExtensionMessageSpy).toHaveBeenCalledWith("getInlineMenuVisibilitySetting"); + expect(sendExtensionMessageSpy).toHaveBeenCalledWith("getAutofillInlineMenuVisibility"); expect(autofillOverlayContentService["inlineMenuVisibility"]).toEqual( AutofillOverlayVisibility.OnFieldFocus, ); diff --git a/apps/browser/src/autofill/services/autofill-overlay-content.service.ts b/apps/browser/src/autofill/services/autofill-overlay-content.service.ts index f2718bf951b..cafed02dd97 100644 --- a/apps/browser/src/autofill/services/autofill-overlay-content.service.ts +++ b/apps/browser/src/autofill/services/autofill-overlay-content.service.ts @@ -94,7 +94,7 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte } if (!this.inlineMenuVisibility) { - await this.getInlineMenuVisibilitySetting(); + await this.getAutofillInlineMenuVisibility(); } this.setupFormFieldElementEventListeners(formFieldElement); @@ -730,8 +730,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte * If the setting is not found, a default value of OnFieldFocus will be used * @private */ - private async getInlineMenuVisibilitySetting() { - const overlayVisibility = await this.sendExtensionMessage("getInlineMenuVisibilitySetting"); + private async getAutofillInlineMenuVisibility() { + const overlayVisibility = await this.sendExtensionMessage("getAutofillInlineMenuVisibility"); this.inlineMenuVisibility = overlayVisibility || AutofillOverlayVisibility.OnFieldFocus; }