Revert "[APPS-2157] [APPS-2158] [APPS-2161] [APPS-2162] [APPS-2165] migration of e2e test cases from moment to date-fns (#8864)" (#8938)

This reverts commit 3638ed06ef.
This commit is contained in:
Denys Vuika
2023-09-27 13:14:24 +01:00
committed by GitHub
parent 8f684a9f6a
commit 4786a26320
5 changed files with 22 additions and 22 deletions

View File

@@ -19,9 +19,9 @@ import { ContentServicesPage } from '../../core/pages/content-services.page';
import { browser } from 'protractor';
import { createApiService, LoginPage, StringUtil, UploadActions, UsersActions, ViewerPage } from '@alfresco/adf-testing';
import { FileModel } from '../../models/ACS/file.model';
import * as moment from 'moment';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { NodeEntry } from '@alfresco/js-api';
import { format } from 'date-fns';
describe('Document List Component', () => {
let uploadedFolder: NodeEntry;
@@ -146,7 +146,7 @@ describe('Document List Component', () => {
it('[C279929] Should be able to display the date with date type', async () => {
await apiService.login(acsUser.username, acsUser.password);
mediumDateUploadedNode = await uploadActions.uploadFile(mediumFileModel.location, mediumFileModel.name, '-my-');
const createdDate = format(new Date(mediumDateUploadedNode.createdAt), 'PP');
const createdDate = moment(mediumDateUploadedNode.createdAt).format('ll');
await contentServicesPage.goToDocumentList();
await contentServicesPage.enableMediumTimeFormat();
const dateValue = await contentServicesPage.getColumnValueForRow(mediumFileModel.name, 'Created');