mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4329][ASD-5330] plus Improve e2e (#6580)
Improve e2e Fix SSO user avatar Fix Priority for APS1
This commit is contained in:
@@ -144,25 +144,7 @@ describe('Attach File - Content service', () => {
|
||||
await widget.attachFileWidget().clickUploadButton(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id);
|
||||
});
|
||||
|
||||
it('[C299040] Should display the login screen right, when user has access to 2 alfresco repositiories', async () => {
|
||||
const name = 'Attach file';
|
||||
await taskPage.createTask({ name, formName: app.UPLOAD_FILE_FORM_CS.formName });
|
||||
|
||||
await widget.attachFileWidget().clickUploadButton(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id);
|
||||
await widget.attachFileWidget().selectUploadSource(csIntegrations[1]);
|
||||
|
||||
await externalNodeSelector.waitForLogInDialog();
|
||||
await expect(await externalNodeSelector.getTitle()).toEqual(`Sign into '${browser.params.testConfig.adf_external_acs.host}'`);
|
||||
await externalNodeSelector.login(user.username, user.password);
|
||||
|
||||
await externalNodeSelector.checkDialogIsDisplayed();
|
||||
await searchService.isSearchable(externalFile);
|
||||
await externalNodeSelector.searchAndSelectResult(externalFile, externalFile);
|
||||
await externalNodeSelector.clickMoveCopyButton();
|
||||
await widget.attachFileWidget().checkFileIsAttached(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id, externalFile);
|
||||
});
|
||||
|
||||
it('[C286516] Able to upload a file when user has more than two alfresco repositories', async () => {
|
||||
it('[C286516][C299040] Able to upload a file when user has more than two alfresco repositories', async () => {
|
||||
const name = 'Attach file - multiple repo';
|
||||
await taskPage.createTask({ name, formName: app.UPLOAD_FILE_FORM_CS.formName });
|
||||
|
||||
|
@@ -37,7 +37,7 @@ describe('Comment component for Processes', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let user, appId, secondUser, newTaskId;
|
||||
let user, appId, secondUser;
|
||||
|
||||
const taskName = {
|
||||
completed_task: 'Test Completed',
|
||||
@@ -82,15 +82,13 @@ describe('Comment component for Processes', () => {
|
||||
it('[C212864] Should be able to add multiple comments on a single task using different users', async () => {
|
||||
const newTask = await apiService.getInstance().activiti.taskApi.createNewTask(new TaskRepresentation({ name: taskName.multiple_users }));
|
||||
|
||||
newTaskId = newTask.id;
|
||||
|
||||
await apiService.getInstance().activiti.taskApi.involveUser(newTaskId, { email: secondUser.email });
|
||||
await apiService.getInstance().activiti.taskApi.involveUser(newTask.id, { email: secondUser.email });
|
||||
|
||||
const taskComment = { message: 'Task Comment' };
|
||||
const secondTaskComment = { message: 'Second Task Comment' };
|
||||
|
||||
await apiService.getInstance().activiti.taskApi.addTaskComment(taskComment, newTaskId);
|
||||
await apiService.getInstance().activiti.taskApi.addTaskComment(secondTaskComment, newTaskId);
|
||||
await apiService.getInstance().activiti.taskApi.addTaskComment(taskComment, newTask.id);
|
||||
await apiService.getInstance().activiti.taskApi.addTaskComment(secondTaskComment, newTask.id);
|
||||
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton();
|
||||
|
||||
@@ -98,7 +96,7 @@ describe('Comment component for Processes', () => {
|
||||
await taskPage.tasksListPage().selectRow(taskName.multiple_users);
|
||||
await taskPage.taskDetails().selectActivityTab();
|
||||
|
||||
const totalCommentsLatest = await apiService.getInstance().activiti.taskApi.getTaskComments(newTaskId, { 'latestFirst': true });
|
||||
const totalCommentsLatest = await apiService.getInstance().activiti.taskApi.getTaskComments(newTask.id, { 'latestFirst': true });
|
||||
|
||||
const thirdTaskComment = { message: 'Third Task Comment' };
|
||||
|
||||
@@ -119,7 +117,7 @@ describe('Comment component for Processes', () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(secondUser.username, secondUser.password);
|
||||
|
||||
await apiService.getInstance().activiti.taskApi.addTaskComment(thirdTaskComment, newTaskId);
|
||||
await apiService.getInstance().activiti.taskApi.addTaskComment(thirdTaskComment, newTask.id);
|
||||
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton();
|
||||
|
||||
@@ -127,7 +125,7 @@ describe('Comment component for Processes', () => {
|
||||
await taskPage.tasksListPage().selectRow(taskName.multiple_users);
|
||||
await taskPage.taskDetails().selectActivityTab();
|
||||
|
||||
const totalComments = await apiService.getInstance().activiti.taskApi.getTaskComments(newTaskId, { 'latestFirst': true });
|
||||
const totalComments = await apiService.getInstance().activiti.taskApi.getTaskComments(newTask.id, { 'latestFirst': true });
|
||||
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
|
@@ -62,14 +62,15 @@ describe('Sorting for process filters', () => {
|
||||
appId = importedApp.id;
|
||||
|
||||
await loginPage.login(user.username, user.password);
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await apiService.getInstance().activiti.modelsApi.deleteModel(appId);
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(tenantId);
|
||||
try {
|
||||
await apiService.getInstance().activiti.modelsApi.deleteModel(appId);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(tenantId);
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
@@ -80,9 +81,9 @@ describe('Sorting for process filters', () => {
|
||||
'filter': { 'sort': 'created-asc', 'name': '', 'state': 'running' }
|
||||
});
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
const firstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const secondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const thirdProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const firstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const secondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const thirdProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||
|
||||
@@ -103,9 +104,9 @@ describe('Sorting for process filters', () => {
|
||||
});
|
||||
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
const firstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const secondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const thirdProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const firstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const secondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const thirdProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
|
||||
await apiService.getInstance().activiti.processInstancesApi.deleteProcessInstance(firstProc.id);
|
||||
await apiService.getInstance().activiti.processInstancesApi.deleteProcessInstance(secondProc.id);
|
||||
@@ -132,9 +133,9 @@ describe('Sorting for process filters', () => {
|
||||
});
|
||||
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
const firstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const secondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const thirdProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const firstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const secondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const thirdProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
|
||||
const deleteFirstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const deleteSecondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
|
@@ -139,7 +139,7 @@ describe('Info Drawer', () => {
|
||||
await expect(await taskPage.taskDetails().getPriority()).toEqual('40');
|
||||
await taskPage.taskDetails().updatePriority();
|
||||
await taskPage.taskDetails().checkTaskDetailsDisplayed();
|
||||
await expect(await taskPage.taskDetails().getPriority()).toEqual('0');
|
||||
await expect(await taskPage.taskDetails().getPriority()).toEqual('');
|
||||
|
||||
await taskPage.taskDetails().clickCompleteFormTask();
|
||||
});
|
||||
|
@@ -17,8 +17,9 @@
|
||||
|
||||
import { ProcessServiceTabBarPage } from './process-service-tab-bar.page';
|
||||
|
||||
import { Locator, element, by } from 'protractor';
|
||||
import { Locator, element, by, browser } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from './tasks.page';
|
||||
|
||||
export class ProcessServicesPage {
|
||||
|
||||
@@ -34,6 +35,8 @@ export class ProcessServicesPage {
|
||||
async goToApp(applicationName: string): Promise<ProcessServiceTabBarPage> {
|
||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
await BrowserActions.click(app);
|
||||
const taskPage = new TasksPage();
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
return new ProcessServiceTabBarPage();
|
||||
}
|
||||
|
||||
@@ -42,6 +45,13 @@ export class ProcessServicesPage {
|
||||
return new ProcessServiceTabBarPage();
|
||||
}
|
||||
|
||||
async goToAppByAppId(appId: string): Promise<void> {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${appId}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
const taskPage = new TasksPage();
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
}
|
||||
|
||||
async getAppIconType(applicationName: string): Promise<string> {
|
||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(app);
|
||||
|
@@ -220,7 +220,7 @@ export class TaskDetailsPage {
|
||||
async updatePriority(priority?: string): Promise<void> {
|
||||
await BrowserActions.click(this.priority);
|
||||
await BrowserActions.clearWithBackSpace(this.priority);
|
||||
await BrowserActions.clearSendKeys(element(by.css('input[data-automation-id="card-textitem-value-priority"]')), priority ? priority : ' ', 500);
|
||||
await BrowserActions.clearSendKeys(element(by.css('input[data-automation-id="card-textitem-value-priority"]')), priority, 500);
|
||||
await this.priority.sendKeys(Key.TAB);
|
||||
await browser.sleep(1000);
|
||||
}
|
||||
|
@@ -57,6 +57,7 @@ describe('Start Task - Task App', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await browser.refresh();
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
});
|
||||
@@ -108,6 +109,7 @@ describe('Start Task - Task App', () => {
|
||||
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.taskDetails().checkCompleteFormButtonIsDisplayed();
|
||||
|
||||
await taskPage.taskDetails().waitFormNameEqual(app.formName);
|
||||
});
|
||||
|
||||
|
@@ -98,6 +98,7 @@ describe('Start Process Component', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiServiceUserTwo.getInstance().activiti.modelsApi.deleteModel(appCreated.id);
|
||||
await apiServiceUserTwo.getInstance().activiti.modelsApi.deleteModel(simpleAppCreated.id);
|
||||
await apiServiceUserTwo.getInstance().activiti.modelsApi.deleteModel(dateFormAppCreated.id);
|
||||
|
@@ -36,6 +36,7 @@ import { TaskRepresentation } from '@alfresco/js-api';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
|
||||
describe('Task Details - Form', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const tasksListPage = new TasksListPage();
|
||||
const taskDetailsPage = new TaskDetailsPage();
|
||||
@@ -187,6 +188,7 @@ describe('Task Details - Form', () => {
|
||||
const form = await formActions.getFormByName(app.visibilityProcess.formName);
|
||||
await apiService.getInstance().activiti.taskApi.attachForm(newTask.id, { 'formId': form.id });
|
||||
|
||||
await browser.refresh();
|
||||
await (await new NavigationBarPage().navigateToProcessServicesPage()).goToTaskApp();
|
||||
await tasksListPage.checkTaskListIsLoaded();
|
||||
await filtersPage.goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
|
||||
|
@@ -56,6 +56,8 @@ describe('Amount Widget', () => {
|
||||
beforeEach(async() => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Attach Folder widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Attach Folder widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
@@ -62,8 +64,9 @@ describe('Attach Folder widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,7 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
|
||||
describe('Checkbox Widget', () => {
|
||||
|
||||
@@ -61,8 +61,7 @@ describe('Checkbox Widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Date and time widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Date and time widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('Date and time widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -30,6 +30,8 @@ import { browser } from 'protractor';
|
||||
import { FormDemoPage } from '.././pages/form-demo.page';
|
||||
import { customDateFormAPS1 } from '../../resources/forms/custom-date-form';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Date widget', () => {
|
||||
|
||||
@@ -38,6 +40,7 @@ describe('Date widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const dateWidget = widget.dateWidget();
|
||||
let appModel;
|
||||
@@ -72,8 +75,9 @@ describe('Date widget', () => {
|
||||
|
||||
describe('Simple App', () => {
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Document Template widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Document Template widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('Document Template widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Dropdown widget', () => {
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DROPDOWN;
|
||||
@@ -34,6 +35,7 @@ describe('Dropdown widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -60,8 +62,9 @@ describe('Dropdown widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -28,6 +27,7 @@ import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
|
||||
describe('Dynamic Table widget ', () => {
|
||||
|
||||
@@ -62,8 +62,9 @@ describe('Dynamic Table widget ', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
@@ -118,8 +119,9 @@ describe('Dynamic Table widget ', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
@@ -172,8 +174,10 @@ describe('Dynamic Table widget ', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Header widget', async () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Header widget', async () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('Header widget', async () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Hyperlink widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Hyperlink widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('Hyperlink widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Multi-line Widget', () => {
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.MULTILINE_TEXT;
|
||||
@@ -34,6 +35,7 @@ describe('Multi-line Widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -60,8 +62,9 @@ describe('Multi-line Widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Number widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Number widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('Number widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('People widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('People widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('People widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
|
||||
describe('Radio Buttons Widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Radio Buttons Widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -62,8 +64,9 @@ describe('Radio Buttons Widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Text widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Text widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('Text widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
@@ -84,12 +87,15 @@ describe('Text widget', () => {
|
||||
});
|
||||
|
||||
it('[C268170] Min-max length properties', async () => {
|
||||
await widget.textWidget().setValue(app.FIELD.simpleText, 'TEST');
|
||||
await widget.textWidget().setValue(app.FIELD.textMinMax, 'A');
|
||||
await expect(await widget.textWidget().getErrorMessage(app.FIELD.textMinMax)).toContain('Enter at least 4 characters');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonEnabled()).toEqual(false);
|
||||
await widget.textWidget().setValue(app.FIELD.textMinMax, 'AAAAAAAAAAA');
|
||||
await widget.textWidget().setValue(app.FIELD.textMinMax, '01234567890');
|
||||
await expect(await widget.textWidget().getErrorMessage(app.FIELD.textMinMax)).toContain('Enter no more than 10 characters');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonEnabled()).toEqual(false);
|
||||
await widget.textWidget().setValue(app.FIELD.textMinMax, '123456789');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonEnabled()).toEqual(true);
|
||||
});
|
||||
|
||||
it('[C268171] Input mask reversed checkbox properties', async () => {
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { browser } from 'protractor';
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
|
||||
const widgets = {
|
||||
textOneId: 'text1',
|
||||
@@ -57,6 +58,7 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -83,8 +85,8 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
@@ -113,17 +115,6 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxVariableField);
|
||||
});
|
||||
|
||||
it('[C309649] Should be able to see Checkbox widget when visibility condition refers to a field and a form variable', async () => {
|
||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldVariable);
|
||||
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.displayFieldVariableCheckbox);
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldVariable);
|
||||
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.notDisplayCheckbox);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldVariable);
|
||||
});
|
||||
|
||||
it('[C311425] Should be able to see Checkbox widget when visibility condition refers to a field and another field', async () => {
|
||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldField);
|
||||
@@ -135,6 +126,17 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldField);
|
||||
});
|
||||
|
||||
it('[C309649] Should be able to see Checkbox widget when visibility condition refers to a field and a form variable', async () => {
|
||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldVariable);
|
||||
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.displayFieldVariableCheckbox);
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldVariable);
|
||||
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.notDisplayCheckbox);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldVariable);
|
||||
});
|
||||
|
||||
it('[C311424] Should be able to see Checkbox widget when visibility condition refers to a variable with specific value', async () => {
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxVariableValue);
|
||||
});
|
||||
|
Reference in New Issue
Block a user