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:
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { ModelsActions, ApiService, ApplicationsUtil, LoginPage, UsersActions } from '@alfresco/adf-testing';
|
||||
import { ModelsActions, createApiService, ApplicationsUtil, LoginPage, UsersActions } from '@alfresco/adf-testing';
|
||||
import { ProcessServicesPage } from './../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -32,7 +32,7 @@ describe('Modify applications', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const processServicesPage = new ProcessServicesPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const modelActions = new ModelsActions(apiService);
|
||||
const apps = new ApplicationsUtil(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
ContentNodeSelectorDialogPage,
|
||||
ExternalNodeSelectorDialogPage,
|
||||
@@ -46,14 +45,14 @@ describe('Attach File - Content service', () => {
|
||||
const contentNodeSelector = new ContentNodeSelectorDialogPage();
|
||||
const externalNodeSelector = new ExternalNodeSelectorDialogPage();
|
||||
|
||||
const apiServiceExternal = new ApiService({
|
||||
const apiServiceExternal = createApiService({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_external_acs.host,
|
||||
authType: 'BASIC'
|
||||
});
|
||||
const usersActionsExternal = new UsersActions(apiServiceExternal);
|
||||
|
||||
const apiService = new ApiService({ provider: 'ALL' });
|
||||
const apiService = createApiService({ provider: 'ALL' });
|
||||
const integrationService = new IntegrationService(apiService);
|
||||
const applicationService = new ApplicationsUtil(apiService);
|
||||
const searchService = new SearchService(apiService);
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
UserModel,
|
||||
@@ -39,7 +38,7 @@ describe('Start Task - Task App', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationService = new ApplicationsUtil(apiService);
|
||||
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
ContentNodeSelectorDialogPage,
|
||||
IntegrationService,
|
||||
@@ -37,7 +36,7 @@ import CONSTANTS = require('../../util/constants');
|
||||
describe('Attach Folder', () => {
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP;
|
||||
|
||||
const apiService = new ApiService({ provider: 'ALL' });
|
||||
const apiService = createApiService({ provider: 'ALL' });
|
||||
const searchService = new SearchService(apiService);
|
||||
const integrationService = new IntegrationService(apiService);
|
||||
const applicationService = new ApplicationsUtil(apiService);
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
FormFields,
|
||||
LoginPage,
|
||||
@@ -41,7 +40,7 @@ describe('Attach Form Component', () => {
|
||||
const formFields = new FormFields();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationService = new ApplicationsUtil(apiService);
|
||||
const taskUtil = new TaskUtil(apiService);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, ApplicationsUtil, LoginPage, TaskUtil, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, TaskUtil, UsersActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from './../pages/tasks.page';
|
||||
import { ProcessServicesPage } from './../pages/process-services.page';
|
||||
import { ChecklistDialog } from './../pages/dialog/create-checklist-dialog.page';
|
||||
@@ -33,7 +33,7 @@ describe('Checklist component', () => {
|
||||
const checklistDialog = new ChecklistDialog();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationService = new ApplicationsUtil(apiService);
|
||||
const taskUtil = new TaskUtil(apiService);
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
DatePickerCalendarPage,
|
||||
DateUtil,
|
||||
@@ -38,7 +37,7 @@ describe('Dynamic Table', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const widget = new Widget();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const modelsActions = new ModelsActions(apiService);
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, FormPage, LoginPage, UsersActions, Widget } from '@alfresco/adf-testing';
|
||||
import { createApiService, FormPage, LoginPage, UsersActions, Widget } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Form Component', () => {
|
||||
@@ -25,7 +25,7 @@ describe('Form Component', () => {
|
||||
const formPage = new FormPage();
|
||||
const widget = new Widget();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let tenantId, user;
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
StartProcessPage,
|
||||
@@ -43,7 +42,7 @@ describe('Form widgets - People ', () => {
|
||||
const processServiceTabBarPage = new ProcessServiceTabBarPage();
|
||||
const widget = new Widget();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const taskFormsApi = new TaskFormsApi(apiService.getInstance());
|
||||
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
@@ -38,7 +37,7 @@ describe('Form widgets', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const widget = new Widget();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const applicationsService = new ApplicationsUtil(apiService);
|
||||
const taskFormsApi = new TaskFormsApi(apiService.getInstance());
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, ApplicationsUtil, LoginPage, TaskUtil, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, TaskUtil, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from './../pages/tasks.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { ProcessServicesPage } from './../pages/process-services.page';
|
||||
@@ -31,7 +31,7 @@ describe('People component', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const processServices = new ProcessServicesPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const taskUtil = new TaskUtil(apiService);
|
||||
const applicationUtil = new ApplicationsUtil(apiService);
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
StartProcessPage,
|
||||
@@ -47,7 +46,7 @@ describe('Stencil', () => {
|
||||
const processDetailsPage = new ProcessDetailsPage();
|
||||
const processFiltersPage = new ProcessFiltersPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let user: UserModel;
|
||||
|
Reference in New Issue
Block a user