mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
[APPS-2157] [APPS-2158] [APPS-2161] [APPS-2162] [APPS-2165] migration of e2e test cases from moment to date-fns (#8864)
* migration of dependency from moment to date-fns in task-list.component * migration of dependency from moment to date-fns * migration of e2e from moment to date-fns * sync with develop * migrated info-drawer.e2e.ts from moment to date-fns * migrated process-header-cloud.e2e.ts file from moment to date-fns * migrated task-header-cloud.e2e.ts from moment to date-fns * migration of document-list-component.e2e.ts from moment to date-fns * changed format to 'PP' instead of 'PPpp' * removed new Date() as process.started is already in Date format
This commit is contained in:
@@ -22,8 +22,8 @@ import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { ProcessServiceTabBarPage } from '../pages/process-service-tab-bar.page';
|
||||
import { ProcessListPage } from '../pages/process-list.page';
|
||||
import { ProcessDetailsPage } from '../pages/process-details.page';
|
||||
import * as moment from 'moment';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation, ProcessInstancesApi } from '@alfresco/js-api';
|
||||
import { format } from 'date-fns';
|
||||
|
||||
describe('Process Instance Details', () => {
|
||||
const app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
@@ -45,7 +45,7 @@ describe('Process Instance Details', () => {
|
||||
let process: ProcessInstanceRepresentation;
|
||||
let user: UserModel;
|
||||
|
||||
const PROCESS_DATE_FORMAT = 'll';
|
||||
const PROCESS_DATE_FORMAT = 'PP';
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -76,6 +76,6 @@ 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(moment(process.started).format(PROCESS_DATE_FORMAT));
|
||||
await expect(await processDetailsPage.getCreated()).toEqual(format(process.started, PROCESS_DATE_FORMAT));
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user