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
@@ -28,6 +28,7 @@ import { UsersActions } from '../actions/users.actions';
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Items per page set to 15 and adding of tasks', () => {
|
||||
|
||||
@@ -38,7 +39,9 @@ describe('Items per page set to 15 and adding of tasks', () => {
|
||||
|
||||
let processUserModel;
|
||||
let app = resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
let currentPage = 1, nrOfTasks = 25, totalPages = 2;
|
||||
let currentPage = 1, nrOfTasks = 25, totalPages = 2, i, resultApp;
|
||||
|
||||
let apps = new AppsActions();
|
||||
|
||||
let itemsPerPage = {
|
||||
fifteen: '15',
|
||||
@@ -46,7 +49,6 @@ describe('Items per page set to 15 and adding of tasks', () => {
|
||||
};
|
||||
|
||||
beforeAll(async (done) => {
|
||||
let apps = new AppsActions();
|
||||
let users = new UsersActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -60,9 +62,9 @@ describe('Items per page set to 15 and adding of tasks', () => {
|
||||
|
||||
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 < nrOfTasks; i++) {
|
||||
for (i = 0; i < (nrOfTasks - 5); i++) {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
}
|
||||
|
||||
@@ -78,11 +80,17 @@ describe('Items per page set to 15 and adding of tasks', () => {
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue + ' of ' + nrOfTasks);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue + ' of ' + (nrOfTasks - 5));
|
||||
expect(taskPage.getAllDisplayedRows()).toBe(itemsPerPage.fifteenValue);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
for (i; i < nrOfTasks; i++) {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
}
|
||||
});
|
||||
|
||||
currentPage++;
|
||||
paginationPage.clickOnNextPage();
|
||||
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
|
||||
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
|
Reference in New Issue
Block a user