[ADF-5263] Empty page displayed all the time when load content fix (#6209)

* Make test run on API update
Improve create librrary test

* Fix empty page displayed always first

* remvoe console

* fix

* fix

* lint

* fix

* fix

* fix

* fix

* fix
This commit is contained in:
Eugenio Romano
2020-10-05 00:26:56 +01:00
committed by GitHub
parent d128bc158c
commit 04f5fdffd7
27 changed files with 174 additions and 179 deletions

View File

@@ -102,8 +102,7 @@ describe('Info Drawer', () => {
it('[C260319] New Task - displayed details', async () => {
const name = StringUtil.generateRandomString(5);
await taskPage.createTask({ ...taskDetails, formName: app.formName, name });
await taskPage.tasksListPage().checkTaskListIsLoaded();
await taskPage.tasksListPage().getDataTable().waitForTableBody();
await taskPage.tasksListPage().getDataTable().waitTillContentLoaded();
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
await taskPage.tasksListPage().checkContentIsDisplayed(name);
await taskPage.tasksListPage().selectRow(name);
@@ -128,8 +127,7 @@ describe('Info Drawer', () => {
it('[C260323] Priority - Editing field', async () => {
const name = StringUtil.generateRandomString(5);
await taskPage.createTask({ ...taskDetails, formName: app.formName, name });
await taskPage.tasksListPage().checkTaskListIsLoaded();
await taskPage.tasksListPage().getDataTable().waitForTableBody();
await taskPage.tasksListPage().getDataTable().waitTillContentLoaded();
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
await taskPage.tasksListPage().checkContentIsDisplayed(name);
await taskPage.tasksListPage().selectRow(name);
@@ -138,11 +136,9 @@ describe('Info Drawer', () => {
await expect(await taskPage.taskDetails().getPriority()).toEqual(taskDetails.priority);
await taskPage.taskDetails().updatePriority('40');
await taskPage.taskDetails().checkTaskDetailsDisplayed();
await browser.sleep(2000);
await expect(await taskPage.taskDetails().getPriority()).toEqual('40');
await taskPage.taskDetails().updatePriority();
await taskPage.taskDetails().checkTaskDetailsDisplayed();
await browser.sleep(2000);
await expect(await taskPage.taskDetails().getPriority()).toEqual('0');
await taskPage.taskDetails().clickCompleteFormTask();
@@ -151,8 +147,7 @@ describe('Info Drawer', () => {
it('[C260325] Due Date - Changing', async () => {
const name = StringUtil.generateRandomString(5);
await taskPage.createTask({ ...taskDetails, formName: app.formName, name });
await taskPage.tasksListPage().checkTaskListIsLoaded();
await taskPage.tasksListPage().getDataTable().waitForTableBody();
await taskPage.tasksListPage().getDataTable().waitTillContentLoaded();
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
await taskPage.tasksListPage().checkContentIsDisplayed(name);
await taskPage.tasksListPage().selectRow(name);
@@ -194,8 +189,7 @@ describe('Info Drawer', () => {
it('[C260329] Task with no form', async () => {
const name = StringUtil.generateRandomString(5);
await taskPage.createTask(<any> { ...taskDetails, formName: '', name });
await taskPage.tasksListPage().checkTaskListIsLoaded();
await taskPage.tasksListPage().getDataTable().waitForTableBody();
await taskPage.tasksListPage().getDataTable().waitTillContentLoaded();
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
await taskPage.tasksListPage().checkContentIsDisplayed(name);
await taskPage.tasksListPage().selectRow(name);
@@ -212,8 +206,7 @@ describe('Info Drawer', () => {
it('[C260320] Assign user to the task', async () => {
const name = StringUtil.generateRandomString(5);
await taskPage.createTask(<any> { ...taskDetails, formName: app.formName, name });
await taskPage.tasksListPage().checkTaskListIsLoaded();
await taskPage.tasksListPage().getDataTable().waitForTableBody();
await taskPage.tasksListPage().getDataTable().waitTillContentLoaded();
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
await taskPage.tasksListPage().checkContentIsDisplayed(name);
await taskPage.tasksListPage().selectRow(name);
@@ -253,9 +246,7 @@ describe('Info Drawer', () => {
});
await taskPage.taskDetails().updateAssignee(assigneeUserModelFullName);
await taskPage.tasksListPage().checkTaskListIsLoaded();
await taskPage.tasksListPage().getDataTable().waitForTableBody();
await taskPage.tasksListPage().getDataTable().waitTillContentLoaded();
await taskPage.tasksListPage().checkContentIsNotDisplayed(app.taskName);
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
@@ -279,8 +270,7 @@ describe('Info Drawer', () => {
await startProcess.clickStartProcessButton();
await processServiceTabBarPage.clickTasksButton();
await taskPage.tasksListPage().checkTaskListIsLoaded();
await taskPage.tasksListPage().getDataTable().waitForTableBody();
await taskPage.tasksListPage().getDataTable().waitTillContentLoaded();
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
await taskPage.tasksListPage().checkContentIsDisplayed(app.taskName);
@@ -304,8 +294,7 @@ describe('Info Drawer', () => {
it('[C260328] Description - Editing field', async () => {
const name = StringUtil.generateRandomString(5);
await taskPage.createTask({ ...taskDetails, formName: app.formName, name });
await taskPage.tasksListPage().checkTaskListIsLoaded();
await taskPage.tasksListPage().getDataTable().waitForTableBody();
await taskPage.tasksListPage().getDataTable().waitTillContentLoaded();
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
await taskPage.tasksListPage().checkContentIsDisplayed(name);
await taskPage.tasksListPage().selectRow(name);
@@ -334,8 +323,7 @@ describe('Info Drawer', () => {
const name = StringUtil.generateRandomString(5);
await taskPage.createTask({ ...taskDetails, formName: app.formName, name });
await taskPage.tasksListPage().checkTaskListIsLoaded();
await taskPage.tasksListPage().getDataTable().waitForTableBody();
await taskPage.tasksListPage().getDataTable().waitTillContentLoaded();
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
await taskPage.tasksListPage().checkContentIsDisplayed(name);
await taskPage.tasksListPage().selectRow(name);

View File

@@ -220,7 +220,7 @@ export class TaskDetailsPage {
async updatePriority(priority?: string): Promise<void> {
await BrowserActions.click(this.priority);
await BrowserActions.clearWithBackSpace(this.priority);
await BrowserActions.clearSendKeys(element(by.css('input[data-automation-id="card-textitem-value-priority"]')), priority ? priority : ' ');
await BrowserActions.clearSendKeys(element(by.css('input[data-automation-id="card-textitem-value-priority"]')), priority ? priority : ' ', 500);
await this.priority.sendKeys(Key.TAB);
await browser.sleep(1000);
}

View File

@@ -45,20 +45,20 @@ describe('Hyperlink widget', () => {
let deployedApp, process;
beforeAll(async () => {
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
processUserModel = await usersActions.createUser();
processUserModel = await usersActions.createUser();
await apiService.getInstance().login(processUserModel.email, processUserModel.password);
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
await apiService.getInstance().login(processUserModel.email, 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) => {
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);
await loginPage.login(processUserModel.email, processUserModel.password);
});
process = await new ProcessUtil(apiService).startProcessByDefinitionName(appModel.name, app.processName);
await loginPage.login(processUserModel.email, processUserModel.password);
});
beforeEach(async () => {
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
@@ -71,7 +71,7 @@ describe('Hyperlink widget', () => {
await apiService.getInstance().activiti.processApi.deleteProcessInstance(process.id);
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
});
});
it('[C276728] Should be able to set visibility properties for Hyperlink widget', async () => {
await taskPage.formFields().checkWidgetIsHidden(app.FIELD.hyperlink_id);