[AAE-4379] i18n fixes (#6515)

* add missing translations

* add missing translations

* fix unit tests

* reduce overhead

* update e2e

* update e2e

* cleanup e2e

* cleanup e2e

* cleanup e2e

* update e2e

* update e2e

* update code

* update code

* update code

* update code

* code fixes

* code fixes

* code fixes
This commit is contained in:
Denys Vuika
2021-01-11 09:30:45 +00:00
committed by GitHub
parent d369fa6925
commit f8526c4dc0
38 changed files with 1373 additions and 1143 deletions

View File

@@ -36,7 +36,11 @@ describe('Edit task filters and task list properties', () => {
const loginSSOPage = new LoginPage();
const navigationBarPage = new NavigationBarPage();
const appListCloudComponent = new AppListCloudPage();
const tasksCloudDemoPage = new TasksCloudDemoPage();
const editTaskFilter = tasksCloudDemoPage.editTaskFilterCloud;
const taskFilter = tasksCloudDemoPage.taskFilterCloudComponent;
const taskList = tasksCloudDemoPage.taskListCloudComponent();
const apiService = new ApiService();
const identityService = new IdentityService(apiService);
@@ -105,166 +109,164 @@ describe('Edit task filters and task list properties', () => {
await navigationBarPage.navigateToProcessServicesCloudPage();
await appListCloudComponent.checkApsContainer();
await appListCloudComponent.goToApp(simpleApp);
await tasksCloudDemoPage.editTaskFilterCloudComponent().openFilter();
await tasksCloudDemoPage.taskFilterCloudComponent.checkTaskFilterIsDisplayed('my-tasks');
await editTaskFilter.openFilter();
await taskFilter.checkTaskFilterIsDisplayed('my-tasks');
});
it('[C292004] Filter by appName', async () => {
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getAppNameDropDownValue()).toEqual(simpleApp);
await expect(await editTaskFilter.getAppNameDropDownValue()).toEqual(simpleApp);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(createdTask.entry.name);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(notDisplayedTask.entry.name);
await taskList.checkContentIsDisplayedByName(createdTask.entry.name);
await taskList.checkContentIsNotDisplayedByName(notDisplayedTask.entry.name);
await tasksCloudDemoPage.editTaskFilterCloudComponent().setAppNameDropDown(candidateBaseApp);
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getAppNameDropDownValue()).toEqual(candidateBaseApp);
await editTaskFilter.setAppNameDropDown(candidateBaseApp);
await expect(await editTaskFilter.getAppNameDropDownValue()).toEqual(candidateBaseApp);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(notDisplayedTask.entry.name);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(createdTask.entry.name);
await taskList.checkContentIsDisplayedByName(notDisplayedTask.entry.name);
await taskList.checkContentIsNotDisplayedByName(createdTask.entry.name);
});
it('[C291906] Should be able to see only the task with specific taskId when typing it in the task Id field', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setId(createdTask.entry.id);
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getId()).toEqual(createdTask.entry.id);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedById(createdTask.entry.id);
await tasksCloudDemoPage.taskListCloudComponent().getRowsWithSameId(createdTask.entry.id).then(async (list) => {
await editTaskFilter.setId(createdTask.entry.id);
await expect(await editTaskFilter.getId()).toEqual(createdTask.entry.id);
await taskList.checkContentIsDisplayedById(createdTask.entry.id);
await taskList.getRowsWithSameId(createdTask.entry.id).then(async (list) => {
await expect(list.length).toEqual(1);
});
});
it('[C291907] Should be able to see No tasks found when typing an invalid task id', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setId('invalidId');
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getId()).toEqual('invalidId');
await editTaskFilter.setId('invalidId');
await expect(await editTaskFilter.getId()).toEqual('invalidId');
await expect(await tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
await expect(await taskList.getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
});
it('[C297476] Filter by taskName', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setTaskName(createdTask.entry.name);
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getTaskName()).toEqual(createdTask.entry.name);
await tasksCloudDemoPage.taskListCloudComponent().getRowsWithSameName(createdTask.entry.name).then(async (list) => {
await editTaskFilter.setTaskName(createdTask.entry.name);
await expect(await editTaskFilter.getTaskName()).toEqual(createdTask.entry.name);
await taskList.getRowsWithSameName(createdTask.entry.name).then(async (list) => {
await expect(list.length).toEqual(1);
});
});
it('[C297613] Should be able to see No tasks found when typing a task name that does not exist', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setTaskName('invalidName');
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getTaskName()).toEqual('invalidName');
await expect(await tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
await editTaskFilter.setTaskName('invalidName');
await expect(await editTaskFilter.getTaskName()).toEqual('invalidName');
await expect(await taskList.getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
});
it('[C297480] Should be able to see only tasks that are part of a specific process when processInstanceId is set', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setProcessInstanceId(processInstance.entry.id);
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ALL');
await editTaskFilter.setProcessInstanceId(processInstance.entry.id);
await editTaskFilter.setStatusFilterDropDown('All');
await editTaskFilter.clearAssignee();
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
await expect(await taskList.getDataTable().getNumberOfRows()).toBe(1);
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().getNumberOfRows()).toBe(1);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByProcessInstanceId(processInstance.entry.id);
await taskList.checkContentIsDisplayedByProcessInstanceId(processInstance.entry.id);
});
it('[C297684] Should be able to see No tasks found when typing an invalid processInstanceId', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setProcessInstanceId('invalidTaskId');
await editTaskFilter.setProcessInstanceId('invalidTaskId');
await expect(await tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
await expect(await taskList.getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
});
it('[C297478] Should be able to see only tasks that are assigned to a specific user when assignee is set', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setAssignee(testUser.username);
await editTaskFilter.setAssignee(testUser.username);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(createdTask.entry.name);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(notAssigned.entry.name);
await taskList.checkContentIsDisplayedByName(createdTask.entry.name);
await taskList.checkContentIsNotDisplayedByName(notAssigned.entry.name);
});
it('[C297686] Should be able to see No tasks found when typing an invalid user to assignee field', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setAssignee('invalid');
await editTaskFilter.setAssignee('invalid');
await expect(await tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
await expect(await taskList.getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
});
it('[C297482] Should be able to see only tasks with specific priority when priority is set', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setPriority('Low');
await editTaskFilter.setPriority('Low');
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(priorityTask.entry.name);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(createdTask.entry.name);
await taskList.checkContentIsDisplayedByName(priorityTask.entry.name);
await taskList.checkContentIsNotDisplayedByName(createdTask.entry.name);
});
it('[C297687] Should be able to see No tasks found when typing unused value for priority field', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setPriority('Normal');
await editTaskFilter.setPriority('Normal');
await expect(await tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
await expect(await taskList.getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
});
it('[C297481] Should be able to see only tasks with specific parentTaskId when parentTaskId is set', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setParentTaskId(subTask.entry.parentTaskId);
await editTaskFilter.setParentTaskId(subTask.entry.parentTaskId);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(subTask.entry.name);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(createdTask.entry.name);
await taskList.checkContentIsDisplayedByName(subTask.entry.name);
await taskList.checkContentIsNotDisplayedByName(createdTask.entry.name);
});
it('[C297486] Filter by Owner', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ALL');
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOwner(testUser.username);
await editTaskFilter.setStatusFilterDropDown('All');
await editTaskFilter.clearAssignee();
await editTaskFilter.setOwner(testUser.username);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(notAssigned.entry.name);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(createdTask.entry.name);
await taskList.checkContentIsDisplayedByName(notAssigned.entry.name);
await taskList.checkContentIsDisplayedByName(createdTask.entry.name);
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOwner('invalid');
await editTaskFilter.setOwner('invalid');
await expect(await tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
await expect(await taskList.getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
});
it('[C297484] Task is displayed when typing into lastModifiedFrom field a date before the task CreatedDate', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedFrom(beforeDate);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(createdTask.entry.name);
await editTaskFilter.setLastModifiedFrom(beforeDate);
await taskList.checkContentIsDisplayedByName(createdTask.entry.name);
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedFrom(afterDate);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(createdTask.entry.name);
await editTaskFilter.setLastModifiedFrom(afterDate);
await taskList.checkContentIsNotDisplayedByName(createdTask.entry.name);
});
it('[C297689] Task is not displayed when typing into lastModifiedFrom field the same date as tasks CreatedDate', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedFrom(currentDate);
await tasksCloudDemoPage.editTaskFilterCloudComponent().setTaskName(simpleTask.entry.name);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(simpleTask.entry.name);
await editTaskFilter.setLastModifiedFrom(currentDate);
await editTaskFilter.setTaskName(simpleTask.entry.name);
await taskList.checkContentIsNotDisplayedByName(simpleTask.entry.name);
});
it('[C297485] Task is displayed when typing into lastModifiedTo field a date after the task CreatedDate', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedTo(afterDate);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(createdTask.entry.name);
await editTaskFilter.setLastModifiedTo(afterDate);
await taskList.checkContentIsDisplayedByName(createdTask.entry.name);
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedTo(beforeDate);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(createdTask.entry.name);
await editTaskFilter.setLastModifiedTo(beforeDate);
await taskList.checkContentIsNotDisplayedByName(createdTask.entry.name);
});
it('[C297690] Task is not displayed when typing into lastModifiedTo field the same date as tasks CreatedDate', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedTo(currentDate);
await tasksCloudDemoPage.editTaskFilterCloudComponent().setTaskName(simpleTask.entry.name);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(simpleTask.entry.name);
await editTaskFilter.setLastModifiedTo(currentDate);
await editTaskFilter.setTaskName(simpleTask.entry.name);
await taskList.checkContentIsNotDisplayedByName(simpleTask.entry.name);
});
it('[C297691] Task is not displayed when typing into lastModifiedFrom field a date before the task due date ' +
'and into lastModifiedTo a date before task due date', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedFrom(beforeDate);
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedTo(beforeDate);
await tasksCloudDemoPage.editTaskFilterCloudComponent().setTaskName(createdTask.entry.name);
await expect(await tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
await editTaskFilter.setLastModifiedFrom(beforeDate);
await editTaskFilter.setLastModifiedTo(beforeDate);
await editTaskFilter.setTaskName(createdTask.entry.name);
await expect(await taskList.getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
});
it('[C297692] Task is displayed when typing into lastModifiedFrom field a date before the tasks due date ' +
'and into lastModifiedTo a date after', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedFrom(beforeDate);
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedTo(afterDate);
await tasksCloudDemoPage.editTaskFilterCloudComponent().setTaskName(createdTask.entry.name);
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(createdTask.entry.name);
await editTaskFilter.setLastModifiedFrom(beforeDate);
await editTaskFilter.setLastModifiedTo(afterDate);
await editTaskFilter.setTaskName(createdTask.entry.name);
await taskList.checkContentIsDisplayedByName(createdTask.entry.name);
});
it('[C297693] Task is not displayed when typing into lastModifiedFrom field a date after the tasks due date ' +
'and into lastModifiedTo a date after', async () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedFrom(afterDate);
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedTo(afterDate);
await expect(await tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
await editTaskFilter.setLastModifiedFrom(afterDate);
await editTaskFilter.setLastModifiedTo(afterDate);
await expect(await taskList.getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
});
});
});