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,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
LocalStorageUtil,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
@@ -42,7 +41,7 @@ describe('Search Checklist Component', () => {
|
||||
|
||||
const acsUser = new UserModel();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService, BrowserActions,
|
||||
import { createApiService, BrowserActions,
|
||||
DataTableComponentPage,
|
||||
DateUtil,
|
||||
LocalStorageUtil,
|
||||
@@ -56,7 +55,7 @@ describe('Search Number Range Filter', () => {
|
||||
});
|
||||
|
||||
let file2Bytes, file0Bytes;
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BrowserActions,
|
||||
LocalStorageUtil,
|
||||
LoginPage,
|
||||
@@ -42,7 +41,7 @@ describe('Search Radio Component', () => {
|
||||
const searchResults = new SearchResultsPage();
|
||||
|
||||
const acsUser = new UserModel();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService, BrowserActions,
|
||||
import { createApiService, BrowserActions,
|
||||
DataTableComponentPage,
|
||||
LocalStorageUtil,
|
||||
LoginPage,
|
||||
@@ -50,7 +49,7 @@ describe('Search Slider Filter', () => {
|
||||
});
|
||||
|
||||
let file2Bytes;
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
LocalStorageUtil,
|
||||
LoginPage,
|
||||
SearchSortingPickerPage,
|
||||
@@ -55,7 +54,7 @@ describe('Search Sorting Picker', () => {
|
||||
};
|
||||
|
||||
let pngA, pngD;
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
@@ -19,8 +19,7 @@ import { browser } from 'protractor';
|
||||
|
||||
import { FolderModel } from '../../models/ACS/folder.model';
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BrowserActions,
|
||||
LocalStorageUtil,
|
||||
LoginPage,
|
||||
@@ -44,7 +43,7 @@ describe('Search component - Text widget', () => {
|
||||
const searchBarPage = new SearchBarPage();
|
||||
const searchResultPage = new SearchResultsPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
|
||||
|
@@ -17,8 +17,7 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BrowserActions,
|
||||
LocalStorageUtil,
|
||||
LoginPage,
|
||||
@@ -57,7 +56,7 @@ describe('Search component - Search Bar', () => {
|
||||
const viewerPage = new ViewerPage();
|
||||
|
||||
const acsUser = new UserModel();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
|
@@ -20,8 +20,7 @@ import { SearchFiltersPage } from './pages/search-filters.page';
|
||||
import { SearchResultsPage } from './pages/search-results.page';
|
||||
import { FileModel } from '../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BrowserActions,
|
||||
DocumentListPage,
|
||||
LocalStorageUtil,
|
||||
@@ -46,7 +45,7 @@ describe('Search Filters', () => {
|
||||
const searchResults = new SearchResultsPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, LoginPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { SearchBarPage } from './pages/search-bar.page';
|
||||
import { SearchResultsPage } from './pages/search-results.page';
|
||||
@@ -32,7 +32,7 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
const searchFiltersPage = new SearchFiltersPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import { ApiService, LoginPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
|
||||
import { SearchBarPage } from './pages/search-bar.page';
|
||||
import { ContentServicesPage } from '../core/pages/content-services.page';
|
||||
@@ -46,7 +46,7 @@ describe('Search component - Search Page', () => {
|
||||
const searchResultPage = new SearchResultsPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
|
Reference in New Issue
Block a user