From 1c28bb554d47816ccc1aa41bc977db1dde0d8d25 Mon Sep 17 00:00:00 2001 From: RafaPolit Date: Tue, 9 Mar 2021 12:56:42 -0500 Subject: [PATCH] Fixed failing test according to timezone --- app/react/Library/components/specs/TableRow.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/react/Library/components/specs/TableRow.spec.ts b/app/react/Library/components/specs/TableRow.spec.ts index 5f8a2176b5..e4ec9cce6b 100644 --- a/app/react/Library/components/specs/TableRow.spec.ts +++ b/app/react/Library/components/specs/TableRow.spec.ts @@ -11,9 +11,11 @@ import { EntitySchema } from 'shared/types/entityType'; describe('TableRow', () => { const formattedCreationDate = 'Jul 23, 2020'; const formattedPropertyDate = 'May 20, 2019'; + let component: any; let instance: any; let entity: EntitySchema; + const commonColumns = [ { label: 'Title1', @@ -53,8 +55,8 @@ describe('TableRow', () => { const clickOnDocumentSpy = jasmine.createSpy('clickOnDocument'); function render() { - const timestampCreation = Date.parse(formattedCreationDate).valueOf(); - const timestampProperty = Math.floor(Date.parse(formattedPropertyDate).valueOf() / 1000); + const timestampCreation = Date.UTC(2020, 6, 23).valueOf(); + const timestampProperty = Math.floor(Date.UTC(2019, 4, 20).valueOf() / 1000); const storeState = { library: { ui: Immutable.fromJS({ selectedDocuments: [{ _id: 'selectedEntity1' }] }) }, thesauris: Immutable.fromJS([