From 4ba12d0e2ddbc4587137d23d8f426e94731ab12a Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 4 May 2021 12:46:03 -0400 Subject: [PATCH] timezone differences in travis caused this test to fail, just formatting the date into the local timezone, rather than look for an exact string match. --- src/app/modeler/modeler.component.spec.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/modeler/modeler.component.spec.ts b/src/app/modeler/modeler.component.spec.ts index 512173f..ef87c4a 100644 --- a/src/app/modeler/modeler.component.spec.ts +++ b/src/app/modeler/modeler.component.spec.ts @@ -1,4 +1,4 @@ -import {APP_BASE_HREF} from '@angular/common'; +import {APP_BASE_HREF, DatePipe} from '@angular/common'; import {HttpErrorResponse, HttpHeaders, HttpResponse} from '@angular/common/http'; import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; import {DebugNode} from '@angular/core'; @@ -431,11 +431,14 @@ describe('ModelerComponent', () => { it('should get file metadata tooltip text', () => { component.workflowSpec = undefined; expect(component.getFileMetaTooltipText(mockFileMeta0)).toEqual('Loading...'); + mockFileMeta0.type = FileType.BPMN; + mockFileMeta0.last_modified = '2020-01-23T12:34:12.345Z'; + const lastUpdated = new DatePipe('en-us').transform(mockFileMeta0.last_modified, 'medium'); component.workflowSpec = mockWorkflowSpec0; const expectedString = ` File name: one-fish.bpmn - Last updated: Jan 23, 2020, 7:34:12 AM + Last updated: ${lastUpdated} Version: 1.0 `; mockFileMeta0.type = FileType.BPMN;