mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Refactor e2e's ApiService (#7101)
* Refactor e2e's ApiService * Fix bits here and there * [ci:force] Remove unused imports * [ci:force] Extract shared part from adf-testing * [ci:force] Extract StringUtils as well * Make protractor's Logger not have duplicated code * [ci:force]
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, Application, AppListCloudPage, IdentityService, LocalStorageUtil, LoginPage } from '@alfresco/adf-testing';
|
||||
import { createApiService, Application, AppListCloudPage, IdentityService, LocalStorageUtil, LoginPage } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
@@ -27,7 +27,7 @@ describe('Applications list', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const appListCloudPage = new AppListCloudPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const applicationsService = new Application(apiService);
|
||||
const identityService = new IdentityService(apiService);
|
||||
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
AppListCloudPage,
|
||||
GroupIdentityService,
|
||||
IdentityService,
|
||||
@@ -40,7 +39,7 @@ describe('Edit process filters cloud', () => {
|
||||
const editProcessFilter = processCloudDemoPage.editProcessFilterCloudComponent();
|
||||
const processFilter = processCloudDemoPage.processFilterCloudComponent;
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
|
||||
|
@@ -18,8 +18,7 @@
|
||||
import { browser } from 'protractor';
|
||||
import {
|
||||
AppListCloudPage,
|
||||
StringUtil,
|
||||
ApiService,
|
||||
StringUtil, createApiService,
|
||||
LoginPage,
|
||||
TasksService,
|
||||
IdentityService,
|
||||
@@ -40,7 +39,7 @@ describe('Edit task filters cloud', () => {
|
||||
const editTaskFilter = tasksCloudDemoPage.editTaskFilterCloud;
|
||||
const taskFilter = tasksCloudDemoPage.taskFilterCloudComponent;
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
const tasksService = new TasksService(apiService);
|
||||
|
@@ -18,8 +18,7 @@
|
||||
import { browser } from 'protractor';
|
||||
import {
|
||||
LoginPage,
|
||||
TasksService,
|
||||
ApiService,
|
||||
TasksService, createApiService,
|
||||
AppListCloudPage,
|
||||
StringUtil,
|
||||
IdentityService,
|
||||
@@ -45,7 +44,7 @@ describe('Task counters cloud', () => {
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
const taskFilter = tasksCloudDemoPage.taskFilterCloudComponent;
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
const tasksService = new TasksService(apiService);
|
||||
|
@@ -18,8 +18,7 @@
|
||||
import { browser } from 'protractor';
|
||||
import {
|
||||
LoginPage,
|
||||
TasksService,
|
||||
ApiService,
|
||||
TasksService, createApiService,
|
||||
AppListCloudPage,
|
||||
StringUtil,
|
||||
IdentityService,
|
||||
@@ -42,7 +41,7 @@ describe('Task filters cloud', () => {
|
||||
const taskFilter = tasksCloudDemoPage.taskFilterCloudComponent;
|
||||
const taskList = tasksCloudDemoPage.taskListCloudComponent();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const queryService = new QueryService(apiService);
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
|
@@ -18,8 +18,7 @@
|
||||
import { browser } from 'protractor';
|
||||
import {
|
||||
AppListCloudPage,
|
||||
StringUtil,
|
||||
ApiService,
|
||||
StringUtil, createApiService,
|
||||
LoginPage,
|
||||
TasksService,
|
||||
ProcessDefinitionsService,
|
||||
@@ -51,8 +50,8 @@ describe('Task form cloud component', () => {
|
||||
const candidateBaseApp = browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name;
|
||||
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||
const completedTaskName = StringUtil.generateRandomString(), assignedTaskName = StringUtil.generateRandomString();
|
||||
const apiService = new ApiService();
|
||||
const apiServiceHrUser = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const apiServiceHrUser = createApiService();
|
||||
|
||||
const visibilityConditionTasks = [];
|
||||
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser, protractor } from 'protractor';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
AppListCloudPage,
|
||||
LoginPage,
|
||||
ProcessCloudWidgetPage,
|
||||
@@ -55,7 +54,7 @@ describe('Task form cloud component', () => {
|
||||
const taskFormCloudComponent = new TaskFormCloudComponent();
|
||||
const widget = new ProcessCloudWidgetPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const tasksService = new TasksService(apiService);
|
||||
const queryService = new QueryService(apiService);
|
||||
const processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
AppListCloudPage,
|
||||
GroupIdentityService,
|
||||
IdentityService,
|
||||
@@ -53,7 +52,7 @@ describe('Task Header cloud component', () => {
|
||||
const peopleCloudComponentPage = new PeopleCloudComponentPage();
|
||||
const taskHeaderCloudPage = new TaskHeaderCloudPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
const tasksService = new TasksService(apiService);
|
||||
|
@@ -18,7 +18,7 @@
|
||||
import { browser } from 'protractor';
|
||||
import {
|
||||
StringUtil, TasksService,
|
||||
LoginPage, ApiService,
|
||||
LoginPage, createApiService,
|
||||
AppListCloudPage, LocalStorageUtil, IdentityService, GroupIdentityService
|
||||
} from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
@@ -40,7 +40,7 @@ describe('Edit task filters and task list properties', () => {
|
||||
const taskFilter = tasksCloudDemoPage.taskFilterCloudComponent;
|
||||
const taskList = tasksCloudDemoPage.taskListCloudComponent();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
const tasksService = new TasksService(apiService);
|
||||
|
@@ -19,7 +19,7 @@ import { browser } from 'protractor';
|
||||
import {
|
||||
StringUtil, TasksService,
|
||||
ProcessDefinitionsService, ProcessInstancesService,
|
||||
LoginPage, ApiService,
|
||||
LoginPage, createApiService,
|
||||
AppListCloudPage, LocalStorageUtil, IdentityService, GroupIdentityService, DateUtil
|
||||
} from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
@@ -42,7 +42,7 @@ describe('Edit task filters and task list properties', () => {
|
||||
const taskFilter = tasksCloudDemoPage.taskFilterCloudComponent;
|
||||
const taskList = tasksCloudDemoPage.taskListCloudComponent();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
const tasksService = new TasksService(apiService);
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
AppListCloudPage,
|
||||
GroupIdentityService,
|
||||
IdentityService,
|
||||
@@ -40,7 +39,7 @@ describe('Task list cloud - selection', () => {
|
||||
const tasksCloudDemoPage = new TasksCloudDemoPage();
|
||||
const taskFilter = tasksCloudDemoPage.taskFilterCloudComponent;
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
const tasksService = new TasksService(apiService);
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
AppListCloudPage,
|
||||
GroupIdentityService,
|
||||
IdentityService,
|
||||
@@ -52,7 +51,7 @@ describe('Task claim/release', () => {
|
||||
const taskHeaderCloudPage = new TaskHeaderCloudPage();
|
||||
const taskFormCloudComponent = new TaskFormCloudComponent();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||
const processInstancesService = new ProcessInstancesService(apiService);
|
||||
const identityService = new IdentityService(apiService);
|
||||
|
@@ -23,8 +23,7 @@ import {
|
||||
QueryService,
|
||||
ProcessDefinitionsService,
|
||||
ProcessInstancesService,
|
||||
LoginPage,
|
||||
ApiService,
|
||||
LoginPage, createApiService,
|
||||
IdentityService,
|
||||
GroupIdentityService,
|
||||
AppListCloudPage, TaskListCloudComponentPage
|
||||
@@ -46,7 +45,7 @@ describe('Task filters cloud', () => {
|
||||
const editTaskFilter = tasksCloudDemoPage.editTaskFilterCloud;
|
||||
const taskList = new TaskListCloudComponentPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
const tasksService = new TasksService(apiService);
|
||||
|
Reference in New Issue
Block a user