[PM-8833] Fixing broken jest tests for AutofillInlineMenuList
This commit is contained in:
parent
caeedb7d23
commit
61bcb8b78a
|
@ -2177,7 +2177,7 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the locked inline men
|
|||
class="locked-inline-menu inline-menu-list-message"
|
||||
id="locked-inline-menu-description"
|
||||
>
|
||||
unlockYourAccount
|
||||
unlockYourAccountToViewAutofillSuggestions
|
||||
</div>
|
||||
<div
|
||||
class="inline-menu-list-button-container"
|
||||
|
|
|
@ -228,6 +228,7 @@ describe("AutofillInlineMenuList", () => {
|
|||
describe("fill cipher button event listeners", () => {
|
||||
beforeEach(() => {
|
||||
postWindowMessage(createInitAutofillInlineMenuListMessageMock({ portKey }));
|
||||
jest.spyOn(autofillInlineMenuList as any, "isListHovered").mockReturnValue(true);
|
||||
});
|
||||
|
||||
describe("filling a cipher", () => {
|
||||
|
@ -736,8 +737,8 @@ describe("AutofillInlineMenuList", () => {
|
|||
it("does not post a `checkAutofillInlineMenuButtonFocused` message if the inline menu list is currently hovered", () => {
|
||||
jest.spyOn(globalThis.document, "hasFocus").mockReturnValue(false);
|
||||
jest
|
||||
.spyOn(autofillInlineMenuList["inlineMenuListContainer"], "matches")
|
||||
.mockReturnValue(true);
|
||||
.spyOn(autofillInlineMenuList["inlineMenuListContainer"], "querySelector")
|
||||
.mockReturnValue(autofillInlineMenuList["inlineMenuListContainer"]);
|
||||
|
||||
postWindowMessage({ command: "checkAutofillInlineMenuListFocused" });
|
||||
|
||||
|
@ -747,8 +748,8 @@ describe("AutofillInlineMenuList", () => {
|
|||
it("posts a `checkAutofillInlineMenuButtonFocused` message to the parent if the inline menu is not currently focused", () => {
|
||||
jest.spyOn(globalThis.document, "hasFocus").mockReturnValue(false);
|
||||
jest
|
||||
.spyOn(autofillInlineMenuList["inlineMenuListContainer"], "matches")
|
||||
.mockReturnValue(false);
|
||||
.spyOn(autofillInlineMenuList["inlineMenuListContainer"], "querySelector")
|
||||
.mockReturnValue(null);
|
||||
|
||||
postWindowMessage({ command: "checkAutofillInlineMenuListFocused" });
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import "@webcomponents/custom-elements";
|
||||
import "lit/polyfill-support.js";
|
||||
import { HTMLElement } from "@webcomponents/custom-elements/src/Patch/Native";
|
||||
|
||||
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
|
||||
import { EVENTS, UPDATE_PASSKEYS_HEADINGS_ON_SCROLL } from "@bitwarden/common/autofill/constants";
|
||||
|
|
Loading…
Reference in New Issue