mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4089] Refactoring ContentListPage (#4162)
* [ADF-NO-ISSUE] Refactoring ContentListPage * Applying changes * [ADF-4089] contentListPage refactoring * Fixing missing dependencies * Fixing core and search failing tests * Fix tooltip document-list tests * no message
This commit is contained in:
committed by
Eugenio Romano
parent
88ef01011e
commit
27c6e18a10
@@ -28,6 +28,7 @@ import { Util } from '../../util/util';
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Document List - Pagination', function () {
|
||||
let pagination = {
|
||||
@@ -54,10 +55,10 @@ describe('Document List - Pagination', function () {
|
||||
let navigationBarPage = new NavigationBarPage();
|
||||
|
||||
let acsUser = new AcsUserModel();
|
||||
let newFolderModel = new FolderModel({ 'name': 'newFolder' });
|
||||
let newFolderModel = new FolderModel({'name': 'newFolder'});
|
||||
let fileNames = [], nrOfFiles = 20, currentPage = 1, secondSetOfFiles = [], secondSetNumber = 25;
|
||||
let folderTwoModel = new FolderModel({ 'name': 'folderTwo' });
|
||||
let folderThreeModel = new FolderModel({ 'name': 'folderThree' });
|
||||
let folderTwoModel = new FolderModel({'name': 'folderTwo'});
|
||||
let folderThreeModel = new FolderModel({'name': 'folderThree'});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
let uploadActions = new UploadActions();
|
||||
@@ -90,7 +91,7 @@ describe('Document List - Pagination', function () {
|
||||
|
||||
it('[C260062] Should use default pagination settings', function () {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.navigateToFolder(newFolderModel.name);
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
@@ -105,7 +106,7 @@ describe('Document List - Pagination', function () {
|
||||
|
||||
it('[C274713] Should be able to set Items per page to 20', function () {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.navigateToFolder(newFolderModel.name);
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
@@ -132,7 +133,7 @@ describe('Document List - Pagination', function () {
|
||||
|
||||
it('[C260069] Should be able to set Items per page to 5', function () {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.navigateToFolder(newFolderModel.name);
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
@@ -188,7 +189,7 @@ describe('Document List - Pagination', function () {
|
||||
it('[C260067] Should be able to set Items per page to 10', function () {
|
||||
currentPage = 1;
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.navigateToFolder(newFolderModel.name);
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.ten);
|
||||
@@ -225,7 +226,7 @@ describe('Document List - Pagination', function () {
|
||||
it('[C260065] Should be able to set Items per page to 15', function () {
|
||||
currentPage = 1;
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.navigateToFolder(newFolderModel.name);
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
|
||||
@@ -258,15 +259,15 @@ describe('Document List - Pagination', function () {
|
||||
|
||||
it('[C91320] Pagination should preserve sorting', function () {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.navigateToFolder(newFolderModel.name);
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.getElementsDisplayedName().then(function (list) {
|
||||
contentServicesPage.checkElementsSortedAsc(list);
|
||||
contentServicesPage.getElementsDisplayedName().then((elements) => {
|
||||
contentServicesPage.checkElementsSortedAsc(elements);
|
||||
});
|
||||
|
||||
contentServicesPage.sortByName(false);
|
||||
@@ -302,20 +303,20 @@ describe('Document List - Pagination', function () {
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
contentServicesPage.navigateToFolder(newFolderModel.name);
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
contentServicesPage.createNewFolder(folderTwoModel.name).checkContentIsDisplayed(folderTwoModel.name);
|
||||
contentServicesPage.navigateToFolder(folderTwoModel.name);
|
||||
contentServicesPage.doubleClickRow(folderTwoModel.name);
|
||||
contentServicesPage.checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260071] Should be able to change pagination when having 25 files', function () {
|
||||
currentPage = 1;
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.navigateToFolder(folderThreeModel.name);
|
||||
contentServicesPage.doubleClickRow(folderThreeModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(contentServicesPage.getActiveBreadcrumb()).toEqual(folderThreeModel.name);
|
||||
|
Reference in New Issue
Block a user