mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-10475] [Search] UX improvements for search (#5042)
This commit is contained in:
@@ -51,12 +51,12 @@ test.describe('Empty list views', () => {
|
||||
|
||||
async function checkPaginationForTabs(searchPage: SearchPage, tab: string, personalFiles: PersonalFilesPage) {
|
||||
await searchPage.sidenav.openPanel(tab);
|
||||
expect(await personalFiles.pagination.isRangePresent()).toBeFalsy();
|
||||
expect(await personalFiles.pagination.isMaxItemsPresent()).toBeFalsy();
|
||||
expect(await personalFiles.pagination.isCurrentPagePresent()).toBeFalsy();
|
||||
expect(await personalFiles.pagination.isTotalPagesPresent()).toBeFalsy();
|
||||
expect(await personalFiles.pagination.isPreviousButtonPresent()).toBeFalsy();
|
||||
expect(await personalFiles.pagination.isNextButtonPresent()).toBeFalsy();
|
||||
expect(await personalFiles.pagination.isRangePresent()).toBe(false);
|
||||
expect(await personalFiles.pagination.isMaxItemsPresent()).toBe(false);
|
||||
expect(await personalFiles.pagination.isCurrentPagePresent()).toBe(false);
|
||||
expect(await personalFiles.pagination.isTotalPagesPresent()).toBe(false);
|
||||
expect(await personalFiles.pagination.isPreviousButtonPresent()).toBe(false);
|
||||
expect(await personalFiles.pagination.isNextButtonPresent()).toBe(false);
|
||||
}
|
||||
|
||||
test('[XAT-4402] Empty My Libraries', async ({ myLibrariesPage }) => {
|
||||
@@ -99,10 +99,7 @@ test.describe('Empty list views', () => {
|
||||
});
|
||||
|
||||
test('[XAT-4590] Search Page - Pagination control is not displayed on empty page load', async ({ personalFiles, searchPage }) => {
|
||||
await personalFiles.acaHeader.searchButton.click();
|
||||
await searchPage.clickSearchButton();
|
||||
await searchPage.searchOverlay.checkFilesAndFolders();
|
||||
await searchPage.searchOverlay.searchFor('InvalidText');
|
||||
await searchPage.searchWithin('InvalidText', 'filesAndFolders');
|
||||
await searchPage.reload({ waitUntil: 'domcontentloaded' });
|
||||
await searchPage.dataTable.spinnerWaitForReload();
|
||||
|
||||
|
||||
@@ -120,12 +120,8 @@ test.describe('Special permissions', () => {
|
||||
await expect(sharedPage.dataTable.getRowByName(sitePrivate)).toHaveCount(0);
|
||||
});
|
||||
|
||||
test('[XAT-17775] Search - File is not displayed if the user no longer has permissions on it', async ({ personalFiles, searchPage }) => {
|
||||
await personalFiles.acaHeader.searchButton.click();
|
||||
await searchPage.clickSearchButton();
|
||||
await searchPage.searchOverlay.checkFilesAndFolders();
|
||||
await searchPage.searchOverlay.searchFor(fileName);
|
||||
await searchPage.dataTable.spinnerWaitForReload();
|
||||
test('[XAT-17775] Search - File is not displayed if the user no longer has permissions on it', async ({ searchPage }) => {
|
||||
await searchPage.searchWithin(fileName, 'filesAndFolders');
|
||||
|
||||
expect(await searchPage.dataTable.getRowsCount(), 'Incorrect number of items').toBe(1);
|
||||
|
||||
@@ -204,14 +200,9 @@ test.describe('Special permissions', () => {
|
||||
});
|
||||
|
||||
test(`[XAT-5612] Search Page - Location column is empty if the user doesn't have permissions on the file's parent folder`, async ({
|
||||
personalFiles,
|
||||
searchPage
|
||||
}) => {
|
||||
await personalFiles.acaHeader.searchButton.click();
|
||||
await searchPage.clickSearchButton();
|
||||
await searchPage.searchOverlay.checkFilesAndFolders();
|
||||
await searchPage.searchOverlay.searchFor(fileName);
|
||||
await searchPage.dataTable.spinnerWaitForReload();
|
||||
await searchPage.searchWithin(fileName, 'filesAndFolders');
|
||||
|
||||
expect(await searchPage.dataTable.getRowsCount(), 'Incorrect number of items').toBe(1);
|
||||
expect(await searchPage.dataTable.getItemLocationText(fileName)).toContain('You do not have permission to view the location of this document.');
|
||||
|
||||
Reference in New Issue
Block a user