mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
persist archive date when cloning a cipher (#16986)
This commit is contained in:
@@ -154,13 +154,13 @@ describe("CipherFormComponent", () => {
|
||||
expect(component["updatedCipherView"]?.login.fido2Credentials).toBeNull();
|
||||
});
|
||||
|
||||
it("clears archiveDate on updatedCipherView", async () => {
|
||||
it("does not clear archiveDate on updatedCipherView", async () => {
|
||||
cipherView.archivedDate = new Date();
|
||||
decryptCipher.mockResolvedValue(cipherView);
|
||||
|
||||
await component.ngOnInit();
|
||||
|
||||
expect(component["updatedCipherView"]?.archivedDate).toBeNull();
|
||||
expect(component["updatedCipherView"]?.archivedDate).toBe(cipherView.archivedDate);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -281,7 +281,6 @@ export class CipherFormComponent implements AfterViewInit, OnInit, OnChanges, Ci
|
||||
|
||||
if (this.config.mode === "clone") {
|
||||
this.updatedCipherView.id = null;
|
||||
this.updatedCipherView.archivedDate = null;
|
||||
|
||||
if (this.updatedCipherView.login) {
|
||||
this.updatedCipherView.login.fido2Credentials = null;
|
||||
|
||||
Reference in New Issue
Block a user