mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[APPS-2132] migrate components to date-fns (#9001)
* migrate edit process filter to date-fns * refresh unit tests * fix a11y for date-fns * Revert "fix a11y for date-fns" This reverts commit 2e706d4aed1b8a50d1de62fe11d9d528530d628c. * update e2e * start task fixes * cleanup code * remove fdescribe * remove moment, improve unit testing * remove dependency on date util * cleanup search date range component * cleanup code * migrate search date range component * revert e2e changes for now * extra fixes and tests * add missing functionality, extra tests * increase time constraints * improved code, disabled e2e * move e2e to unit tests, extra rework for insights * extra unit test for date range validation * migrate date-range to date-fns
This commit is contained in:
@@ -23,7 +23,7 @@ import { ProcessServiceTabBarPage } from '../pages/process-service-tab-bar.page'
|
||||
import { ProcessListPage } from '../pages/process-list.page';
|
||||
import { ProcessDetailsPage } from '../pages/process-details.page';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation, ProcessInstancesApi } from '@alfresco/js-api';
|
||||
import { DateFnsUtils } from '../../../lib/core/src/lib/common/utils/date-fns-utils';
|
||||
import { format } from 'date-fns';
|
||||
|
||||
describe('Process Instance Details', () => {
|
||||
const app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
@@ -45,8 +45,6 @@ describe('Process Instance Details', () => {
|
||||
let process: ProcessInstanceRepresentation;
|
||||
let user: UserModel;
|
||||
|
||||
const PROCESS_DATE_FORMAT = 'll';
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
@@ -76,6 +74,10 @@ describe('Process Instance Details', () => {
|
||||
|
||||
it('[C307031] Should display the created date in the default format', async () => {
|
||||
await processDetailsPage.checkProcessHeaderDetailsAreVisible();
|
||||
await expect(await processDetailsPage.getCreated()).toEqual(DateFnsUtils.formatDate(process.started, PROCESS_DATE_FORMAT));
|
||||
|
||||
const created = await processDetailsPage.getCreated();
|
||||
const expected = format(process.started, 'PP');
|
||||
|
||||
expect(created).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user