mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Disable control flow e2e ADF (#4954)
* update project script possible different JS-API * first commit no controll flow * second commit no controll flow * third commit no controll flow * 4 commit no controll flow * 5 commit no controll flow * 6 commit no controll flow * 7 commit no controll flow * 8 commit no controll flow * 9 commit no controll flow * 10 commit no controll flow * 11 commit no controll flow * 12 commit no controll flow * 13 commit no controll flow * 14 commit no controll flow * 15 commit no controll flow * 16 commit no controll flow * 17 commit no controll flow * 18 commit no controll flow * 19 commit no controll flow * 20 commit no controll flow * remove wdpromise, protractor promise and deferred promises * - fixed some incorrect “expect” calls - fixed some matchers - removed “return this;” when not needed - added a few more await-s * forgot a file * fix some failing tests * replaced driver calls with browser calls and enabled back waitForAngular * fix rightClick methods and hopefully some tests * fix settings-component * some more fixes for core and content tests * try to fix some more issues * linting * revert some changes, allowing download on headless chrome won’t work with multiple browser instances * fixes for Search tests * try to remove some wait calls * fix build * increase allScriptsTimeout and try another protractor and web driver version * improve navigation methods * some fixes for notification history and login sso * forgot a space * fix packages and enable some screenshots * navigation bar fixes * fix some test * some fixes for notification history and navigation bar use correct visibility method in attachFileWidget test * fix searching and another fix for navigation * try solve sso login * some more fixes * refactor async forEach into for..of * try fix for search tests * resolve rebabse problems * remove install * fix lint * fix core e2e * fix core e2e * fix core e2e * fix ps tests * fix some tests * fix core e2e * fix core e2e * fix core * fix some issues PS * fix core * fix core * fix some ps test * fix rebase issues * remove save * fix url regressed after rebase * fix url regressed after rebase * fix ps and core * fix lint * more parallel e2e ps * fix some ps cloud test * some cloud fix * fix lint * fix some test * remove files to be ignored * out-tsc * improve one cs test * fix candidate base app * fix ps test * remove click function * clean methods alrady present in browser action * try ugly wait * move wait * remove duplicate call * remove underscore * fix after review * fix imports * minor cosmetic fixes * fix comments test
This commit is contained in:
@@ -38,7 +38,7 @@ describe('Amount Widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.AMOUNT;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -59,44 +59,44 @@ describe('Amount Widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
beforeEach(async() => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C274703] Should be possible to set general, advance and visibility properties for Amount Widget', () => {
|
||||
taskPage.formFields().checkWidgetIsHidden(app.FIELD.amount_input_id);
|
||||
widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
taskPage.formFields().checkWidgetIsVisible(app.FIELD.amount_input_id);
|
||||
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);
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
await taskPage.formFields().checkWidgetIsVisible(app.FIELD.amount_input_id);
|
||||
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
expect(widget.amountWidget().getAmountFieldLabel(app.FIELD.amount_input_id)).toContain('Amount');
|
||||
expect(widget.amountWidget().getPlaceholder(app.FIELD.amount_input_id)).toContain('Type amount');
|
||||
expect(widget.amountWidget().getAmountFieldCurrency(app.FIELD.amount_input_id)).toBe('$');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await expect(await widget.amountWidget().getAmountFieldLabel(app.FIELD.amount_input_id)).toContain('Amount');
|
||||
await expect(await widget.amountWidget().getPlaceholder(app.FIELD.amount_input_id)).toContain('Type amount');
|
||||
await expect(await widget.amountWidget().getAmountFieldCurrency(app.FIELD.amount_input_id)).toBe('$');
|
||||
|
||||
widget.amountWidget().setFieldValue(app.FIELD.amount_input_id, 4);
|
||||
expect(widget.amountWidget().getErrorMessage(app.FIELD.amount_input_id)).toBe('Can\'t be less than 5');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
widget.amountWidget().clearFieldValue(app.FIELD.amount_input_id);
|
||||
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 taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await widget.amountWidget().clearFieldValue(app.FIELD.amount_input_id);
|
||||
|
||||
widget.amountWidget().setFieldValue(app.FIELD.amount_input_id, 101);
|
||||
expect(widget.amountWidget().getErrorMessage(app.FIELD.amount_input_id)).toBe('Can\'t be greater than 100');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
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 taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await widget.amountWidget().clearFieldValue(app.FIELD.amount_input_id);
|
||||
|
||||
widget.amountWidget().setFieldValue(app.FIELD.amount_input_id, 6);
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
await widget.amountWidget().setFieldValue(app.FIELD.amount_input_id, 6);
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
@@ -35,7 +35,7 @@ describe('Attach Folder widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.ATTACH_FOLDER;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -56,28 +56,28 @@ describe('Attach Folder widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C276745] Should be possible to set visibility properties for Attach Folder Widget', () => {
|
||||
taskPage.formFields().checkWidgetIsHidden(app.FIELD.upload_button_id);
|
||||
widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
taskPage.formFields().checkWidgetIsVisible(app.FIELD.upload_button_id);
|
||||
it('[C276745] Should be possible to set visibility properties for Attach Folder Widget', async () => {
|
||||
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.upload_button_id);
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
await taskPage.formFields().checkWidgetIsVisible(app.FIELD.upload_button_id);
|
||||
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
@@ -36,7 +36,7 @@ describe('Checkbox Widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.CHECKBOX;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -57,34 +57,34 @@ describe('Checkbox Widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C268554] Should be able to set general settings for Checkbox widget ', () => {
|
||||
taskPage.formFields().setValueInInputById(app.FIELD.number_input_id, 2);
|
||||
expect(widget.checkboxWidget().getCheckboxLabel()).toContain(app.FIELD.checkbox_label);
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_input_id);
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
it('[C268554] Should be able to set general settings for Checkbox widget ', async () => {
|
||||
await taskPage.formFields().setValueInInputById(app.FIELD.number_input_id, 2);
|
||||
await expect(await widget.checkboxWidget().getCheckboxLabel()).toContain(app.FIELD.checkbox_label);
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_input_id);
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
});
|
||||
|
||||
it('[C272812] Should be able to set visibility settings for Checkbox widget', () => {
|
||||
widget.checkboxWidget().isCheckboxHidden(app.FIELD.checkbox_field_id);
|
||||
taskPage.formFields().setValueInInputById(app.FIELD.number_input_id, 2);
|
||||
widget.checkboxWidget().isCheckboxDisplayed(app.FIELD.checkbox_field_id);
|
||||
it('[C272812] Should be able to set visibility settings for Checkbox widget', async () => {
|
||||
await widget.checkboxWidget().isCheckboxHidden(app.FIELD.checkbox_field_id);
|
||||
await taskPage.formFields().setValueInInputById(app.FIELD.number_input_id, 2);
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(app.FIELD.checkbox_field_id);
|
||||
});
|
||||
});
|
||||
|
@@ -36,7 +36,7 @@ describe('Date and time widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.DATETIME;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -57,48 +57,54 @@ describe('Date and time widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C268818] Should be able to set general settings for Date Time widget', () => {
|
||||
expect(widget.dateTimeWidget().getDateTimeLabel(app.FIELD.date_time_input)).toContain('Date');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
it('[C268818] Should be able to set general settings for Date Time widget', async () => {
|
||||
await expect(await widget.dateTimeWidget().getDateTimeLabel(app.FIELD.date_time_input)).toContain('Date');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
|
||||
widget.dateTimeWidget().openDatepicker(app.FIELD.date_time_input);
|
||||
widget.dateTimeWidget().selectDay('10');
|
||||
widget.dateTimeWidget().selectHour('8');
|
||||
widget.dateTimeWidget().selectMinute('30');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
await widget.dateTimeWidget().openDatepicker(app.FIELD.date_time_input);
|
||||
await widget.dateTimeWidget().selectDay('10');
|
||||
await widget.dateTimeWidget().selectHour('8');
|
||||
await widget.dateTimeWidget().selectMinute('30');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
|
||||
expect(widget.dateTimeWidget().getPlaceholder(app.FIELD.date_time_between_input)).toBe('Choose anything...');
|
||||
await expect(await widget.dateTimeWidget().getPlaceholder(app.FIELD.date_time_between_input)).toBe('Choose anything...');
|
||||
});
|
||||
|
||||
it('[C268819] Should be able to set advanced settings for Date Time widget ', () => {
|
||||
widget.dateTimeWidget().openDatepicker(app.FIELD.date_time_between_input);
|
||||
widget.dateTimeWidget().closeDataTimeWidget();
|
||||
widget.dateTimeWidget().setDateTimeInput(app.FIELD.date_time_between_input, '20-03-17 07:30 PM');
|
||||
taskPage.formFields().saveForm();
|
||||
expect(widget.dateTimeWidget().getErrorMessage(app.FIELD.date_time_between_input)).toContain('Can\'t be less than');
|
||||
it('[C268819] Should be able to set advanced settings for Date Time widget ', async () => {
|
||||
await widget.dateTimeWidget().openDatepicker(app.FIELD.date_time_between_input);
|
||||
await widget.dateTimeWidget().closeDataTimeWidget();
|
||||
|
||||
widget.dateTimeWidget().openDatepicker(app.FIELD.date_time_between_input);
|
||||
widget.dateTimeWidget().closeDataTimeWidget();
|
||||
widget.dateTimeWidget().removeFromDatetimeWidget(app.FIELD.date_time_between_input);
|
||||
widget.dateTimeWidget().setDateTimeInput(app.FIELD.date_time_between_input, '20-03-19 07:30 PM');
|
||||
taskPage.formFields().saveForm();
|
||||
expect(widget.dateTimeWidget().getErrorMessage(app.FIELD.date_time_between_input)).toContain('Can\'t be greater than');
|
||||
await widget.dateTimeWidget().setDateTimeInput(app.FIELD.date_time_between_input, '20-03-17 07:30 PM');
|
||||
await taskPage.formFields().saveForm();
|
||||
await expect(await widget.dateTimeWidget().getErrorMessage(app.FIELD.date_time_between_input)).toContain('Can\'t be less than');
|
||||
|
||||
await widget.dateTimeWidget().openDatepicker(app.FIELD.date_time_between_input);
|
||||
await widget.dateTimeWidget().closeDataTimeWidget();
|
||||
await widget.dateTimeWidget().removeFromDatetimeWidget(app.FIELD.date_time_between_input);
|
||||
|
||||
await browser.refresh();
|
||||
|
||||
await widget.dateTimeWidget().setDateTimeInput(app.FIELD.date_time_between_input, '20-03-19 07:30 PM');
|
||||
await widget.dateTimeWidget().closeDataTimeWidget();
|
||||
|
||||
await taskPage.formFields().saveForm();
|
||||
|
||||
await expect(await widget.dateTimeWidget().getErrorMessage(app.FIELD.date_time_between_input)).toContain('Can\'t be greater than');
|
||||
});
|
||||
});
|
||||
|
@@ -36,7 +36,7 @@ describe('Date widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.DATE;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -57,38 +57,38 @@ describe('Date widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C268814] Should be able to set general settings for Date widget', () => {
|
||||
expect(widget.dateWidget().getDateLabel(app.FIELD.date_input)).toContain('Date');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
widget.dateWidget().setDateInput(app.FIELD.date_input, '20-10-2018');
|
||||
taskPage.formFields().saveForm();
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
it('[C268814] Should be able to set general settings for Date widget', async () => {
|
||||
await expect(await widget.dateWidget().getDateLabel(app.FIELD.date_input)).toContain('Date');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await widget.dateWidget().setDateInput(app.FIELD.date_input, '20-10-2018');
|
||||
await taskPage.formFields().saveForm();
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
});
|
||||
|
||||
it('[C277234] Should be able to set advanced settings for Date widget ', () => {
|
||||
widget.dateWidget().setDateInput(app.FIELD.date_between_input, '20-10-2017');
|
||||
taskPage.formFields().saveForm();
|
||||
expect(widget.dateWidget().getErrorMessage(app.FIELD.date_between_input)).toBe('Can\'t be less than 1-10-2018');
|
||||
widget.dateWidget().clearDateInput(app.FIELD.date_between_input);
|
||||
widget.dateWidget().setDateInput(app.FIELD.date_between_input, '20-10-2019');
|
||||
taskPage.formFields().saveForm();
|
||||
expect(widget.dateWidget().getErrorMessage(app.FIELD.date_between_input)).toBe('Can\'t be greater than 31-10-2018');
|
||||
it('[C277234] Should be able to set advanced settings for Date widget ', async () => {
|
||||
await widget.dateWidget().setDateInput(app.FIELD.date_between_input, '20-10-2017');
|
||||
await taskPage.formFields().saveForm();
|
||||
await expect(await widget.dateWidget().getErrorMessage(app.FIELD.date_between_input)).toBe('Can\'t be less than 1-10-2018');
|
||||
await widget.dateWidget().clearDateInput(app.FIELD.date_between_input);
|
||||
await widget.dateWidget().setDateInput(app.FIELD.date_between_input, '20-10-2019');
|
||||
await taskPage.formFields().saveForm();
|
||||
await expect(await widget.dateWidget().getErrorMessage(app.FIELD.date_between_input)).toBe('Can\'t be greater than 31-10-2018');
|
||||
});
|
||||
});
|
||||
|
@@ -36,7 +36,7 @@ describe('Document Template widget', () => {
|
||||
const app = resources.Files.FILE_FORM_ADF;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -57,25 +57,25 @@ describe('Document Template widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C260406] should check that the template contains assigned file ', () => {
|
||||
expect(widget.containerWidget().getFieldText(app.form_fields.container_id))
|
||||
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);
|
||||
});
|
||||
});
|
||||
|
@@ -36,7 +36,7 @@ describe('Dropdown widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.DROPDOWN;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -57,42 +57,41 @@ describe('Dropdown widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C269051] Should be possible to set general and options properties for Dropdown widget ', () => {
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
it('[C269051] Should be possible to set general and options properties for Dropdown widget ', async () => {
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
|
||||
widget.dropdown().selectOption('Happy');
|
||||
expect(widget.dropdown().getSelectedOptionText(app.FIELD.general_dropdown)).toContain('Happy');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
await widget.dropdown().selectOption('Happy');
|
||||
await expect(await widget.dropdown().getSelectedOptionText(app.FIELD.general_dropdown)).toContain('Happy');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
|
||||
widget.dropdown().selectOption('Choose one');
|
||||
expect(widget.dropdown().getSelectedOptionText(app.FIELD.general_dropdown)).toContain('Choose one');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await widget.dropdown().selectOption('Choose one');
|
||||
await expect(await widget.dropdown().getSelectedOptionText(app.FIELD.general_dropdown)).toContain('Choose one');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
|
||||
widget.dropdown().selectOption('Sad');
|
||||
expect(widget.dropdown().getSelectedOptionText(app.FIELD.general_dropdown)).toContain('Sad');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
await widget.dropdown().selectOption('Sad');
|
||||
await expect(await widget.dropdown().getSelectedOptionText(app.FIELD.general_dropdown)).toContain('Sad');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
});
|
||||
|
||||
it('[C269052] Should be possible to set visibility properties for Dropdown widget', () => {
|
||||
taskPage.formFields().checkWidgetIsHidden(app.FIELD.dropdown_visible);
|
||||
widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
taskPage.formFields().checkWidgetIsVisible(app.FIELD.dropdown_visible);
|
||||
it('[C269052] Should be possible to set visibility properties for Dropdown widget', async () => {
|
||||
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.dropdown_visible);
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
await taskPage.formFields().checkWidgetIsVisible(app.FIELD.dropdown_visible);
|
||||
});
|
||||
});
|
||||
|
@@ -38,7 +38,7 @@ describe('Dynamic Table widget ', () => {
|
||||
describe('with Date Time Widget App', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.DYNAMIC_TABLE;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -59,39 +59,39 @@ describe('Dynamic Table widget ', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C276729] Should be possible to set visibility properties for Dynamic Table', () => {
|
||||
taskPage.formFields().checkWidgetIsHidden(app.FIELD.dynamic_table_age_id);
|
||||
widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
taskPage.formFields().checkWidgetIsVisible(app.FIELD.dynamic_table_age_id);
|
||||
it('[C276729] Should be possible to set visibility properties for Dynamic Table', async () => {
|
||||
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.dynamic_table_age_id);
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
await taskPage.formFields().checkWidgetIsVisible(app.FIELD.dynamic_table_age_id);
|
||||
});
|
||||
|
||||
it('[C279349] Should be able to have a Date Time widget in a Dynamic Table widget', () => {
|
||||
widget.dynamicTable().clickAddButton();
|
||||
widget.dateTimeWidget().openDatepicker(app.FIELD.dateTime_input_id);
|
||||
widget.dateTimeWidget().selectDay('10');
|
||||
widget.dateTimeWidget().selectHour('8');
|
||||
widget.dateTimeWidget().selectMinute('30');
|
||||
widget.dateTimeWidget().clearDateTimeInput(app.FIELD.dateTime_input_id);
|
||||
it('[C279349] Should be able to have a Date Time widget in a Dynamic Table widget', async () => {
|
||||
await widget.dynamicTable().clickAddButton();
|
||||
await widget.dateTimeWidget().openDatepicker(app.FIELD.dateTime_input_id);
|
||||
await widget.dateTimeWidget().selectDay('10');
|
||||
await widget.dateTimeWidget().selectHour('8');
|
||||
await widget.dateTimeWidget().selectMinute('30');
|
||||
await widget.dateTimeWidget().clearDateTimeInput(app.FIELD.dateTime_input_id);
|
||||
|
||||
widget.dynamicTable().clickSaveButton();
|
||||
widget.dynamicTable().getTableRow(0);
|
||||
await widget.dynamicTable().clickSaveButton();
|
||||
await widget.dynamicTable().getTableRow(0);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -99,7 +99,7 @@ describe('Dynamic Table widget ', () => {
|
||||
|
||||
const app = resources.Files.WIDGET_CHECK_APP.DYNAMIC_TABLE_USERS;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -120,45 +120,45 @@ describe('Dynamic Table widget ', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C260407] Should be able to add/delete/update row in Dynamic Table widget', () => {
|
||||
it('[C260407] Should be able to add/delete/update row in Dynamic Table widget', async () => {
|
||||
|
||||
widget.dynamicTable().clickAddRow();
|
||||
widget.dynamicTable().setDatatableInput('User1');
|
||||
widget.dynamicTable().clickSaveButton();
|
||||
expect(widget.dynamicTable().getTableRowText(0)).toEqual('User1');
|
||||
await widget.dynamicTable().clickAddRow();
|
||||
await widget.dynamicTable().setDatatableInput('User1');
|
||||
await widget.dynamicTable().clickSaveButton();
|
||||
await expect(await widget.dynamicTable().getTableRowText(0)).toEqual('User1');
|
||||
|
||||
widget.dynamicTable().clickTableRow(0);
|
||||
widget.dynamicTable().clickEditButton();
|
||||
widget.dynamicTable().setDatatableInput('User2');
|
||||
widget.dynamicTable().clickCancelButton();
|
||||
expect(widget.dynamicTable().getTableRowText(0)).toEqual('User1');
|
||||
await widget.dynamicTable().clickTableRow(0);
|
||||
await widget.dynamicTable().clickEditButton();
|
||||
await widget.dynamicTable().setDatatableInput('User2');
|
||||
await widget.dynamicTable().clickCancelButton();
|
||||
await expect(await widget.dynamicTable().getTableRowText(0)).toEqual('User1');
|
||||
|
||||
widget.dynamicTable().clickEditButton();
|
||||
widget.dynamicTable().setDatatableInput('User2');
|
||||
widget.dynamicTable().clickSaveButton();
|
||||
expect(widget.dynamicTable().getTableRowText(0)).toEqual('User2');
|
||||
await widget.dynamicTable().clickEditButton();
|
||||
await widget.dynamicTable().setDatatableInput('User2');
|
||||
await widget.dynamicTable().clickSaveButton();
|
||||
await expect(await widget.dynamicTable().getTableRowText(0)).toEqual('User2');
|
||||
|
||||
widget.dynamicTable().clickAddRow();
|
||||
widget.dynamicTable().setDatatableInput('User3');
|
||||
widget.dynamicTable().clickCancelButton();
|
||||
widget.dynamicTable().checkTableRowIsNotVisible(1);
|
||||
await widget.dynamicTable().clickAddRow();
|
||||
await widget.dynamicTable().setDatatableInput('User3');
|
||||
await widget.dynamicTable().clickCancelButton();
|
||||
await widget.dynamicTable().checkTableRowIsNotVisible(1);
|
||||
});
|
||||
});
|
||||
|
||||
|
@@ -24,7 +24,7 @@ import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
describe('Header widget', () => {
|
||||
describe('Header widget', async () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
let processUserModel;
|
||||
@@ -36,7 +36,7 @@ describe('Header widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.HEADER;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -57,29 +57,29 @@ describe('Header widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C276737] Should be able to set general and visibility properties for Header widget', () => {
|
||||
taskPage.formFields().checkWidgetIsHidden(app.FIELD.header_id);
|
||||
widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
taskPage.formFields().checkWidgetIsVisible(app.FIELD.header_id);
|
||||
it('[C276737] Should be able to set general and visibility properties for Header widget', async () => {
|
||||
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.header_id);
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
await taskPage.formFields().checkWidgetIsVisible(app.FIELD.header_id);
|
||||
|
||||
expect(widget.headerWidget().getFieldLabel(app.FIELD.header_id)).toBe('Header');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
await expect(await widget.headerWidget().getFieldLabel(app.FIELD.header_id)).toBe('Header');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
@@ -36,7 +36,7 @@ describe('Hyperlink widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.HYPERLINK;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -57,29 +57,29 @@ describe('Hyperlink widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C276728] Should be able to set visibility properties for Hyperlink widget', () => {
|
||||
taskPage.formFields().checkWidgetIsHidden(app.FIELD.hyperlink_id);
|
||||
widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
taskPage.formFields().checkWidgetIsVisible(app.FIELD.hyperlink_id);
|
||||
it('[C276728] Should be able to set visibility properties for Hyperlink widget', async () => {
|
||||
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.hyperlink_id);
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
await taskPage.formFields().checkWidgetIsVisible(app.FIELD.hyperlink_id);
|
||||
|
||||
expect(widget.hyperlink().getFieldLabel(app.FIELD.hyperlink_id)).toBe('Hyperlink');
|
||||
expect(widget.hyperlink().getFieldText(app.FIELD.hyperlink_id)).toBe('https://www.google.com/');
|
||||
await expect(await widget.hyperlink().getFieldLabel(app.FIELD.hyperlink_id)).toBe('Hyperlink');
|
||||
await expect(await widget.hyperlink().getFieldText(app.FIELD.hyperlink_id)).toBe('https://www.google.com/');
|
||||
});
|
||||
});
|
||||
|
@@ -36,7 +36,7 @@ describe('Multi-line Widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.MULTILINE_TEXT;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -57,53 +57,53 @@ describe('Multi-line Widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C268182] Should be able to set general properties for Multi-line Text Widget', () => {
|
||||
const label = widget.multilineTextWidget().getFieldLabel(app.FIELD.multiSimple);
|
||||
expect(label).toBe('multiSimple*');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
const placeHolder = widget.multilineTextWidget().getFieldPlaceHolder(app.FIELD.multiSimple);
|
||||
expect(placeHolder).toBe('Type something...');
|
||||
widget.multilineTextWidget().setValue(app.FIELD.multiSimple, 'TEST');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
it('[C268182] Should be able to set general properties for Multi-line Text Widget', async () => {
|
||||
const label = await widget.multilineTextWidget().getFieldLabel(app.FIELD.multiSimple);
|
||||
await expect(label).toBe('multiSimple*');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
const placeHolder = await widget.multilineTextWidget().getFieldPlaceHolder(app.FIELD.multiSimple);
|
||||
await expect(placeHolder).toBe('Type something...');
|
||||
await widget.multilineTextWidget().setValue(app.FIELD.multiSimple, 'TEST');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
});
|
||||
|
||||
it('[C268184] Should be able to set advanced properties for Multi-line Text Widget', async () => {
|
||||
widget.multilineTextWidget().setValue(app.FIELD.multiMinMax, 'A');
|
||||
expect(widget.multilineTextWidget().getErrorMessage(app.FIELD.multiMinMax)).toBe('Enter at least 4 characters');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
widget.multilineTextWidget().setValue(app.FIELD.multiMinMax, 'AAAAAAAAAAA');
|
||||
expect(widget.multilineTextWidget().getErrorMessage(app.FIELD.multiMinMax)).toBe('Enter no more than 10 characters');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
widget.multilineTextWidget().setValue(app.FIELD.multiMinMax, 'AAAA');
|
||||
await widget.multilineTextWidget().setValue(app.FIELD.multiMinMax, 'A');
|
||||
await expect(await widget.multilineTextWidget().getErrorMessage(app.FIELD.multiMinMax)).toContain('Enter at least 4 characters');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await widget.multilineTextWidget().setValue(app.FIELD.multiMinMax, 'AAAAAAAAAAA');
|
||||
await expect(await widget.multilineTextWidget().getErrorMessage(app.FIELD.multiMinMax)).toContain('Enter no more than 10 characters');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await widget.multilineTextWidget().setValue(app.FIELD.multiMinMax, 'AAAA');
|
||||
|
||||
widget.multilineTextWidget().setValue(app.FIELD.multiSimple, 'TEST');
|
||||
widget.multilineTextWidget().setValue(app.FIELD.multiRegexp, '3');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
expect(widget.multilineTextWidget().getErrorMessage(app.FIELD.multiRegexp)).toBe('Enter a different value');
|
||||
widget.multilineTextWidget().setValue(app.FIELD.multiRegexp, 'TE');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
await widget.multilineTextWidget().setValue(app.FIELD.multiSimple, 'TEST');
|
||||
await widget.multilineTextWidget().setValue(app.FIELD.multiRegexp, '3');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await expect(await widget.multilineTextWidget().getErrorMessage(app.FIELD.multiRegexp)).toContain('Enter a different value');
|
||||
await widget.multilineTextWidget().setValue(app.FIELD.multiRegexp, 'TE');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
});
|
||||
|
||||
it('[C268232] Should be able to set visibility properties for Multi-line Text Widget', async () => {
|
||||
widget.textWidget().isWidgetNotVisible(app.FIELD.multiVisible);
|
||||
widget.textWidget().setValue(app.FIELD.showMultiHidden, '1');
|
||||
widget.textWidget().isWidgetVisible(app.FIELD.multiVisible);
|
||||
await widget.textWidget().isWidgetNotVisible(app.FIELD.multiVisible);
|
||||
await widget.textWidget().setValue(app.FIELD.showMultiHidden, '1');
|
||||
await widget.textWidget().isWidgetVisible(app.FIELD.multiVisible);
|
||||
});
|
||||
});
|
||||
|
@@ -37,7 +37,7 @@ describe('Number widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.NUMBER;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -58,50 +58,50 @@ describe('Number widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async() => {
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C269111] Should be able to set general properties for Number Widget', () => {
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
expect(widget.numberWidget().getNumberFieldLabel(app.FIELD.number_general)).toContain('Number General');
|
||||
expect(widget.numberWidget().getPlaceholder(app.FIELD.number_general)).toContain('Type a number');
|
||||
it('[C269111] Should be able to set general properties for Number Widget', async () => {
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await expect(await widget.numberWidget().getNumberFieldLabel(app.FIELD.number_general)).toContain('Number General');
|
||||
await expect(await widget.numberWidget().getPlaceholder(app.FIELD.number_general)).toContain('Type a number');
|
||||
|
||||
widget.numberWidget().setFieldValue(app.FIELD.number_general, 2);
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
await widget.numberWidget().setFieldValue(app.FIELD.number_general, 2);
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
});
|
||||
|
||||
it('[C274702] Should be able to set advanced and visibility properties for Number Widget', () => {
|
||||
widget.numberWidget().setFieldValue(app.FIELD.number_general, 2);
|
||||
it('[C274702] Should be able to set advanced and visibility properties for Number Widget', async () => {
|
||||
await widget.numberWidget().setFieldValue(app.FIELD.number_general, 2);
|
||||
|
||||
taskPage.formFields().checkWidgetIsHidden(app.FIELD.number_visible);
|
||||
widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
taskPage.formFields().checkWidgetIsVisible(app.FIELD.number_visible);
|
||||
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.number_visible);
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
await taskPage.formFields().checkWidgetIsVisible(app.FIELD.number_visible);
|
||||
|
||||
widget.numberWidget().setFieldValue(app.FIELD.number_visible, 2);
|
||||
expect(widget.numberWidget().getErrorMessage(app.FIELD.number_visible)).toBe('Can\'t be less than 3');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
widget.numberWidget().clearFieldValue(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 taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await widget.numberWidget().clearFieldValue(app.FIELD.number_visible);
|
||||
|
||||
widget.numberWidget().setFieldValue(app.FIELD.number_visible, 101);
|
||||
expect(widget.numberWidget().getErrorMessage(app.FIELD.number_visible)).toBe('Can\'t be greater than 100');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
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 taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await widget.numberWidget().clearFieldValue(app.FIELD.number_visible);
|
||||
|
||||
widget.numberWidget().setFieldValue(app.FIELD.number_visible, 4);
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
await widget.numberWidget().setFieldValue(app.FIELD.number_visible, 4);
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
@@ -36,7 +36,7 @@ describe('People widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.ADD_PEOPLE;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -57,44 +57,44 @@ describe('People widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async() => {
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C260435] Should select user from People Widget', () => {
|
||||
taskPage.formFields().checkWidgetIsHidden(app.FIELD.widget_id);
|
||||
widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
taskPage.formFields().checkWidgetIsVisible(app.FIELD.widget_id);
|
||||
it('[C260435] Should select user from People Widget', async () => {
|
||||
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.widget_id);
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
await taskPage.formFields().checkWidgetIsVisible(app.FIELD.widget_id);
|
||||
|
||||
const admin = processUserModel.firstName + ' ' + processUserModel.lastName;
|
||||
widget.peopleWidget().insertUser(app.FIELD.widget_id, admin.charAt(0));
|
||||
widget.peopleWidget().checkDropDownListIsDisplayed();
|
||||
widget.peopleWidget().checkUserIsListed(admin);
|
||||
widget.peopleWidget().selectUserFromDropDown(admin);
|
||||
await widget.peopleWidget().insertUser(app.FIELD.widget_id, admin.charAt(0));
|
||||
await widget.peopleWidget().checkDropDownListIsDisplayed();
|
||||
await widget.peopleWidget().checkUserIsListed(admin);
|
||||
await widget.peopleWidget().selectUserFromDropDown(admin);
|
||||
});
|
||||
|
||||
it('[C274707] Should be possible to set visibility properties for People Widget', () => {
|
||||
taskPage.formFields().checkWidgetIsHidden(app.FIELD.widget_id);
|
||||
widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
taskPage.formFields().checkWidgetIsVisible(app.FIELD.widget_id);
|
||||
it('[C274707] Should be possible to set visibility properties for People Widget', async () => {
|
||||
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.widget_id);
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
await taskPage.formFields().checkWidgetIsVisible(app.FIELD.widget_id);
|
||||
|
||||
const admin = processUserModel.firstName + ' ' + processUserModel.lastName;
|
||||
widget.peopleWidget().insertUser(app.FIELD.widget_id, admin.charAt(0));
|
||||
widget.peopleWidget().checkDropDownListIsDisplayed();
|
||||
widget.peopleWidget().checkUserIsListed(admin);
|
||||
widget.peopleWidget().selectUserFromDropDown(admin);
|
||||
await widget.peopleWidget().insertUser(app.FIELD.widget_id, admin.charAt(0));
|
||||
await widget.peopleWidget().checkDropDownListIsDisplayed();
|
||||
await widget.peopleWidget().checkUserIsListed(admin);
|
||||
await widget.peopleWidget().selectUserFromDropDown(admin);
|
||||
});
|
||||
});
|
||||
|
@@ -36,7 +36,7 @@ describe('Radio Buttons Widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.RADIO_BUTTONS;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -59,35 +59,34 @@ describe('Radio Buttons Widget', () => {
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C277316] Should display empty radio buttons when no preselection is configured', () => {
|
||||
widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
widget.radioWidget().isSelectionClean(app.FIELD.radio_buttons_id);
|
||||
it('[C277316] Should display empty radio buttons when no preselection is configured', async () => {
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
await widget.radioWidget().isSelectionClean(app.FIELD.radio_buttons_id);
|
||||
});
|
||||
|
||||
it('[C274704] Should be able to set visibility properties for Radio Button widget', () => {
|
||||
taskPage.formFields().checkWidgetIsHidden(app.FIELD.radio_buttons_id);
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
it('[C274704] Should be able to set visibility properties for Radio Button widget', async () => {
|
||||
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.radio_buttons_id);
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
|
||||
widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
expect(widget.radioWidget().getRadioWidgetLabel(app.FIELD.radio_buttons_id)).toContain('Radio posts');
|
||||
widget.radioWidget().selectOption(app.FIELD.radio_buttons_id, 1);
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
await widget.checkboxWidget().clickCheckboxInput(app.FIELD.checkbox_id);
|
||||
await expect(await widget.radioWidget().getRadioWidgetLabel(app.FIELD.radio_buttons_id)).toContain('Radio posts');
|
||||
await widget.radioWidget().selectOption(app.FIELD.radio_buttons_id, 1);
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
@@ -36,7 +36,7 @@ describe('Text widget', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.TEXT;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -57,64 +57,64 @@ describe('Text widget', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C268157] Should be able to set general properties for Text widget', async () => {
|
||||
const label = widget.textWidget().getFieldLabel(app.FIELD.simpleText);
|
||||
expect(label).toBe('textSimple*');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
const placeHolder = widget.textWidget().getFieldPlaceHolder(app.FIELD.simpleText);
|
||||
expect(placeHolder).toBe('Type something...');
|
||||
widget.textWidget().setValue(app.FIELD.simpleText, 'TEST');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
const label = await widget.textWidget().getFieldLabel(app.FIELD.simpleText);
|
||||
await expect(label).toBe('textSimple*');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
const placeHolder = await widget.textWidget().getFieldPlaceHolder(app.FIELD.simpleText);
|
||||
await expect(placeHolder).toBe('Type something...');
|
||||
await widget.textWidget().setValue(app.FIELD.simpleText, 'TEST');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
});
|
||||
|
||||
it('[C268170] Min-max length properties', async () => {
|
||||
widget.textWidget().setValue(app.FIELD.textMinMax, 'A');
|
||||
expect(widget.textWidget().getErrorMessage(app.FIELD.textMinMax)).toBe('Enter at least 4 characters');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
widget.textWidget().setValue(app.FIELD.textMinMax, 'AAAAAAAAAAA');
|
||||
expect(widget.textWidget().getErrorMessage(app.FIELD.textMinMax)).toBe('Enter no more than 10 characters');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
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().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await widget.textWidget().setValue(app.FIELD.textMinMax, 'AAAAAAAAAAA');
|
||||
await expect(await widget.textWidget().getErrorMessage(app.FIELD.textMinMax)).toContain('Enter no more than 10 characters');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
});
|
||||
|
||||
it('[C268171] Input mask reversed checkbox properties', async () => {
|
||||
widget.textWidget().setValue(app.FIELD.textMask, '18951523');
|
||||
expect(widget.textWidget().getFieldValue(app.FIELD.textMask)).toBe('1895-1523');
|
||||
await widget.textWidget().setValue(app.FIELD.textMask, '18951523');
|
||||
await expect(await widget.textWidget().getFieldValue(app.FIELD.textMask)).toBe('1895-1523');
|
||||
});
|
||||
|
||||
it('[C268171] Input mask reversed checkbox properties', async () => {
|
||||
widget.textWidget().setValue(app.FIELD.textMaskReversed, '1234567899');
|
||||
expect(widget.textWidget().getFieldValue(app.FIELD.textMaskReversed)).toBe('3456-7899');
|
||||
await widget.textWidget().setValue(app.FIELD.textMaskReversed, '1234567899');
|
||||
await expect(await widget.textWidget().getFieldValue(app.FIELD.textMaskReversed)).toBe('3456-7899');
|
||||
});
|
||||
|
||||
it('[C268177] Should be able to set Regex Pattern property for Text widget', async () => {
|
||||
widget.textWidget().setValue(app.FIELD.simpleText, 'TEST');
|
||||
widget.textWidget().setValue(app.FIELD.textRegexp, 'T');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
expect(widget.textWidget().getErrorMessage(app.FIELD.textRegexp)).toBe('Enter a different value');
|
||||
widget.textWidget().setValue(app.FIELD.textRegexp, 'TE');
|
||||
expect(taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
await widget.textWidget().setValue(app.FIELD.simpleText, 'TEST');
|
||||
await widget.textWidget().setValue(app.FIELD.textRegexp, 'T');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||
await expect(await widget.textWidget().getErrorMessage(app.FIELD.textRegexp)).toContain('Enter a different value');
|
||||
await widget.textWidget().setValue(app.FIELD.textRegexp, 'TE');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||
});
|
||||
|
||||
it('[C274712] Should be able to set visibility properties for Text widget ', async () => {
|
||||
widget.textWidget().isWidgetNotVisible(app.FIELD.textHidden);
|
||||
widget.textWidget().setValue(app.FIELD.showHiddenText, '1');
|
||||
widget.textWidget().isWidgetVisible(app.FIELD.textHidden);
|
||||
await widget.textWidget().isWidgetNotVisible(app.FIELD.textHidden);
|
||||
await widget.textWidget().setValue(app.FIELD.showHiddenText, '1');
|
||||
await widget.textWidget().isWidgetVisible(app.FIELD.textHidden);
|
||||
});
|
||||
});
|
||||
|
@@ -59,7 +59,7 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
const app = resources.Files.WIDGET_CHECK_APP.VISIBILITY;
|
||||
let deployedApp, process;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -80,73 +80,69 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.params.testConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await alfrescoJsApi.activiti.processApi.deleteProcessInstance(process.id);
|
||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C309647] Should be able to see Checkbox widget when visibility condition refers to another field with specific value', () => {
|
||||
|
||||
expect(widget.textWidget().isWidgetVisible(widgets.textOneId)).toBe(true);
|
||||
expect(widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldValue)).toBe(true);
|
||||
widget.textWidget().setValue(widgets.textOneId, value.displayCheckbox);
|
||||
expect(widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldValue)).toBe(true);
|
||||
it('[C309647] Should be able to see Checkbox widget when visibility condition refers to another field with specific value', async () => {
|
||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldValue);
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.displayCheckbox);
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldValue);
|
||||
});
|
||||
|
||||
it('[C309648] Should be able to see Checkbox widget when visibility condition refers to a form variable and a field', () => {
|
||||
it('[C309648] Should be able to see Checkbox widget when visibility condition refers to a form variable and a field', async () => {
|
||||
|
||||
widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
expect(widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxVariableField)).toBe(true);
|
||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxVariableField);
|
||||
|
||||
widget.textWidget().setValue(widgets.textOneId, value.showVariableFieldCheckbox);
|
||||
expect(widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxVariableField)).toBe(true);
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.showVariableFieldCheckbox);
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxVariableField);
|
||||
|
||||
widget.textWidget().setValue(widgets.textOneId, value.notDisplayCheckbox);
|
||||
expect(widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxVariableField)).toBe(true);
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.notDisplayCheckbox);
|
||||
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', () => {
|
||||
it('[C309649] Should be able to see Checkbox widget when visibility condition refers to a field and a form variable', async () => {
|
||||
|
||||
widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
expect(widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldVariable)).toBe(true);
|
||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldVariable);
|
||||
|
||||
widget.textWidget().setValue(widgets.textOneId, value.displayFieldVariableCheckbox);
|
||||
expect(widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldVariable)).toBe(true);
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.displayFieldVariableCheckbox);
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldVariable);
|
||||
|
||||
widget.textWidget().setValue(widgets.textOneId, value.notDisplayCheckbox);
|
||||
widget.checkboxWidget().isCheckboxHidden(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', () => {
|
||||
it('[C311425] Should be able to see Checkbox widget when visibility condition refers to a field and another field', async () => {
|
||||
|
||||
widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
expect(widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldField)).toBe(true);
|
||||
widget.textWidget().setValue(widgets.textOneId, value.displayCheckbox);
|
||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldField);
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.displayCheckbox);
|
||||
|
||||
expect(widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldField)).toBe(true);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldField);
|
||||
|
||||
widget.textWidget().setValue(widgets.textTwoId, value.displayCheckbox);
|
||||
|
||||
expect(widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldField)).toBe(true);
|
||||
await widget.textWidget().setValue(widgets.textTwoId, value.displayCheckbox);
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldField);
|
||||
});
|
||||
|
||||
it('[C311424] Should be able to see Checkbox widget when visibility condition refers to a variable with specific value', () => {
|
||||
expect(widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxVariableValue)).toBe(true);
|
||||
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);
|
||||
});
|
||||
|
||||
it('[C311426] Should be able to see Checkbox widget when visibility condition refers to form variable and another form variable', () => {
|
||||
expect(widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxVariableVariable)).toBe(true);
|
||||
it('[C311426] Should be able to see Checkbox widget when visibility condition refers to form variable and another form variable', async () => {
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxVariableVariable);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user