mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +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();
|
expect(component["updatedCipherView"]?.login.fido2Credentials).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("clears archiveDate on updatedCipherView", async () => {
|
it("does not clear archiveDate on updatedCipherView", async () => {
|
||||||
cipherView.archivedDate = new Date();
|
cipherView.archivedDate = new Date();
|
||||||
decryptCipher.mockResolvedValue(cipherView);
|
decryptCipher.mockResolvedValue(cipherView);
|
||||||
|
|
||||||
await component.ngOnInit();
|
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") {
|
if (this.config.mode === "clone") {
|
||||||
this.updatedCipherView.id = null;
|
this.updatedCipherView.id = null;
|
||||||
this.updatedCipherView.archivedDate = null;
|
|
||||||
|
|
||||||
if (this.updatedCipherView.login) {
|
if (this.updatedCipherView.login) {
|
||||||
this.updatedCipherView.login.fido2Credentials = null;
|
this.updatedCipherView.login.fido2Credentials = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user