mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-] update library to use new js-api 3.0.0 (#4097)
This commit is contained in:
committed by
Eugenio Romano
parent
2acd1b4e26
commit
3ef7d3b7ea
81
e2e/core/infinite-scrolling.e2e.ts
Normal file
81
e2e/core/infinite-scrolling.e2e.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '../pages/adf/loginPage';
|
||||
import { ContentServicesPage } from '../pages/adf/contentServicesPage';
|
||||
|
||||
import { AcsUserModel } from '../models/ACS/acsUserModel';
|
||||
import { FolderModel } from '../models/ACS/folderModel';
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import { Util } from '../util/util';
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { UploadActions } from '../actions/ACS/upload.actions';
|
||||
|
||||
describe('Enable infinite scrolling', () => {
|
||||
|
||||
let loginPage = new LoginPage();
|
||||
let contentServicesPage = new ContentServicesPage();
|
||||
|
||||
let acsUser = new AcsUserModel();
|
||||
let folderModel = new FolderModel({ 'name': 'folderOne' });
|
||||
|
||||
let fileNames = [], nrOfFiles = 30;
|
||||
let fileNum = 0;
|
||||
|
||||
let files = {
|
||||
base: 'newFile',
|
||||
extension: '.txt'
|
||||
};
|
||||
|
||||
beforeAll(async (done) => {
|
||||
let uploadActions = new UploadActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
fileNames = Util.generateSequenceFiles(1, nrOfFiles, files.base, files.extension);
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
let folderUploadedModel = await uploadActions.createFolder(this.alfrescoJsApi, folderModel.name, '-my-');
|
||||
|
||||
await uploadActions.createEmptyFiles(this.alfrescoJsApi, fileNames, folderUploadedModel.entry.id);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C260484] Should be possible to enable infinite scrolling', () => {
|
||||
contentServicesPage.navigateToFolder(folderModel.name);
|
||||
contentServicesPage.enableInfiniteScrolling();
|
||||
contentServicesPage.clickLoadMoreButton();
|
||||
for (fileNum; fileNum < nrOfFiles; fileNum++) {
|
||||
contentServicesPage.checkContentIsDisplayed(fileNames[fileNum]);
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user