diff --git a/apps/browser/src/autofill/services/inline-menu-field-qualification.service.spec.ts b/apps/browser/src/autofill/services/inline-menu-field-qualification.service.spec.ts index c0f765e7393..dd76a24e411 100644 --- a/apps/browser/src/autofill/services/inline-menu-field-qualification.service.spec.ts +++ b/apps/browser/src/autofill/services/inline-menu-field-qualification.service.spec.ts @@ -536,7 +536,7 @@ describe("InlineMenuFieldQualificationService", () => { pageDetails.forms = {}; }); - it("is structured on a page with a single password field", () => { + it("is structured on a page with a single visible password field", () => { const field = mock({ type: "text", autoCompleteType: "off", @@ -558,6 +558,29 @@ describe("InlineMenuFieldQualificationService", () => { ).toBe(true); }); + it("is structured on a page with a single non-visible password field", () => { + const field = mock({ + type: "text", + autoCompleteType: "off", + htmlID: "user-username", + htmlName: "user-username", + placeholder: "user-username", + }); + const passwordField = mock({ + type: "password", + autoCompleteType: "current-password", + htmlID: "user-password", + htmlName: "user-password", + placeholder: "user-password", + viewable: false, + }); + pageDetails.fields = [field, passwordField]; + + expect( + inlineMenuFieldQualificationService.isFieldForLoginForm(field, pageDetails), + ).toBe(true); + }); + it("has a non-disabled autoCompleteType and is structured on a page with no other password fields", () => { const field = mock({ type: "text",