mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
@@ -29,7 +29,7 @@ describe('Amount Widget', () => {
|
||||
const widget = new Widget();
|
||||
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
let processUserModel;
|
||||
|
||||
const apiService = new ApiService();
|
||||
@@ -45,16 +45,14 @@ describe('Amount Widget', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async() => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedAppId}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
|
||||
@@ -63,9 +61,9 @@ describe('Amount Widget', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C274703] Should be possible to set general, advance and visibility properties for Amount Widget', async () => {
|
||||
|
@@ -80,7 +80,7 @@ describe('Attach widget - File', () => {
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C268067] Should be able to preview, download and remove attached files from an active form', async () => {
|
||||
|
@@ -39,7 +39,7 @@ describe('Attach Folder widget', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
let processUserModel;
|
||||
|
||||
const apiService = new ApiService();
|
||||
@@ -55,26 +55,24 @@ describe('Attach Folder widget', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C276745] Should be possible to set visibility properties for Attach Folder Widget', async () => {
|
||||
|
@@ -38,11 +38,12 @@ describe('Checkbox Widget', () => {
|
||||
|
||||
let processUserModel;
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -52,24 +53,22 @@ describe('Checkbox Widget', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C268554] Should be able to set general settings for Checkbox widget ', async () => {
|
||||
|
@@ -41,10 +41,11 @@ describe('Date and time widget', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let processUserModel;
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -54,26 +55,24 @@ describe('Date and time widget', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C268818] Should be able to set general settings for Date Time widget', async () => {
|
||||
|
@@ -45,11 +45,12 @@ describe('Date widget', () => {
|
||||
const dateWidget = widget.dateWidget();
|
||||
let appModel;
|
||||
let processUserModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -59,24 +60,22 @@ describe('Date widget', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
describe('Simple App', () => {
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
|
@@ -41,9 +41,10 @@ describe('Document Template widget', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
let processUserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -54,26 +55,24 @@ describe('Document Template widget', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp( app.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await new ProcessUtil(apiService).startProcessOfApp(appModel.name);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessOfApp(appModel.name);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C260406] should check that the template contains assigned file ', async () => {
|
||||
|
@@ -40,9 +40,10 @@ describe('Dropdown widget', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
let processUserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -53,26 +54,24 @@ describe('Dropdown widget', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C269051] Should be possible to set general and options properties for Dropdown widget ', async () => {
|
||||
|
@@ -39,13 +39,12 @@ describe('Dynamic Table widget ', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let processUserModel;
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
|
||||
describe('with Date Time Widget App', () => {
|
||||
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DYNAMIC_TABLE;
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -53,26 +52,26 @@ describe('Dynamic Table widget ', () => {
|
||||
processUserModel = await usersActions.createUser();
|
||||
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
const appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => currentApp.modelId === appModel.id);
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
@@ -103,24 +102,24 @@ describe('Dynamic Table widget ', () => {
|
||||
processUserModel = await usersActions.createUser();
|
||||
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
const appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => currentApp.modelId === appModel.id);
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
@@ -159,24 +158,24 @@ describe('Dynamic Table widget ', () => {
|
||||
processUserModel = await usersActions.createUser();
|
||||
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
const application = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
const appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => currentApp.modelId === application.id);
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(application.name, app.CUSTOM_VALIDATOR.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.CUSTOM_VALIDATOR.processName);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
@@ -195,7 +194,7 @@ describe('Dynamic Table widget ', () => {
|
||||
|
||||
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();
|
||||
|
@@ -41,9 +41,10 @@ describe('Header widget', async () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
let processUserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -54,26 +55,24 @@ describe('Header widget', async () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C276737] Should be able to set general and visibility properties for Header widget', async () => {
|
||||
|
@@ -41,10 +41,11 @@ describe('Hyperlink widget', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let processUserModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -54,26 +55,24 @@ describe('Hyperlink widget', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C276728] Should be able to set visibility properties for Hyperlink widget', async () => {
|
||||
|
@@ -40,10 +40,11 @@ describe('Multi-line Widget', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let processUserModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -53,26 +54,24 @@ describe('Multi-line Widget', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C268182] Should be able to set general properties for Multi-line Text Widget', async () => {
|
||||
|
@@ -41,9 +41,10 @@ describe('Number widget', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
let processUserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -54,26 +55,24 @@ describe('Number widget', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C269111] Should be able to set general properties for Number Widget', async () => {
|
||||
|
@@ -20,6 +20,7 @@ import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { AdminGroupsApi } from '@alfresco/js-api';
|
||||
|
||||
describe('People and Group widget', () => {
|
||||
|
||||
@@ -33,6 +34,7 @@ describe('People and Group widget', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const adminGroupsApi = new AdminGroupsApi(apiService.getInstance());
|
||||
|
||||
let user: UserModel;
|
||||
|
||||
@@ -129,16 +131,16 @@ describe('People and Group widget', () => {
|
||||
tenantId: tenantId, firstName: app.subGroupUser.firstName, lastName: app.subGroupUser.lastName
|
||||
}));
|
||||
|
||||
const group = await apiService.getInstance().activiti.adminGroupsApi.createNewGroup({
|
||||
const group = await adminGroupsApi.createNewGroup({
|
||||
name: app.group.name,
|
||||
tenantId,
|
||||
type: 1
|
||||
});
|
||||
|
||||
await Promise.all(userCreated.map((userToAddGroup: UserModel) => apiService.getInstance().activiti.adminGroupsApi.addGroupMember(group.id, userToAddGroup.id)));
|
||||
await Promise.all(userCreated.map((userToAddGroup: UserModel) => adminGroupsApi.addGroupMember(group.id, userToAddGroup.id)));
|
||||
|
||||
const subgroups: any[] = await Promise.all(getSubGroupsName().map((name) =>
|
||||
apiService.getInstance().activiti.adminGroupsApi.createNewGroup({
|
||||
adminGroupsApi.createNewGroup({
|
||||
name,
|
||||
tenantId,
|
||||
type: 1,
|
||||
@@ -146,7 +148,7 @@ describe('People and Group widget', () => {
|
||||
})
|
||||
));
|
||||
|
||||
await Promise.all(subgroups.map((subgroup) => apiService.getInstance().activiti.adminGroupsApi.addGroupMember(subgroup.id, subgroupUser.id)));
|
||||
await Promise.all(subgroups.map((subgroup) => adminGroupsApi.addGroupMember(subgroup.id, subgroupUser.id)));
|
||||
|
||||
}
|
||||
|
||||
|
@@ -41,9 +41,10 @@ describe('People widget', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
let processUserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -54,26 +55,24 @@ describe('People widget', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await new ProcessUtil(apiService).startProcessOfApp(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessOfApp(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C260435][C274707] Should be possible to set visibility properties for People Widget', async () => {
|
||||
|
@@ -41,9 +41,10 @@ describe('Radio Buttons Widget', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let appId, process;
|
||||
let processUserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -53,28 +54,24 @@ describe('Radio Buttons Widget', () => {
|
||||
|
||||
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);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(appId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C277316] Should display empty radio buttons when no preselection is configured', async () => {
|
||||
|
@@ -41,9 +41,10 @@ describe('Text widget', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
let processUserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -54,26 +55,24 @@ describe('Text widget', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C268157] Should be able to set general properties for Text widget', async () => {
|
||||
|
@@ -1,89 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, ApplicationsUtil, LoginPage, UserModel, UsersActions, Widget } 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');
|
||||
|
||||
describe('Typeahead widget', () => {
|
||||
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const widget = new Widget();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
|
||||
let user: UserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
user = await usersActions.createUser();
|
||||
|
||||
await apiService.login(user.username, user.password);
|
||||
await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
||||
await loginPage.login(user.username, user.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(user.tenantId);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp();
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
});
|
||||
|
||||
it('[C307988] Type ahead form control should work for URLs', async () => {
|
||||
const name = 'typahead widget task';
|
||||
const typeaheadWidget = app.TYPE_AHEAD_WIDGET;
|
||||
await taskPage.createTask({name, formName: typeaheadWidget.formName});
|
||||
await expect(await taskPage.taskDetails().getTitle()).toEqual('Activities');
|
||||
|
||||
await widget.typeahedWidget().checkTypeaheadFieldIsDisplayed();
|
||||
await widget.typeahedWidget().fillTypeaheadField(typeaheadWidget.case1.searchTerm);
|
||||
await widget.typeahedWidget().checkDropDownListIsDisplayed();
|
||||
let suggestions = await widget.typeahedWidget().getDropDownList();
|
||||
await expect(suggestions.sort()).toEqual(typeaheadWidget.case1.result.sort());
|
||||
|
||||
await widget.typeahedWidget().fillTypeaheadField(typeaheadWidget.case2.searchTerm);
|
||||
|
||||
await widget.typeahedWidget().checkDropDownListIsDisplayed();
|
||||
suggestions = await widget.typeahedWidget().getDropDownList();
|
||||
await expect(suggestions.sort()).toEqual(typeaheadWidget.case2.result);
|
||||
|
||||
await widget.typeahedWidget().selectOptionFromDropdown();
|
||||
await taskPage.taskDetails().clickCompleteFormTask();
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.COMPLETED_TASKS);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
|
||||
await taskPage.tasksListPage().selectRow(name);
|
||||
await widget.typeahedWidget().checkTypeaheadFieldIsDisplayed();
|
||||
|
||||
await browser.sleep(1000);
|
||||
|
||||
await expect(await widget.typeahedWidget().getFieldValue('1583773306434')).toBe(typeaheadWidget.case2.result[0]);
|
||||
});
|
||||
});
|
@@ -63,9 +63,10 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
let deployedAppId, process;
|
||||
let processUserModel;
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -76,25 +77,23 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await apiService.getInstance().activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
deployedAppId = await applicationsService.getAppDefinitionId(appModel.id);
|
||||
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedAppId);
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
|
||||
await processUtil.cancelProcessInstance(process.id);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
await usersActions.deleteTenant(processUserModel.tenantId);
|
||||
});
|
||||
|
||||
it('[C309647] Should be able to see Checkbox widget when visibility condition refers to another field with specific value', async () => {
|
||||
|
Reference in New Issue
Block a user