1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

PM-19574 Browser Autofill overlay displays outdated data (#15624)

* PM-19574

* explicitly set true

* remove delete cipher call to address the issue at the core separately

* add test
This commit is contained in:
Daniel Riera
2025-07-28 09:55:20 -04:00
committed by GitHub
parent 2eb8bf7d44
commit 9eceaa3d4c
2 changed files with 15 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ import {
} from "@bitwarden/vault";
import { BrowserFido2UserInterfaceSession } from "../../../../../autofill/fido2/services/browser-fido2-user-interface.service";
import { BrowserApi } from "../../../../../platform/browser/browser-api";
import BrowserPopupUtils from "../../../../../platform/browser/browser-popup-utils";
import { PopupRouterCacheService } from "../../../../../platform/popup/view-cache/popup-router-cache.service";
import { PopupCloseWarningService } from "../../../../../popup/services/popup-close-warning.service";
@@ -309,6 +310,19 @@ describe("AddEditV2Component", () => {
expect(navigate).not.toHaveBeenCalled();
expect(back).toHaveBeenCalled();
});
it.each<CipherFormMode>(["add", "edit", "partial-edit"])(
"sends the addEditCipherSubmitted message when a cipher is edited, added or partially edited",
async (mode) => {
const sendMessageSpy = jest.spyOn(BrowserApi, "sendMessage");
component.config.mode = mode;
await component.onCipherSaved({ id: "123-456-789" } as CipherView);
expect(sendMessageSpy).toHaveBeenCalled();
expect(sendMessageSpy).toHaveBeenCalledWith("addEditCipherSubmitted");
},
);
});
describe("handleBackButton", () => {

View File

@@ -268,6 +268,7 @@ export class AddEditV2Component implements OnInit {
// Clear popup history so after closing/reopening, Back wont return to the add-edit form
await this.popupRouterCacheService.setHistory([]);
}
await BrowserApi.sendMessage("addEditCipherSubmitted");
}
subscribeToParams(): void {