[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:
Jatin Chugh
2023-09-26 18:20:47 +05:30
committed by GitHub
parent f488520752
commit 3638ed06ef
5 changed files with 22 additions and 22 deletions

View File

@@ -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));
});
});