diff --git a/apps/browser/src/autofill/background/abstractions/overlay.background.ts b/apps/browser/src/autofill/background/abstractions/overlay.background.ts index 9d87d5013c..ef86a411ea 100644 --- a/apps/browser/src/autofill/background/abstractions/overlay.background.ts +++ b/apps/browser/src/autofill/background/abstractions/overlay.background.ts @@ -151,7 +151,7 @@ export type InlineMenuListPortMessageHandlers = { checkAutofillInlineMenuButtonFocused: () => void; autofillInlineMenuBlurred: () => void; unlockVault: ({ port }: PortConnectionParam) => void; - fillSelectedAutofillInlineMenuListItem: ({ message, port }: PortOnMessageHandlerParams) => void; + fillAutofillInlineMenuCipher: ({ message, port }: PortOnMessageHandlerParams) => void; addNewVaultItem: ({ port }: PortConnectionParam) => void; viewSelectedCipher: ({ message, port }: PortOnMessageHandlerParams) => void; redirectAutofillInlineMenuFocusOut: ({ message, port }: PortOnMessageHandlerParams) => void; diff --git a/apps/browser/src/autofill/background/overlay.background.spec.ts b/apps/browser/src/autofill/background/overlay.background.spec.ts index fb16fd45f9..44ef68e859 100644 --- a/apps/browser/src/autofill/background/overlay.background.spec.ts +++ b/apps/browser/src/autofill/background/overlay.background.spec.ts @@ -1621,14 +1621,14 @@ describe("OverlayBackground", () => { }); }); - describe("fillSelectedAutofillInlineMenuListItem message handler", () => { + describe("fillAutofillInlineMenuCipher message handler", () => { const pageDetails = createAutofillPageDetailsMock({ login: { username: "username1", password: "password1" }, }); it("ignores the fill request if the overlay cipher id is not provided", async () => { sendPortMessage(listMessageConnectorSpy, { - command: "fillSelectedAutofillInlineMenuListItem", + command: "fillAutofillInlineMenuCipher", portKey, }); await flushPromises(); @@ -1639,7 +1639,7 @@ describe("OverlayBackground", () => { it("ignores the fill request if the tab does not contain any identified page details", async () => { sendPortMessage(listMessageConnectorSpy, { - command: "fillSelectedAutofillInlineMenuListItem", + command: "fillAutofillInlineMenuCipher", inlineMenuCipherId: "inline-menu-cipher-1", portKey, }); @@ -1661,7 +1661,7 @@ describe("OverlayBackground", () => { autofillService.isPasswordRepromptRequired.mockResolvedValue(true); sendPortMessage(listMessageConnectorSpy, { - command: "fillSelectedAutofillInlineMenuListItem", + command: "fillAutofillInlineMenuCipher", inlineMenuCipherId: "inline-menu-cipher-1", portKey, }); @@ -1691,7 +1691,7 @@ describe("OverlayBackground", () => { autofillService.isPasswordRepromptRequired.mockResolvedValue(false); sendPortMessage(listMessageConnectorSpy, { - command: "fillSelectedAutofillInlineMenuListItem", + command: "fillAutofillInlineMenuCipher", inlineMenuCipherId: "inline-menu-cipher-2", portKey, }); @@ -1730,7 +1730,7 @@ describe("OverlayBackground", () => { autofillService.doAutoFill.mockResolvedValue("totp-code"); sendPortMessage(listMessageConnectorSpy, { - command: "fillSelectedAutofillInlineMenuListItem", + command: "fillAutofillInlineMenuCipher", inlineMenuCipherId: "inline-menu-cipher-2", portKey, }); diff --git a/apps/browser/src/autofill/background/overlay.background.ts b/apps/browser/src/autofill/background/overlay.background.ts index 78d1b98921..6f8bb10999 100644 --- a/apps/browser/src/autofill/background/overlay.background.ts +++ b/apps/browser/src/autofill/background/overlay.background.ts @@ -112,7 +112,7 @@ export class OverlayBackground implements OverlayBackgroundInterface { checkAutofillInlineMenuButtonFocused: () => this.checkInlineMenuButtonFocused(), autofillInlineMenuBlurred: () => this.checkInlineMenuButtonFocused(), unlockVault: ({ port }) => this.unlockVault(port), - fillSelectedAutofillInlineMenuListItem: ({ message, port }) => + fillAutofillInlineMenuCipher: ({ message, port }) => this.fillSelectedInlineMenuListItem(message, port), addNewVaultItem: ({ port }) => this.getNewVaultItemDetails(port), viewSelectedCipher: ({ message, port }) => this.viewSelectedCipher(message, port), diff --git a/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.spec.ts b/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.spec.ts index 0448a1ec50..ec06edb25f 100644 --- a/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.spec.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.spec.ts @@ -140,7 +140,7 @@ describe("AutofillInlineMenuList", () => { fillCipherButton.dispatchEvent(new Event("click")); expect(globalThis.parent.postMessage).toHaveBeenCalledWith( - { command: "fillSelectedAutofillInlineMenuListItem", inlineMenuCipherId: "1", portKey }, + { command: "fillAutofillInlineMenuCipher", inlineMenuCipherId: "1", portKey }, "*", ); }); diff --git a/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts b/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts index bdc186158e..8a58c074ac 100644 --- a/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts @@ -285,7 +285,7 @@ export class AutofillInlineMenuList extends AutofillInlineMenuPageElement { return this.useEventHandlersMemo( () => this.postMessageToParent({ - command: "fillSelectedAutofillInlineMenuListItem", + command: "fillAutofillInlineMenuCipher", inlineMenuCipherId: cipher.id, }), `${cipher.id}-fill-cipher-button-click-handler`,