Skip to content

Commit

Permalink
Merge branch 'develop' into dev-akashrathod28-viewer-specialpermissions
Browse files Browse the repository at this point in the history
  • Loading branch information
akashrathod28 authored Sep 28, 2023
2 parents 92c07ee + f28bb3f commit 24303c2
Show file tree
Hide file tree
Showing 16 changed files with 270 additions and 237 deletions.
10 changes: 5 additions & 5 deletions e2e/playwright/navigation/src/tests/sidebar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ test.describe('Sidebar', () => {

test('[C269100] sidebar state is preserved on page refresh', async ({ personalFiles }) => {
await personalFiles.navigate();
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBe(true);
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBe(true);
await personalFiles.reload();
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBe(true);
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBe(true);

await personalFiles.sidenav.collapseSideNav();

expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBe(false);
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBe(false);
await personalFiles.reload();
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBe(false);
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBe(false);
});

test('[C269096] sidebar toggle', async ({ personalFiles }) => {
await personalFiles.navigate();
await personalFiles.sidenav.collapseSideNav();
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBe(false);
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar expanded').toBe(false);
await personalFiles.sidenav.expandSideNav();
expect(await personalFiles.sidenav.isSidenavExpanded(), 'Sidebar not expanded').toBe(true);
});
Expand Down
13 changes: 6 additions & 7 deletions e2e/protractor/suites/info-drawer/file-folder-properties.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ import {
DATE_FORMAT
} from '@alfresco/aca-testing-shared';
import { BrowserActions } from '@alfresco/adf-testing';

const moment = require('moment');
import { format } from 'date-fns';

describe('File / Folder properties', () => {
const username = `user1-${Utils.random()}`;
Expand Down Expand Up @@ -132,10 +131,10 @@ describe('File / Folder properties', () => {
file1.name,
file1.title,
apiProps.entry.createdByUser.displayName,
moment(apiProps.entry.createdAt).format(DATE_FORMAT),
format(apiProps.entry.createdAt, DATE_FORMAT),
`${apiProps.entry.content.sizeInBytes} Bytes`,
apiProps.entry.modifiedByUser.displayName,
moment(apiProps.entry.modifiedAt).format(DATE_FORMAT),
format(apiProps.entry.modifiedAt, DATE_FORMAT),
apiProps.entry.content.mimeTypeName,
file1.author,
file1.description,
Expand All @@ -160,9 +159,9 @@ describe('File / Folder properties', () => {
folder1.name,
folder1.title,
apiProps.entry.createdByUser.displayName,
moment(apiProps.entry.createdAt).format(DATE_FORMAT),
format(apiProps.entry.createdAt, DATE_FORMAT),
apiProps.entry.modifiedByUser.displayName,
moment(apiProps.entry.modifiedAt).format(DATE_FORMAT),
format(apiProps.entry.modifiedAt, DATE_FORMAT),
folder1.author,
folder1.description,
folder1.contentType
Expand Down Expand Up @@ -220,7 +219,7 @@ describe('File / Folder properties', () => {
const expectedPropValues = [
properties['exif:pixelXDimension']?.toString(),
properties['exif:pixelYDimension']?.toString(),
moment(properties['exif:dateTimeOriginal']).format(DATE_TIME_FORMAT),
format(new Date(properties['exif:dateTimeOriginal']), DATE_TIME_FORMAT),
properties['exif:exposureTime']?.toString(),
properties['exif:fNumber']?.toString(),
properties['exif:flash'],
Expand Down
9 changes: 4 additions & 5 deletions e2e/protractor/suites/search/search-filters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ import {
SizeOperator
} from '@alfresco/aca-testing-shared';
import { BrowserActions } from '@alfresco/adf-testing';

const moment = require('moment');
import { addDays, format, subDays } from 'date-fns';

describe('Search filters', () => {
const random = Utils.random();
Expand Down Expand Up @@ -162,9 +161,9 @@ describe('Search filters', () => {
});

describe('Filter by Created date', () => {
const yesterday = moment().subtract(1, 'day').format('DD-MMM-YY');
const today = moment().format('DD-MMM-YY');
const future = moment().add(1, 'month').format('DD-MMM-YY');
const yesterday = format(subDays(new Date(), 1), 'dd-MMM-yy');
const today = format(new Date(), 'dd-MMM-yy');
const future = format(addDays(new Date(), 1), 'dd-MMM-yy');

afterEach(async () => {
await Utils.pressEscape();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

import { AdminActions, LoginPage, SearchResultsPage, RepoClient, Utils } from '@alfresco/aca-testing-shared';
const moment = require('moment');
import { format } from 'date-fns';

describe('Search results - files and folders', () => {
const random = Utils.random();
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('Search results - files and folders', () => {
await dataTable.waitForBody();

const fileEntry = await apis.user.nodes.getNodeById(fileId);
const modifiedDate = moment(fileEntry.entry.modifiedAt).format('MMM D, YYYY, h:mm:ss A');
const modifiedDate = format(fileEntry.entry.modifiedAt, 'MMM d, yyyy, h:mm:ss aa');
const modifiedBy = fileEntry.entry.modifiedByUser.displayName;
const size = fileEntry.entry.content.sizeInBytes;

Expand All @@ -114,7 +114,7 @@ describe('Search results - files and folders', () => {
await dataTable.waitForBody();

const folderEntry = await apis.user.nodes.getNodeById(folderId);
const modifiedDate = moment(folderEntry.entry.modifiedAt).format('MMM D, YYYY, h:mm:ss A');
const modifiedDate = format(folderEntry.entry.modifiedAt, 'MMM d, yyyy, h:mm:ss aa');
const modifiedBy = folderEntry.entry.modifiedByUser.displayName;

expect(await dataTable.isItemPresent(folder)).toBe(true, `${folder} is not displayed`);
Expand Down
Loading

0 comments on commit 24303c2

Please sign in to comment.