mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
@@ -15,22 +15,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil, createApiService, UsersActions } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil, createApiService, UsersActions, UserModel } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Amount Widget', () => {
|
||||
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.AMOUNT;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
|
||||
let appModel;
|
||||
let deployedAppId; let process;
|
||||
let processUserModel;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
let processUserModel: UserModel;
|
||||
|
||||
const apiService = createApiService();
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
@@ -49,7 +50,7 @@ describe('Amount Widget', () => {
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedAppId}/tasks/`;
|
||||
@@ -64,7 +65,7 @@ describe('Amount Widget', () => {
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C274703] Should be possible to set general, advance and visibility properties for Amount Widget', async () => {
|
||||
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.amount_input_id);
|
||||
@@ -78,12 +79,12 @@ describe('Amount Widget', () => {
|
||||
await expect(fieldCurrency.trim()).toBe('$');
|
||||
|
||||
await widget.amountWidget().setFieldValue(app.FIELD.amount_input_id, 4);
|
||||
await expect(await widget.amountWidget().getErrorMessage(app.FIELD.amount_input_id)).toBe('Can\'t be less than 5');
|
||||
await expect(await widget.amountWidget().getErrorMessage(app.FIELD.amount_input_id)).toBe(`Can't be less than 5`);
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonEnabled()).toEqual(false);
|
||||
await widget.amountWidget().clearFieldValue(app.FIELD.amount_input_id);
|
||||
|
||||
await widget.amountWidget().setFieldValue(app.FIELD.amount_input_id, 101);
|
||||
await expect(await widget.amountWidget().getErrorMessage(app.FIELD.amount_input_id)).toBe('Can\'t be greater than 100');
|
||||
await expect(await widget.amountWidget().getErrorMessage(app.FIELD.amount_input_id)).toBe(`Can't be greater than 100`);
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonEnabled()).toEqual(false);
|
||||
await widget.amountWidget().clearFieldValue(app.FIELD.amount_input_id);
|
||||
|
||||
|
@@ -15,14 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
FileBrowserUtil,
|
||||
LoginPage,
|
||||
UsersActions,
|
||||
ViewerPage,
|
||||
Widget
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, FileBrowserUtil, LoginPage, UsersActions, ViewerPage, Widget, UserModel } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { browser } from 'protractor';
|
||||
@@ -33,7 +26,6 @@ import { FiltersPage } from '../pages/filters.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
|
||||
describe('Attach widget - File', () => {
|
||||
|
||||
const app = browser.params.resources.Files.WIDGETS_SMOKE_TEST;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
@@ -49,9 +41,8 @@ describe('Attach widget - File', () => {
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
|
||||
let processUserModel;
|
||||
const pdfFile = new FileModel({name: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name});
|
||||
const appFields = app.form_fields;
|
||||
let processUserModel: UserModel;
|
||||
const pdfFile = new FileModel({ name: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name });
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -73,8 +64,8 @@ describe('Attach widget - File', () => {
|
||||
await newTask.selectForm(app.formName);
|
||||
await newTask.clickStartButton();
|
||||
|
||||
await widget.attachFileWidget().attachFile(appFields.attachFile_id, pdfFile.location);
|
||||
await widget.attachFileWidget().checkFileIsAttached(appFields.attachFile_id, pdfFile.name);
|
||||
await widget.attachFileWidget().attachFile(app.form_fields.attachFile_id, pdfFile.location);
|
||||
await widget.attachFileWidget().checkFileIsAttached(app.form_fields.attachFile_id, pdfFile.name);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -83,7 +74,7 @@ describe('Attach widget - File', () => {
|
||||
});
|
||||
|
||||
it('[C268067] Should be able to preview, download and remove attached files from an active form', async () => {
|
||||
await widget.attachFileWidget().toggleAttachedFileMenu(appFields.attachFile_id, pdfFile.name);
|
||||
await widget.attachFileWidget().toggleAttachedFileMenu(app.form_fields.attachFile_id, pdfFile.name);
|
||||
await widget.attachFileWidget().checkAttachFileOptionsActiveForm();
|
||||
|
||||
await widget.attachFileWidget().viewAttachedFile();
|
||||
@@ -91,11 +82,11 @@ describe('Attach widget - File', () => {
|
||||
await viewerPage.checkCloseButtonIsDisplayed();
|
||||
await viewerPage.clickCloseButton();
|
||||
|
||||
await widget.attachFileWidget().toggleAttachedFileMenu(appFields.attachFile_id, pdfFile.name);
|
||||
await widget.attachFileWidget().toggleAttachedFileMenu(app.form_fields.attachFile_id, pdfFile.name);
|
||||
await widget.attachFileWidget().downloadFile();
|
||||
await FileBrowserUtil.isFileDownloaded(pdfFile.name);
|
||||
|
||||
await widget.attachFileWidget().toggleAttachedFileMenu(appFields.attachFile_id, pdfFile.name);
|
||||
await widget.attachFileWidget().toggleAttachedFileMenu(app.form_fields.attachFile_id, pdfFile.name);
|
||||
await widget.attachFileWidget().removeAttachedFile();
|
||||
await widget.attachFileWidget().attachFileWidgetDisplayed();
|
||||
});
|
||||
@@ -107,9 +98,9 @@ describe('Attach widget - File', () => {
|
||||
await tasksListPage.checkTaskListIsLoaded();
|
||||
await filtersPage.goToFilter('Completed Tasks');
|
||||
await tasksListPage.checkTaskListIsLoaded();
|
||||
await widget.attachFileWidget().checkFileIsAttached(appFields.attachFile_id, pdfFile.name);
|
||||
await widget.attachFileWidget().checkFileIsAttached(app.form_fields.attachFile_id, pdfFile.name);
|
||||
|
||||
await widget.attachFileWidget().toggleAttachedFileMenu(appFields.attachFile_id, pdfFile.name);
|
||||
await widget.attachFileWidget().toggleAttachedFileMenu(app.form_fields.attachFile_id, pdfFile.name);
|
||||
await widget.attachFileWidget().checkAttachFileOptionsCompletedForm();
|
||||
|
||||
await widget.attachFileWidget().viewAttachedFile();
|
||||
@@ -117,7 +108,7 @@ describe('Attach widget - File', () => {
|
||||
await viewerPage.checkCloseButtonIsDisplayed();
|
||||
await viewerPage.clickCloseButton();
|
||||
|
||||
await widget.attachFileWidget().toggleAttachedFileMenu(appFields.attachFile_id, pdfFile.name);
|
||||
await widget.attachFileWidget().toggleAttachedFileMenu(app.form_fields.attachFile_id, pdfFile.name);
|
||||
await widget.attachFileWidget().downloadFile();
|
||||
await FileBrowserUtil.isFileDownloaded(pdfFile.name);
|
||||
});
|
||||
|
@@ -15,31 +15,24 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions, Widget, UserModel } from '@alfresco/adf-testing';
|
||||
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';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Attach Folder widget', () => {
|
||||
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.ATTACH_FOLDER;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
let appModel;
|
||||
let deployedAppId; let process;
|
||||
let processUserModel;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
let processUserModel: UserModel;
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -58,11 +51,10 @@ describe('Attach Folder widget', () => {
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
@@ -72,7 +64,7 @@ describe('Attach Folder widget', () => {
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C276745] Should be possible to set visibility properties for Attach Folder Widget', async () => {
|
||||
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.upload_button_id);
|
||||
|
@@ -15,29 +15,24 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions, Widget, UserModel } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Checkbox Widget', () => {
|
||||
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.CHECKBOX;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
|
||||
let processUserModel;
|
||||
let appModel;
|
||||
let deployedAppId; let process;
|
||||
let processUserModel: UserModel;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -56,10 +51,10 @@ describe('Checkbox Widget', () => {
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(`${deployedAppId}`);
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
@@ -68,7 +63,7 @@ describe('Checkbox Widget', () => {
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C268554] Should be able to set general settings for Checkbox widget ', async () => {
|
||||
await taskPage.formFields().setValueInInputById(app.FIELD.number_input_id, '2');
|
||||
|
@@ -15,18 +15,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
import {
|
||||
createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
Widget, UserModel
|
||||
} from '@alfresco/adf-testing';
|
||||
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';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Date and time widget', () => {
|
||||
|
||||
@@ -35,16 +36,16 @@ describe('Date and time widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let processUserModel;
|
||||
let appModel;
|
||||
let deployedAppId; let process;
|
||||
let processUserModel: UserModel;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -61,8 +62,7 @@ describe('Date and time widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(`${deployedAppId}`);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
|
@@ -15,22 +15,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
import {
|
||||
createApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
FormPage,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
Widget, UserModel
|
||||
} from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import { FormDemoPage } from '.././pages/form-demo.page';
|
||||
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';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Date widget', () => {
|
||||
|
||||
@@ -39,12 +40,12 @@ 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;
|
||||
let processUserModel;
|
||||
let deployedAppId; let process;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let processUserModel: UserModel;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -73,8 +74,7 @@ describe('Date widget', () => {
|
||||
|
||||
describe('Simple App', () => {
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(`${deployedAppId}`);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
@@ -113,13 +113,11 @@ describe('Date widget', () => {
|
||||
await formDemoPage.setConfigToEditor(formJson);
|
||||
await dateWidget.setDateInput('datefield', '18-7-19');
|
||||
await formPage.saveForm();
|
||||
await expect(await dateWidget.getErrorMessage('datefield'))
|
||||
.toBe('Can\'t be less than 19-7-19', 'Min date validation is not working');
|
||||
await expect(await dateWidget.getErrorMessage('datefield')).toBe('Can\'t be less than 19-7-19');
|
||||
await dateWidget.clearDateInput('datefield');
|
||||
await dateWidget.setDateInput('datefield', '20-7-19');
|
||||
await formPage.saveForm();
|
||||
await expect(await dateWidget.getErrorMessage('datefield'))
|
||||
.toBe('Can\'t be greater than 19-8-19', 'Max date validation is not working');
|
||||
await expect(await dateWidget.getErrorMessage('datefield')).toBe('Can\'t be greater than 19-8-19');
|
||||
await dateWidget.clearDateInput('datefield');
|
||||
await dateWidget.setDateInput('datefield', '19-7-19');
|
||||
await formPage.saveForm();
|
||||
|
@@ -15,54 +15,46 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions, Widget, UserModel } from '@alfresco/adf-testing';
|
||||
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';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Document Template widget', () => {
|
||||
|
||||
const app = browser.params.resources.Files.FILE_FORM_ADF;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedAppId; let process;
|
||||
let processUserModel;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
let processUserModel: UserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
processUserModel = await usersActions.createUser();
|
||||
processUserModel = await usersActions.createUser();
|
||||
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp( app.file_path);
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessOfApp(appModel.name);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
process = await processUtil.startProcessOfApp(appModel.name);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
@@ -72,10 +64,9 @@ describe('Document Template widget', () => {
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C260406] should check that the template contains assigned file ', async () => {
|
||||
await expect(await widget.containerWidget().getFieldText(app.form_fields.container_id))
|
||||
.toEqual(app.attached_file);
|
||||
await expect(await widget.containerWidget().getFieldText(app.form_fields.container_id)).toEqual(app.attached_file);
|
||||
});
|
||||
});
|
||||
|
@@ -15,18 +15,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
import {
|
||||
createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget, UserModel
|
||||
} from '@alfresco/adf-testing';
|
||||
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';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Dropdown widget', () => {
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DROPDOWN;
|
||||
@@ -34,34 +35,33 @@ describe('Dropdown widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedAppId; let process;
|
||||
let processUserModel;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let deployedAppId;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
let processUserModel: UserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
processUserModel = await usersActions.createUser();
|
||||
processUserModel = await usersActions.createUser();
|
||||
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
|
@@ -15,21 +15,22 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
import {
|
||||
createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
Widget, UserModel
|
||||
} from '@alfresco/adf-testing';
|
||||
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';
|
||||
import { ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Dynamic Table widget ', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
@@ -40,8 +41,9 @@ describe('Dynamic Table widget ', () => {
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let processUserModel;
|
||||
let deployedAppId; let process;
|
||||
let processUserModel: UserModel;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
|
||||
describe('with Date Time Widget App', () => {
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DYNAMIC_TABLE;
|
||||
@@ -60,8 +62,7 @@ describe('Dynamic Table widget ', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(`${deployedAppId}`);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
@@ -117,8 +118,7 @@ describe('Dynamic Table widget ', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(`${deployedAppId}`);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
@@ -173,8 +173,7 @@ describe('Dynamic Table widget ', () => {
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(`${deployedAppId}`);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
@@ -189,15 +188,15 @@ describe('Dynamic Table widget ', () => {
|
||||
|
||||
await widget.dynamicTable().setDatatableInput('name', app.CUSTOM_VALIDATOR.FIELD.NAME);
|
||||
await widget.dynamicTable().clickSaveButton();
|
||||
await expect(await widget.dynamicTable().checkErrorMessage()).toBe('Field \'Id\' is required.');
|
||||
await expect(await widget.dynamicTable().checkErrorMessage()).toBe(`Field 'Id' is required.`);
|
||||
|
||||
await widget.dynamicTable().setDatatableInput('id', app.CUSTOM_VALIDATOR.FIELD.ID);
|
||||
await widget.dynamicTable().clickSaveButton();
|
||||
await expect(await widget.dynamicTable().checkErrorMessage()).toBe('Field \'Number\' is required.');
|
||||
await expect(await widget.dynamicTable().checkErrorMessage()).toBe(`Field 'Number' is required.`);
|
||||
|
||||
await widget.dynamicTable().setDatatableInput('12', app.CUSTOM_VALIDATOR.FIELD.NUM);
|
||||
await widget.dynamicTable().clickSaveButton();
|
||||
await expect(await widget.dynamicTable().checkErrorMessage()).toBe('Field \'Address\' is required.');
|
||||
await expect(await widget.dynamicTable().checkErrorMessage()).toBe(`Field 'Address' is required.`);
|
||||
|
||||
await widget.dynamicTable().setDatatableInput('address', app.CUSTOM_VALIDATOR.FIELD.ADDRESS);
|
||||
await widget.dynamicTable().clickSaveButton();
|
||||
|
@@ -15,54 +15,46 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions, Widget, UserModel } from '@alfresco/adf-testing';
|
||||
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';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Header widget', async () => {
|
||||
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.HEADER;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedAppId; let process;
|
||||
let processUserModel;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
let processUserModel: UserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
processUserModel = await usersActions.createUser();
|
||||
processUserModel = await usersActions.createUser();
|
||||
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
@@ -72,7 +64,7 @@ describe('Header widget', async () => {
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C276737] Should be able to set general and visibility properties for Header widget', async () => {
|
||||
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.header_id);
|
||||
|
@@ -15,36 +15,29 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions, Widget, UserModel } from '@alfresco/adf-testing';
|
||||
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';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Hyperlink widget', () => {
|
||||
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.HYPERLINK;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let processUserModel;
|
||||
let deployedAppId; let process;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let processUserModel: UserModel;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -61,8 +54,7 @@ describe('Hyperlink widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
|
@@ -15,18 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions, Widget, UserModel } from '@alfresco/adf-testing';
|
||||
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';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Multi-line Widget', () => {
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.MULTILINE_TEXT;
|
||||
@@ -34,34 +28,33 @@ describe('Multi-line Widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let processUserModel;
|
||||
let deployedAppId; let process;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let processUserModel: UserModel;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
processUserModel = await usersActions.createUser();
|
||||
processUserModel = await usersActions.createUser();
|
||||
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
@@ -71,7 +64,7 @@ describe('Multi-line Widget', () => {
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C268182] Should be able to set general properties for Multi-line Text Widget', async () => {
|
||||
const label = await widget.multilineTextWidget().getFieldLabel(app.FIELD.multiSimple);
|
||||
|
@@ -15,36 +15,29 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions, Widget, UserModel } from '@alfresco/adf-testing';
|
||||
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';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Number widget', () => {
|
||||
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.NUMBER;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedAppId; let process;
|
||||
let processUserModel;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
let processUserModel: UserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -58,11 +51,10 @@ describe('Number widget', () => {
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
@@ -72,7 +64,7 @@ describe('Number widget', () => {
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C269111] Should be able to set general properties for Number Widget', async () => {
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonEnabled()).toEqual(false);
|
||||
@@ -91,12 +83,12 @@ describe('Number widget', () => {
|
||||
await taskPage.formFields().checkWidgetIsVisible(app.FIELD.number_visible);
|
||||
|
||||
await widget.numberWidget().setFieldValue(app.FIELD.number_visible, 2);
|
||||
await expect(await widget.numberWidget().getErrorMessage(app.FIELD.number_visible)).toBe('Can\'t be less than 3');
|
||||
await expect(await widget.numberWidget().getErrorMessage(app.FIELD.number_visible)).toBe(`Can't be less than 3`);
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonEnabled()).toEqual(false);
|
||||
await widget.numberWidget().clearFieldValue(app.FIELD.number_visible);
|
||||
|
||||
await widget.numberWidget().setFieldValue(app.FIELD.number_visible, 101);
|
||||
await expect(await widget.numberWidget().getErrorMessage(app.FIELD.number_visible)).toBe('Can\'t be greater than 100');
|
||||
await expect(await widget.numberWidget().getErrorMessage(app.FIELD.number_visible)).toBe(`Can't be greater than 100`);
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonEnabled()).toEqual(false);
|
||||
await widget.numberWidget().clearFieldValue(app.FIELD.number_visible);
|
||||
|
||||
|
@@ -26,7 +26,6 @@ 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,7 +34,6 @@ describe('People widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +59,7 @@ describe('People widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
|
@@ -15,53 +15,45 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions, Widget, UserModel } from '@alfresco/adf-testing';
|
||||
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';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Radio Buttons Widget', () => {
|
||||
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.RADIO_BUTTONS;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let appId; let process;
|
||||
let processUserModel;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let appId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
let processUserModel: UserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
processUserModel = await usersActions.createUser();
|
||||
processUserModel = await usersActions.createUser();
|
||||
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
appId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
appId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(appId);
|
||||
await new ProcessServicesPage().goToAppByAppId(appId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
@@ -71,7 +63,7 @@ describe('Radio Buttons Widget', () => {
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C277316] Should display empty radio buttons when no preselection is configured', async () => {
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
|
@@ -15,54 +15,46 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions, Widget, UserModel } from '@alfresco/adf-testing';
|
||||
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';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('Text widget', () => {
|
||||
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.TEXT;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedAppId; let process;
|
||||
let processUserModel;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
let processUserModel: UserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
processUserModel = await usersActions.createUser();
|
||||
processUserModel = await usersActions.createUser();
|
||||
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
@@ -72,7 +64,7 @@ describe('Text widget', () => {
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C268157] Should be able to set general properties for Text widget', async () => {
|
||||
const label = await widget.textWidget().getFieldLabel(app.FIELD.simpleText);
|
||||
|
@@ -15,18 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
Widget
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, ProcessUtil, UsersActions, Widget, UserModel } from '@alfresco/adf-testing';
|
||||
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';
|
||||
import { AppDefinitionRepresentation, ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
|
||||
const widgets = {
|
||||
textOneId: 'text1',
|
||||
@@ -51,40 +45,38 @@ const checkbox = {
|
||||
};
|
||||
|
||||
describe('Process-Services - Visibility conditions', () => {
|
||||
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.VISIBILITY;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedAppId; let process;
|
||||
let processUserModel;
|
||||
let appModel: AppDefinitionRepresentation;
|
||||
let deployedAppId: number;
|
||||
let process: ProcessInstanceRepresentation;
|
||||
let processUserModel: UserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
processUserModel = await usersActions.createUser();
|
||||
processUserModel = await usersActions.createUser();
|
||||
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await new ProcessServicesPage().goToAppByAppId(deployedAppId);
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
Reference in New Issue
Block a user