1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 05:43:41 +00:00

[PS-1194] Display Creation Date in Clients (#3181)

* Add CreationDate to common libs

* Add CreationDate to Browser

* Add CreationDate to CLI

* Add CreationDate to Desktop

* Add CreationDate to Web

* Update tests

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
This commit is contained in:
David Frankel
2022-10-11 21:25:27 -04:00
committed by GitHub
parent a1b13f9b18
commit 18bc209b73
12 changed files with 54 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ describe("Cipher DTO", () => {
revisionDate: null,
collectionIds: undefined,
localData: null,
creationDate: null,
deletedDate: null,
reprompt: undefined,
attachments: null,
@@ -66,6 +67,7 @@ describe("Cipher DTO", () => {
type: CipherType.Login,
name: "EncryptedString",
notes: "EncryptedString",
creationDate: "2022-01-01T12:00:00.000Z",
deletedDate: null,
reprompt: CipherRepromptType.None,
login: {
@@ -131,6 +133,7 @@ describe("Cipher DTO", () => {
revisionDate: new Date("2022-01-31T12:00:00.000Z"),
collectionIds: undefined,
localData: null,
creationDate: new Date("2022-01-01T12:00:00.000Z"),
deletedDate: null,
reprompt: 0,
login: {
@@ -200,6 +203,7 @@ describe("Cipher DTO", () => {
cipher.type = CipherType.Login;
cipher.name = mockEnc("EncryptedString");
cipher.notes = mockEnc("EncryptedString");
cipher.creationDate = new Date("2022-01-01T12:00:00.000Z");
cipher.deletedDate = null;
cipher.reprompt = CipherRepromptType.None;
@@ -230,6 +234,7 @@ describe("Cipher DTO", () => {
passwordHistory: null,
collectionIds: undefined,
revisionDate: new Date("2022-01-31T12:00:00.000Z"),
creationDate: new Date("2022-01-01T12:00:00.000Z"),
deletedDate: null,
reprompt: 0,
localData: undefined,
@@ -253,6 +258,7 @@ describe("Cipher DTO", () => {
type: CipherType.SecureNote,
name: "EncryptedString",
notes: "EncryptedString",
creationDate: "2022-01-01T12:00:00.000Z",
deletedDate: null,
reprompt: CipherRepromptType.None,
secureNote: {
@@ -278,6 +284,7 @@ describe("Cipher DTO", () => {
revisionDate: new Date("2022-01-31T12:00:00.000Z"),
collectionIds: undefined,
localData: null,
creationDate: new Date("2022-01-01T12:00:00.000Z"),
deletedDate: null,
reprompt: 0,
secureNote: { type: SecureNoteType.Generic },
@@ -305,6 +312,7 @@ describe("Cipher DTO", () => {
cipher.type = CipherType.SecureNote;
cipher.name = mockEnc("EncryptedString");
cipher.notes = mockEnc("EncryptedString");
cipher.creationDate = new Date("2022-01-01T12:00:00.000Z");
cipher.deletedDate = null;
cipher.reprompt = CipherRepromptType.None;
cipher.secureNote = new SecureNote();
@@ -329,6 +337,7 @@ describe("Cipher DTO", () => {
passwordHistory: null,
collectionIds: undefined,
revisionDate: new Date("2022-01-31T12:00:00.000Z"),
creationDate: new Date("2022-01-01T12:00:00.000Z"),
deletedDate: null,
reprompt: 0,
localData: undefined,
@@ -352,6 +361,7 @@ describe("Cipher DTO", () => {
type: CipherType.Card,
name: "EncryptedString",
notes: "EncryptedString",
creationDate: "2022-01-01T12:00:00.000Z",
deletedDate: null,
reprompt: CipherRepromptType.None,
card: {
@@ -382,6 +392,7 @@ describe("Cipher DTO", () => {
revisionDate: new Date("2022-01-31T12:00:00.000Z"),
collectionIds: undefined,
localData: null,
creationDate: new Date("2022-01-01T12:00:00.000Z"),
deletedDate: null,
reprompt: 0,
card: {
@@ -416,6 +427,7 @@ describe("Cipher DTO", () => {
cipher.type = CipherType.Card;
cipher.name = mockEnc("EncryptedString");
cipher.notes = mockEnc("EncryptedString");
cipher.creationDate = new Date("2022-01-01T12:00:00.000Z");
cipher.deletedDate = null;
cipher.reprompt = CipherRepromptType.None;
@@ -446,6 +458,7 @@ describe("Cipher DTO", () => {
passwordHistory: null,
collectionIds: undefined,
revisionDate: new Date("2022-01-31T12:00:00.000Z"),
creationDate: new Date("2022-01-01T12:00:00.000Z"),
deletedDate: null,
reprompt: 0,
localData: undefined,
@@ -469,6 +482,7 @@ describe("Cipher DTO", () => {
type: CipherType.Identity,
name: "EncryptedString",
notes: "EncryptedString",
creationDate: "2022-01-01T12:00:00.000Z",
deletedDate: null,
reprompt: CipherRepromptType.None,
identity: {
@@ -511,6 +525,7 @@ describe("Cipher DTO", () => {
revisionDate: new Date("2022-01-31T12:00:00.000Z"),
collectionIds: undefined,
localData: null,
creationDate: new Date("2022-01-01T12:00:00.000Z"),
deletedDate: null,
reprompt: 0,
identity: {
@@ -557,6 +572,7 @@ describe("Cipher DTO", () => {
cipher.type = CipherType.Identity;
cipher.name = mockEnc("EncryptedString");
cipher.notes = mockEnc("EncryptedString");
cipher.creationDate = new Date("2022-01-01T12:00:00.000Z");
cipher.deletedDate = null;
cipher.reprompt = CipherRepromptType.None;
@@ -587,6 +603,7 @@ describe("Cipher DTO", () => {
passwordHistory: null,
collectionIds: undefined,
revisionDate: new Date("2022-01-31T12:00:00.000Z"),
creationDate: new Date("2022-01-01T12:00:00.000Z"),
deletedDate: null,
reprompt: 0,
localData: undefined,