mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
include attach file test (#6102)
* include attach file test * fix * fix * fix * fix
This commit is contained in:
@@ -93,6 +93,8 @@ describe('Enable infinite scrolling', () => {
|
||||
await contentServicesPage.doubleClickRow(folderModel.name);
|
||||
await contentServicesPage.enableInfiniteScrolling();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoadedInfinitePagination();
|
||||
|
||||
for (let i = 0; i < nrOfFiles; i++) {
|
||||
await contentServicesPage.checkContentIsDisplayed(fileNames[i]);
|
||||
}
|
||||
@@ -102,6 +104,8 @@ describe('Enable infinite scrolling', () => {
|
||||
await contentServicesPage.openFolder(deleteUploaded.entry.name);
|
||||
await contentServicesPage.enableInfiniteScrolling();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoadedInfinitePagination();
|
||||
|
||||
for (let i = 0; i < nrOfDeletedFiles; i++) {
|
||||
await contentServicesPage.checkContentIsDisplayed(deleteFileNames[i]);
|
||||
}
|
||||
@@ -121,15 +125,14 @@ describe('Enable infinite scrolling', () => {
|
||||
await contentServicesPage.doubleClickRow(folderModel.name);
|
||||
|
||||
await contentServicesPage.enableInfiniteScrolling();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoadedInfinitePagination();
|
||||
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(pageSize);
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoadedInfinitePagination();
|
||||
|
||||
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
});
|
||||
|
||||
it('[C299202] Should not display load more button when all the files are already displayed', async () => {
|
||||
|
@@ -15,7 +15,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DropActions, BrowserActions, BrowserVisibility, DateUtil, DocumentListPage, TogglePage, DropdownPage } from '@alfresco/adf-testing';
|
||||
import {
|
||||
DropActions,
|
||||
BrowserActions,
|
||||
BrowserVisibility,
|
||||
DateUtil,
|
||||
DocumentListPage,
|
||||
TogglePage,
|
||||
DropdownPage,
|
||||
Logger
|
||||
} from '@alfresco/adf-testing';
|
||||
import { Locator, $$, browser, by, element, ElementFinder, protractor } from 'protractor';
|
||||
import { CreateLibraryDialogPage } from './dialog/create-library-dialog.page';
|
||||
import { FolderDialogPage } from './dialog/folder-dialog.page';
|
||||
@@ -344,6 +353,7 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async doubleClickRow(nodeName): Promise<void> {
|
||||
Logger.log(`Open Folder ${nodeName}`);
|
||||
await this.contentList.doubleClickRow(nodeName);
|
||||
await this.contentList.dataTablePage().waitTillContentLoaded();
|
||||
}
|
||||
@@ -648,9 +658,11 @@ export class ContentServicesPage {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click(this.multiSelectToggle);
|
||||
}
|
||||
|
||||
async multiSelectToggleIsEnabled(): Promise<boolean> {
|
||||
return this.multiSelectToggle.isEnabled();
|
||||
}
|
||||
|
||||
async clickSelectAllCheckbox(): Promise<void> {
|
||||
await BrowserActions.click(this.selectAllCheckbox);
|
||||
}
|
||||
|
@@ -103,6 +103,7 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
await contentServicesPage.checkDocumentListElementsAreDisplayed();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
@@ -111,7 +112,6 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
|
||||
|
||||
await paginationPage.clickOnNextPage();
|
||||
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
@@ -135,6 +135,7 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
await contentServicesPage.checkDocumentListElementsAreDisplayed();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
|
Reference in New Issue
Block a user