Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APPS-2170] Replace moment.js to date-fns in file-folder-properties.test.ts #3463

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions e2e/protractor/suites/info-drawer/file-folder-properties.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import {
DATE_TIME_FORMAT,
DATE_FORMAT
} from '@alfresco/aca-testing-shared';
import { DateFnsUtils } from '@alfresco/adf-core';
import { BrowserActions } from '@alfresco/adf-testing';
import { format } from 'date-fns';

describe('File / Folder properties', () => {
const username = `user1-${Utils.random()}`;
Expand Down Expand Up @@ -131,10 +131,10 @@ describe('File / Folder properties', () => {
file1.name,
file1.title,
apiProps.entry.createdByUser.displayName,
format(apiProps.entry.createdAt, DATE_FORMAT),
DateFnsUtils.formatDate(apiProps.entry.createdAt, DATE_FORMAT),
pkunduGL marked this conversation as resolved.
Show resolved Hide resolved
`${apiProps.entry.content.sizeInBytes} Bytes`,
apiProps.entry.modifiedByUser.displayName,
format(apiProps.entry.modifiedAt, DATE_FORMAT),
DateFnsUtils.formatDate(apiProps.entry.modifiedAt, DATE_FORMAT),
apiProps.entry.content.mimeTypeName,
file1.author,
file1.description,
Expand All @@ -159,9 +159,9 @@ describe('File / Folder properties', () => {
folder1.name,
folder1.title,
apiProps.entry.createdByUser.displayName,
format(apiProps.entry.createdAt, DATE_FORMAT),
DateFnsUtils.formatDate(apiProps.entry.createdAt, DATE_FORMAT),
apiProps.entry.modifiedByUser.displayName,
format(apiProps.entry.modifiedAt, DATE_FORMAT),
DateFnsUtils.formatDate(apiProps.entry.modifiedAt, DATE_FORMAT),
folder1.author,
folder1.description,
folder1.contentType
Expand Down Expand Up @@ -219,7 +219,7 @@ describe('File / Folder properties', () => {
const expectedPropValues = [
properties['exif:pixelXDimension']?.toString(),
properties['exif:pixelYDimension']?.toString(),
format(new Date(properties['exif:dateTimeOriginal']), DATE_TIME_FORMAT),
DateFnsUtils.formatDate(new Date(properties['exif:dateTimeOriginal']), DATE_TIME_FORMAT),
properties['exif:exposureTime']?.toString(),
properties['exif:fNumber']?.toString(),
properties['exif:flash'],
Expand Down
4 changes: 2 additions & 2 deletions projects/aca-testing-shared/src/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export const BROWSER_WAIT_TIMEOUT = 10000;
export const USE_HASH_STRATEGY = true;

// Dates
export const DATE_FORMAT = 'MMM d, yyyy';
export const DATE_TIME_FORMAT = 'MMM d, yyyy, H:mm';
export const DATE_FORMAT = 'MMM D, YYYY';
export const DATE_TIME_FORMAT = 'MMM D, YYYY, H:mm';

// Application Routes
export const APP_ROUTES = {
Expand Down
Loading