[MNT-25478] Add Information dialog for nodes and dialog for additional location references (#5041)

* [MNT-25478] Add Information dialog for nodes and dialog for additional location references

* [MNT-25478] CR fixes

* [MNT-25478] CR fixes

* [MNT-25478] Unit test fix

* [MNT-25478] E2E locator fixes

* [MNT-25478] E2E locator fixes

* [MMNT-25478] Add cm:contains to secondary parents API call

* [MMNT-25478] Small fix

* [MNT-25478] First e2e fixes

* more fixes for e2es

* last e2e fixes

---------

Co-authored-by: Adam Świderski <adam.tomasz.swiderski@gmail.com>
This commit is contained in:
Michal Kinas
2026-02-18 12:27:32 +01:00
committed by GitHub
co-authored by Adam Świderski
parent 0f7bd89263
commit 4204745227
36 changed files with 1636 additions and 626 deletions
@@ -133,7 +133,7 @@ test.describe('Actions - Folder Information', () => {
) {
await page.dataTable.selectItems(folderName);
await page.acaHeader.clickMoreActions();
await page.matMenu.clickMenuItem('Folder Information');
await page.matMenu.clickMenuItem('Information');
await expect(async () => {
expect(await page.folderInformationDialog.folderNumberOfFiles.textContent()).toContain(expectedNumber);
expect(await page.folderInformationDialog.folderSize.textContent()).toContain(expectedSize);
@@ -153,46 +153,34 @@ test.describe('Actions - Folder Information', () => {
test('[XAT-17722] Folder information Empty folder size and number of documents as 0', async ({ personalFiles }) => {
await personalFiles.navigate();
await checkFolderInformation(personalFiles, emptyFolder, '0', '0 bytes', `/Company Home/User Homes/${username}`, 'isEmpty');
await checkFolderInformation(personalFiles, emptyFolder, '0', '0 Bytes', `/Company Home/User Homes/${username}`, 'isEmpty');
});
test('[XAT-17715] Folder information correct folder size and number of documents - single file', async ({ personalFiles }) => {
await personalFiles.navigate();
await checkFolderInformation(personalFiles, folder1File, '1', '13,877 bytes (13.88 KB on disk)', `/Company Home/User Homes/${username}`);
await checkFolderInformation(personalFiles, folder1File, '1', '13.55 KB', `/Company Home/User Homes/${username}`);
});
test('[XAT-17752] Folder information correct folder size and number of documents - multiple files', async ({ personalFiles }) => {
await personalFiles.navigate();
await checkFolderInformation(personalFiles, folderXFiles, '3', '41,631 bytes (41.63 KB on disk)', `/Company Home/User Homes/${username}`);
await checkFolderInformation(personalFiles, folderXFiles, '3', '40.66 KB', `/Company Home/User Homes/${username}`);
});
test('[XAT-17753] Folder information correct folder size and number of documents - folder and files', async ({ personalFiles }) => {
await personalFiles.navigate();
await checkFolderInformation(
personalFiles,
folderXFilesAndFolders,
'5',
'69,385 bytes (69.39 KB on disk)',
`/Company Home/User Homes/${username}`
);
await checkFolderInformation(personalFiles, folderXFilesAndFolders, '5', '67.76 KB', `/Company Home/User Homes/${username}`);
});
test('[XAT-17758] Folder information correct folder size and number of documents - from libraries', async ({ myLibrariesPage }) => {
await myLibrariesPage.navigate();
await myLibrariesPage.dataTable.getRowByName(libraryForFolder).dblclick();
await checkFolderInformation(
myLibrariesPage,
folderInLibrary,
'1',
'13,877 bytes (13.88 KB on disk)',
`/Company Home/Sites/${libraryForFolder}/documentLibrary`
);
await checkFolderInformation(myLibrariesPage, folderInLibrary, '1', '13.55 KB', `/Company Home/Sites/${libraryForFolder}/documentLibrary`);
});
test('[XAT-17759] Folder information correct folder size and number of documents - from search', async ({ personalFiles, searchPage }) => {
await personalFiles.navigate();
await searchPage.searchWithin(folderForSearch, 'folders');
await checkFolderInformation(searchPage, folderForSearch, '2', '27,754 bytes (27.75 KB on disk)', `/Company Home/User Homes/${username}`);
await checkFolderInformation(searchPage, folderForSearch, '2', '27.1 KB', `/Company Home/User Homes/${username}`);
});
test('[XAT-17766] Folder information correct folder size and number of documents - nested folders', async ({ personalFiles }) => {
@@ -203,7 +191,7 @@ test.describe('Actions - Folder Information', () => {
personalFiles,
folderNested3,
'1',
'13,877 bytes (13.88 KB on disk)',
'13.55 KB',
`/Company Home/User Homes/${username}/${folderNested1}/${folderNested2}`
);
});
@@ -181,7 +181,9 @@ test.describe('Special permissions', () => {
}) => {
await recentFilesPage.navigate();
expect(await recentFilesPage.dataTable.isItemPresent(fileName)).toBe(true);
expect(await recentFilesPage.dataTable.getItemLocationText(fileName)).toEqual('Unknown');
expect(await recentFilesPage.dataTable.getItemLocationText(fileName)).toContain(
'You do not have permission to view the location of this document.'
);
});
test(`[XAT-4464] Favorites - Location column is empty if the user doesn't have permissions on the file's parent folder`, async ({
@@ -189,14 +191,16 @@ test.describe('Special permissions', () => {
}) => {
await favoritePage.navigate();
expect(await favoritePage.dataTable.getRowsCount(), 'Incorrect number of items').toBe(1);
expect(await favoritePage.dataTable.getItemLocationText(fileName)).toEqual('Unknown');
expect(await favoritePage.dataTable.getItemLocationText(fileName)).toContain(
'You do not have permission to view the location of this document.'
);
});
test(`[XAT-4441] Shared Files - Location column is empty if the user doesn't have permissions on the file's parent folder`, async ({
sharedPage
}) => {
await sharedPage.navigate();
expect(await sharedPage.dataTable.getItemLocationText(fileName)).toEqual('Unknown');
expect(await sharedPage.dataTable.getItemLocationText(fileName)).toContain('You do not have permission to view the location of this document.');
});
test(`[XAT-5612] Search Page - Location column is empty if the user doesn't have permissions on the file's parent folder`, async ({
@@ -210,7 +214,7 @@ test.describe('Special permissions', () => {
await searchPage.dataTable.spinnerWaitForReload();
expect(await searchPage.dataTable.getRowsCount(), 'Incorrect number of items').toBe(1);
expect(await searchPage.dataTable.getItemLocationText(fileName)).toEqual('Unknown');
expect(await searchPage.dataTable.getItemLocationText(fileName)).toContain('You do not have permission to view the location of this document.');
});
});
});
@@ -90,7 +90,9 @@ test.describe('Trash', () => {
});
test('[XAT-4475] Location column is empty if parent folder no longer exists', async ({ trashPage }) => {
expect(await trashPage.dataTable.getItemLocationText(fileDeleted)).toEqual('');
expect(await trashPage.dataTable.getItemLocationText(fileDeleted)).toContain(
'You do not have permission to view the location of this document.'
);
});
test(`[XAT-4470] Clicking on the location link redirects to parent folder - item in User's Home`, async ({ trashPage }) => {
@@ -76,90 +76,5 @@ test.describe('Search - Filters - Date', () => {
await expect(searchPage.searchFiltersDate.betweenRadioButton).toBeChecked();
expect(await searchPage.searchFiltersDate.isSearchTabSelected()).toBe('true');
});
test('[XAT-5582] Should able to filter search result with Created date under Date Facet - Created anytime', async ({ searchPage }) => {
await searchPage.searchFiltersDate.filterFilesByDate({
searchPage,
filterType: 'anytime',
dateFilterTab: 'Created',
searchPhrase: randomId,
searchType: 'files',
expectSearchResults: 2
});
});
test('[XAT-5583] Should able to filter search result with Modified date under Date Facet - Modified anytime', async ({ searchPage }) => {
await searchPage.searchFiltersDate.filterFilesByDate({
searchPage,
filterType: 'anytime',
dateFilterTab: 'Modified',
searchPhrase: randomId,
searchType: 'files',
expectSearchResults: 2
});
});
test('[XAT-17699] Should able to filter search result with Created date under Date Facet - Created in the last', async ({ searchPage }) => {
await searchPage.searchFiltersDate.filterFilesByDate({
searchPage,
filterType: 'inTheLast',
dateFilterTab: 'Created',
searchPhrase: randomId,
searchType: 'files',
expectSearchResults: 2,
inTheLastInputValue: '1'
});
});
test('[XAT-17701] Should able to filter search result with Modified date under Date Facet - Modified in the last', async ({ searchPage }) => {
await searchPage.searchFiltersDate.filterFilesByDate({
searchPage,
filterType: 'inTheLast',
dateFilterTab: 'Modified',
searchPhrase: randomId,
searchType: 'files',
expectSearchResults: 2,
inTheLastInputValue: '1'
});
});
});
test.describe('Search - Filters - Date - Modified/Created', () => {
const currentAndPreviousDay = Utils.getCurrentAndPreviousDay();
const searchPhrase = `Project Contract`;
const fileNamePng = `${randomId}-${searchPhrase}.png`;
const dateForSearch = '01-Jan-11';
test.beforeAll(async () => {
try {
const apiClientFactory = new ApiClientFactory();
await apiClientFactory.setUpAcaBackend('admin');
await apiClientFactory.createUser({ username });
trashcanApi = await TrashcanApi.initialize(username, username);
nodesApi = await NodesApi.initialize(username, username);
const fileActionsApi = await FileActionsApi.initialize(username, username);
await fileActionsApi.uploadFileWithRename(TEST_FILES.PNG_FILE.path, fileNamePng, '-my-');
} catch (error) {
console.error(`beforeAll failed: ${error}`);
}
});
test.afterAll(async () => {
await Utils.deleteNodesSitesEmptyTrashcan(nodesApi, trashcanApi, 'afterAll failed');
});
test('[XAT-17700] Should able to filter search result with Created date under Date Facet - Created between', async ({ searchPage }) => {
await searchPage.searchFiltersDate.filterFilesByDate({
searchPage,
filterType: 'between',
dateFilterTab: 'Created',
searchPhrase: searchPhrase,
searchType: 'files',
expectSearchResults: 1,
inTheLastInputValue: '1',
startDay: dateForSearch,
endDay: currentAndPreviousDay.currentDate
});
});
});
});