[ACS-11855] include e2es lithium (#5194)

* [ACS-11855] included some e2es + small refactoring / improvements

* [ACS-11855] more tests include

* [ACS-11855] sonar cloud fix 1

* [ACS-11855] copilot review fixes 1

* [ACS-11855] copilot review fixes 2

* [ACS-11855] small tests fixes or improvements

* [ACS-11855] fixed failing tests

* [ACS-11855] sonar cloud fix

* [ACS-11855] sonar cloud fix 2

* [ACS-11855] more search improvements

* [ACS-11855] review fix 1

* [ACS-11855] review fix 2

* [ACS-11855] more small improvements
This commit is contained in:
Adam Świderski
2026-05-21 12:24:45 +02:00
committed by GitHub
parent c67b4dc203
commit aa03f7d005
35 changed files with 84 additions and 128 deletions
@@ -1,6 +1,3 @@
{
"all": {
"XAT-5523": "https://hyland.atlassian.net/browse/ACA-4697",
"XAT-5516": "https://hyland.atlassian.net/browse/ACS-9889"
}
"all": {}
}
@@ -32,8 +32,7 @@ import {
NodesApi,
FileActionsApi,
SitesApi,
MyLibrariesPage,
timeouts
MyLibrariesPage
} from '@alfresco/aca-playwright-shared';
import { Site } from '@alfresco/js-api';
@@ -95,6 +94,7 @@ test.describe('Info Drawer - Comments', () => {
await expect(favoritePage.infoDrawer.commentInputField).toBeVisible();
await favoritePage.infoDrawer.addCommentToNode(commentText);
await expect(favoritePage.infoDrawer.addCommentButton).toBeDisabled();
await favoritePage.infoDrawer.waitForComments();
expect(await favoritePage.infoDrawer.getCommentsCountFromList()).toEqual(1);
});
@@ -131,6 +131,7 @@ test.describe('Info Drawer - Comments', () => {
await expect(recentFilesPage.infoDrawer.commentInputField).toBeVisible();
await recentFilesPage.infoDrawer.addCommentToNode(commentText);
await expect(recentFilesPage.infoDrawer.addCommentButton).toBeDisabled();
await recentFilesPage.infoDrawer.waitForComments();
expect(await recentFilesPage.infoDrawer.getCommentsCountFromList()).toEqual(1);
});
@@ -160,11 +161,8 @@ test.describe('Info Drawer - Comments - Sites Privileges', () => {
let fileActionsApi1: FileActionsApi;
let sitesApi1: SitesApi;
let siteEntry5522: Site;
let siteEntry5523: Site;
const siteName5522 = `site-e2e-${Utils.random()}`;
const siteName5523 = `site-e2e-${Utils.random()}`;
const folderName5522 = `folder-e2e-${Utils.random()}`;
const folderName5523 = `folder-e2e-${Utils.random()}`;
const username1 = `user-e2e-${Utils.random()}`;
const username2 = `user-e2e-${Utils.random()}`;
@@ -189,16 +187,9 @@ test.describe('Info Drawer - Comments - Sites Privileges', () => {
siteEntry5522 = (await sitesApi1.createSite(siteName5522, Site.VisibilityEnum.PRIVATE)).entry;
await sitesApi1.addSiteMember(siteEntry5522.id, username2, 'SiteConsumer');
siteEntry5523 = (await sitesApi1.createSite(siteName5523, Site.VisibilityEnum.PRIVATE)).entry;
await sitesApi1.addSiteMember(siteEntry5523.id, username2, 'SiteContributor');
const documentLibraryId1 = await nodesApi1.getNodeIdFromParent('documentLibrary', siteEntry5522.guid);
await nodesApi1.createFolder(folderName5522, documentLibraryId1);
await fileActionsApi1.waitForNodes(folderName5522, { expect: 1 });
const documentLibraryId2 = await nodesApi1.getNodeIdFromParent('documentLibrary', siteEntry5523.guid);
await nodesApi1.createFolder(folderName5523, documentLibraryId2);
await fileActionsApi1.waitForNodes(folderName5523, { expect: 1 });
} catch (error) {
console.error(`beforeAll failed : ${error}`);
}
@@ -218,15 +209,4 @@ test.describe('Info Drawer - Comments - Sites Privileges', () => {
await expect(myLibrariesPage.infoDrawer.commentInputField).toBeHidden();
await expect(myLibrariesPage.infoDrawer.addCommentButton).toBeHidden();
});
test('[XAT-5523] Contributor can add comments', async ({ myLibrariesPage }) => {
await navigateToFolderAndOpenCommentsTab(myLibrariesPage, siteEntry5523.guid, folderName5523);
await expect(myLibrariesPage.infoDrawer.commentsHeader).toBeVisible();
await expect(myLibrariesPage.infoDrawer.commentInputField).toBeVisible();
await expect(myLibrariesPage.infoDrawer.addCommentButton).toBeVisible();
await myLibrariesPage.infoDrawer.commentInputField.fill(`e2e-comment-${Utils.random()}`);
await myLibrariesPage.infoDrawer.addCommentButton.click();
await myLibrariesPage.infoDrawer.commentsList.first().waitFor({ timeout: timeouts.medium });
await expect(myLibrariesPage.infoDrawer.commentsList).toHaveCount(1);
});
});