mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
[PM-10155] Fixing broken jest tests for auto-submit content script (#10512)
This commit is contained in:
@@ -61,10 +61,13 @@ describe("AutoSubmitLogin content script", () => {
|
|||||||
|
|
||||||
await initAutoSubmitWorkflow();
|
await initAutoSubmitWorkflow();
|
||||||
|
|
||||||
expect(chrome.runtime.sendMessage).toHaveBeenCalledWith({
|
expect(chrome.runtime.sendMessage).toHaveBeenCalledWith(
|
||||||
|
{
|
||||||
command: "updateIsFieldCurrentlyFilling",
|
command: "updateIsFieldCurrentlyFilling",
|
||||||
isFieldCurrentlyFilling: false,
|
isFieldCurrentlyFilling: false,
|
||||||
});
|
},
|
||||||
|
expect.any(Function),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("when the page contains form fields", () => {
|
describe("when the page contains form fields", () => {
|
||||||
@@ -78,10 +81,13 @@ describe("AutoSubmitLogin content script", () => {
|
|||||||
});
|
});
|
||||||
await flushPromises();
|
await flushPromises();
|
||||||
|
|
||||||
expect(chrome.runtime.sendMessage).toHaveBeenCalledWith({
|
expect(chrome.runtime.sendMessage).toHaveBeenCalledWith(
|
||||||
|
{
|
||||||
command: "updateIsFieldCurrentlyFilling",
|
command: "updateIsFieldCurrentlyFilling",
|
||||||
isFieldCurrentlyFilling: false,
|
isFieldCurrentlyFilling: false,
|
||||||
});
|
},
|
||||||
|
expect.any(Function),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("triggering auto-submit on formless fields", () => {
|
describe("triggering auto-submit on formless fields", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user