mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-3658][ADF-3660][ADF-3661] Revisiting automated tests and test cases (#3869)
* [ADF-3658] Revisiting Content Services automated tests and test cases * [ADF-3661] Revisiting automated tests and test cases for Core and Insights folders * [ADF-3660] Revisiting automated tests and test cases for Process Services * Fixing lint errors
This commit is contained in:
committed by
Eugenio Romano
parent
04d42e2535
commit
094e1dab91
@@ -27,6 +27,7 @@ import resources = require('../util/resources');
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Process List - Pagination when adding processes', () => {
|
||||
|
||||
@@ -45,9 +46,11 @@ describe('Process List - Pagination when adding processes', () => {
|
||||
let app = resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
let nrOfProcesses = 25;
|
||||
let page, totalPages;
|
||||
let i;
|
||||
let apps = new AppsActions();
|
||||
let resultApp;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
let apps = new AppsActions();
|
||||
let users = new UsersActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -61,34 +64,43 @@ describe('Process List - Pagination when adding processes', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
let resultApp = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
resultApp = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
|
||||
for (let i = 0; i < nrOfProcesses; i++) {
|
||||
for (i = 0; i < (nrOfProcesses - 5); i++) {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
}
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C261046] Items per page set to 15 and adding of processes', () => {
|
||||
totalPages = 2;
|
||||
page = 1;
|
||||
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C261046] Should keep Items per page after adding processes', () => {
|
||||
totalPages = 2;
|
||||
page = 1;
|
||||
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * page + ' of ' + nrOfProcesses);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * page + ' of ' + (nrOfProcesses - 5));
|
||||
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fifteenValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
for (i; i < nrOfProcesses; i++) {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
}
|
||||
});
|
||||
|
||||
page++;
|
||||
paginationPage.clickOnNextPage();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
|
Reference in New Issue
Block a user