[HXCS-2988] fix dates in CardViweDateItemComponent (#9276)

* [HXCS-2988] fix dates in CardViweDateItemComponent

* [HXCS-2988] remove utc conversion + refactoring

* [HXCS-2988] force property.value to be Date object(s)

* [HXCS-2988] format dates

* [HXCS-2988] revert last commit

* [HXCS-2988] update date-only tests

---------

Co-authored-by: Adriano Costa <Adriano.Costa@hyland.comgit>
This commit is contained in:
Adriano Costa
2024-01-27 01:45:05 +01:00
committed by GitHub
parent 9473f7681b
commit 2e4afa07fe
4 changed files with 41 additions and 13 deletions

View File

@@ -225,8 +225,8 @@ describe('ProcessHeaderCloudComponent', () => {
const lastModifiedElement = fixture.debugElement.query(By.css('[data-automation-id="header-lastModified"] .adf-property-value'));
expect(component.dateFormat).toEqual('full');
expect(startedDateElement.nativeElement.innerText.trim()).toBe('Saturday, March 9, 2019 at 5:23:07 PM GMT+00:00');
expect(lastModifiedElement.nativeElement.innerText.trim()).toBe('Saturday, March 9, 2019 at 5:23:07 PM GMT+00:00');
expect(startedDateElement.nativeElement.innerText.trim()).toBe('Saturday, March 9, 2019 at 12:00:00 AM GMT+00:00');
expect(lastModifiedElement.nativeElement.innerText.trim()).toBe('Saturday, March 9, 2019 at 12:00:00 AM GMT+00:00');
});
});
});

View File

@@ -503,7 +503,7 @@ describe('TaskHeaderCloudComponent', () => {
const createdDateElement = fixture.debugElement.query(By.css('[data-automation-id="header-created"] .adf-property-value'));
expect(component.dateFormat).toEqual('full');
expect(createdDateElement.nativeElement.innerText.trim()).toBe('Monday, December 17, 2018 at 12:00:55 PM GMT+00:00');
expect(createdDateElement.nativeElement.innerText.trim()).toBe('Monday, December 17, 2018 at 12:00:00 AM GMT+00:00');
});
});