Skip to content

Commit

Permalink
Manual dependencies update (#4298)
Browse files Browse the repository at this point in the history
* Manual dependencies update

* Manual dependencies update - e2es fix

---------

Co-authored-by: datguychen <[email protected]>
  • Loading branch information
MichalKinas and datguychen authored Dec 11, 2024
1 parent 079f362 commit 7fcc0af
Show file tree
Hide file tree
Showing 12 changed files with 88 additions and 142 deletions.
2 changes: 1 addition & 1 deletion e2e/playwright/list-views/src/tests/favorites.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ test.describe('Favorites Files', () => {

test('[C280482] has the correct columns', async ({ favoritePage }) => {
const expectedColumns = ['Name', 'Location', 'Size', 'Modified', 'Modified by', 'Tags'];
const actualColumns = await favoritePage.dataTable.getColumnHeaders();
const actualColumns = Utils.trimArrayElements(await favoritePage.dataTable.getColumnHeaders());
expect(actualColumns).toEqual(expectedColumns);
});

Expand Down
4 changes: 2 additions & 2 deletions e2e/playwright/list-views/src/tests/file-libraries.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ test.describe('File Libraries', () => {

test('[C217095] has the correct columns', async ({ myLibrariesPage }) => {
const expectedColumns = ['Name', 'Description', 'My Role', 'Visibility'];
const actualColumns = await myLibrariesPage.dataTable.getColumnHeaders();
const actualColumns = Utils.trimArrayElements(await myLibrariesPage.dataTable.getColumnHeaders());
expect(actualColumns).toEqual(expectedColumns);
});

Expand Down Expand Up @@ -142,7 +142,7 @@ test.describe('File Libraries', () => {

test('[C289893] has the correct columns', async ({ favoritesLibrariesPage }) => {
const expectedColumns = ['Name', 'Description', 'My Role', 'Visibility'];
const actualColumns = await favoritesLibrariesPage.dataTable.getColumnHeaders();
const actualColumns = Utils.trimArrayElements(await favoritesLibrariesPage.dataTable.getColumnHeaders());

expect(actualColumns).toEqual(expectedColumns);
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/playwright/list-views/src/tests/personal-files.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test.describe('Personal Files', () => {

test('[C217142] has the correct columns', async ({ personalFiles }) => {
const expectedColumns = ['Name', 'Size', 'Modified', 'Modified by', 'Tags'];
const actualColumns = await personalFiles.dataTable.getColumnHeaders();
const actualColumns = Utils.trimArrayElements(await personalFiles.dataTable.getColumnHeaders());
expect(actualColumns).toEqual(expectedColumns);
});

Expand Down
2 changes: 1 addition & 1 deletion e2e/playwright/list-views/src/tests/recent-files.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ test.describe('Recent Files', () => {

test('[C213168] has the correct columns', async ({ recentFilesPage }) => {
const expectedColumns = ['Name', 'Location', 'Size', 'Modified', 'Tags'];
const actualColumns = await recentFilesPage.dataTable.getColumnHeaders();
const actualColumns = Utils.trimArrayElements(await recentFilesPage.dataTable.getColumnHeaders());

expect(actualColumns).toEqual(expectedColumns);
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/playwright/list-views/src/tests/shared-files.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ test.describe('Shared Files', () => {

test('[C213113] has the correct columns', async ({ sharedPage }) => {
const expectedColumns = ['Name', 'Location', 'Size', 'Modified', 'Modified by', 'Shared by', 'Tags'];
const actualColumns = await sharedPage.dataTable.getColumnHeaders();
const actualColumns = Utils.trimArrayElements(await sharedPage.dataTable.getColumnHeaders());
expect(actualColumns).toEqual(expectedColumns);
});

Expand Down
2 changes: 1 addition & 1 deletion e2e/playwright/list-views/src/tests/trash-admin.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test.describe('Trash admin', () => {
test('[C213217] has the correct columns', async ({ trashPage }) => {
await trashPage.navigate();
const expectedColumns = ['Name', 'Location', 'Size', 'Deleted', 'Deleted by'];
const actualColumns = await trashPage.dataTable.getColumnHeaders();
const actualColumns = Utils.trimArrayElements(await trashPage.dataTable.getColumnHeaders());

expect(actualColumns).toEqual(expectedColumns);
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/playwright/list-views/src/tests/trash.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ test.describe('Trash', () => {

test('[C280494] has the correct columns', async ({ trashPage }) => {
const expectedColumns = ['Name', 'Location', 'Size', 'Deleted'];
const actualColumns = await trashPage.dataTable.getColumnHeaders();
const actualColumns = Utils.trimArrayElements(await trashPage.dataTable.getColumnHeaders());

expect(actualColumns).toEqual(expectedColumns);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
*/

import { expect } from '@playwright/test';
import { ApiClientFactory, Utils, test, TrashcanApi, NodesApi } from '@alfresco/aca-playwright-shared';
import { ApiClientFactory, Utils, test, TrashcanApi, NodesApi, FileActionsApi } from '@alfresco/aca-playwright-shared';

test.describe('Search results - files and folders', () => {
let nodesApi: NodesApi;
let trashcanApi: TrashcanApi;
let fileActionsApi: FileActionsApi;

const random = Utils.random();
const username = `user-${random}`;
Expand All @@ -39,6 +40,7 @@ test.describe('Search results - files and folders', () => {
await apiClientFactory.createUser({ username });
nodesApi = await NodesApi.initialize(username, username);
trashcanApi = await TrashcanApi.initialize(username, username);
fileActionsApi = await FileActionsApi.initialize(username, username);
} catch (error) {
console.error(`beforeAll failed: ${error}`);
}
Expand Down Expand Up @@ -66,6 +68,7 @@ test.describe('Search results - files and folders', () => {
const fileDescription = 'file description';

await nodesApi.createFile(file, '-my-', fileTitle, fileDescription);
await fileActionsApi.waitForNodes(file, { expect: 1 });
await searchPage.searchWithin(file, 'files');
await searchPage.dataTable.clickItemLocation(file);
expect((await personalFiles.breadcrumb.items.textContent()).trim()).toEqual('Personal Files');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ test.describe('Search Results - General', () => {
await searchPage.searchWithin(site1.name, 'libraries');

const expectedColumns = ['Name', 'Description', 'My Role', 'Visibility'];
const actualColumns = await searchPage.dataTable.getColumnHeaders();
const actualColumns = Utils.trimArrayElements(await searchPage.dataTable.getColumnHeaders());

expect(actualColumns).toEqual(expectedColumns);
});
Expand Down
Loading

0 comments on commit 7fcc0af

Please sign in to comment.