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:
Popovics András
2021-06-19 23:03:17 +02:00
committed by GitHub
parent 2d61a2941c
commit 1ecc14f184
354 changed files with 1699 additions and 1843 deletions
@@ -15,8 +15,7 @@
* limitations under the License.
*/
import {
ApiService,
import { createApiService,
CheckboxPage,
LocalStorageUtil,
LoginPage,
@@ -42,7 +41,7 @@ describe('Aspect oriented config', () => {
const modelOneName = 'modelOne', emptyAspectName = 'emptyAspect';
const defaultModel = 'cm', defaultEmptyPropertiesAspect = 'taggable', aspectName = 'Taggable';
const apiService = new ApiService();
const apiService = createApiService();
const usersActions = new UsersActions(apiService);
const nodesApi = new NodesApi(apiService.getInstance());
const customModelApi = new CustomModelApi(apiService.getInstance());
@@ -15,8 +15,7 @@
* limitations under the License.
*/
import {
ApiService,
import { createApiService,
BrowserActions,
LoginPage,
ModelActions,
@@ -35,7 +34,7 @@ import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { ContentServicesPage } from '../../core/pages/content-services.page';
describe('content type', () => {
const apiService = new ApiService();
const apiService = createApiService();
const usersActions = new UsersActions(apiService);
const modelActions = new ModelActions(apiService);
const uploadActions = new UploadActions(apiService);
@@ -15,8 +15,7 @@
* limitations under the License.
*/
import {
ApiService,
import { createApiService,
LoginPage,
StringUtil,
UploadActions,
@@ -60,7 +59,7 @@ describe('permissions', () => {
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
});
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,
CheckboxPage,
LoginPage,
UploadActions,
@@ -57,7 +56,7 @@ describe('CardView Component - properties', () => {
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
});
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,
BrowserActions,
LocalStorageUtil,
LoginPage,
@@ -63,7 +62,7 @@ describe('Metadata component', () => {
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
});
const apiService = new ApiService();
const apiService = createApiService();
const uploadActions = new UploadActions(apiService);
const usersActions = new UsersActions(apiService);