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,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
@@ -40,7 +39,7 @@ describe('Comment', () => {
|
||||
const commentsPage: CommentsPage = new CommentsPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const commentsApi = new CommentsApi(apiService.getInstance());
|
||||
|
||||
let userFullName, nodeId;
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
@@ -41,7 +40,7 @@ describe('Lock File', () => {
|
||||
|
||||
const adminUser = new UserModel();
|
||||
const managerUser = new UserModel();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const waitActions = new WaitActions(apiService);
|
||||
|
@@ -18,8 +18,7 @@
|
||||
import { PermissionsPage } from '../../content-services/pages/permissions.page';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BrowserActions, Logger,
|
||||
LoginPage,
|
||||
NotificationHistoryPage,
|
||||
@@ -41,7 +40,7 @@ import { GroupsApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Permissions Component', () => {
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const permissionsPage = new PermissionsPage();
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
ApiUtil,
|
||||
BrowserActions,
|
||||
LocalStorageUtil,
|
||||
@@ -48,7 +47,7 @@ describe('Share file', () => {
|
||||
|
||||
let acsUser: UserModel;
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const sharedLinksApi = new SharedlinksApi(apiService.getInstance());
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import { PermissionsPage } from '../../content-services/pages/permissions.page';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BrowserActions, Logger,
|
||||
LoginPage,
|
||||
NotificationHistoryPage, SearchService,
|
||||
@@ -40,7 +39,7 @@ import { NotificationDemoPage } from '../../core/pages/notification.page';
|
||||
|
||||
describe('Permissions Component', () => {
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const searchService = new SearchService(apiService);
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
LikePage,
|
||||
LoginPage,
|
||||
RatePage,
|
||||
@@ -41,7 +40,7 @@ describe('Social component', () => {
|
||||
const componentVisitor = new UserModel();
|
||||
const secondComponentVisitor = new UserModel();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
@@ -36,7 +35,7 @@ describe('Tag component', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
let acsUser: UserModel;
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const tagsApi = new TagsApi(apiService.getInstance());
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, LoginPage, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { TreeViewPage } from './../pages/tree-view.page';
|
||||
import { NodesApi } from '@alfresco/js-api';
|
||||
@@ -27,7 +27,7 @@ describe('Tree View Component', () => {
|
||||
const treeViewPage = new TreeViewPage();
|
||||
|
||||
let acsUser: UserModel;
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BrowserActions,
|
||||
ErrorPage,
|
||||
LoginPage,
|
||||
@@ -44,7 +43,7 @@ describe('Unshare file', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const shareDialog = new ShareDialogPage();
|
||||
|
||||
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,
|
||||
import { createApiService,
|
||||
LoginPage,
|
||||
NotificationHistoryPage,
|
||||
StringUtil,
|
||||
@@ -38,7 +37,7 @@ describe('Create folder directive', () => {
|
||||
const metadataViewPage = new MetadataViewPage();
|
||||
let acsUser: UserModel;
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
beforeAll(async () => {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, BrowserActions, LoginPage, StringUtil, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, BrowserActions, LoginPage, StringUtil, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { CreateLibraryDialogPage } from '../../core/pages/dialog/create-library-dialog.page';
|
||||
import { CustomSourcesPage } from '../../core/pages/custom-sources.page';
|
||||
@@ -29,7 +29,7 @@ describe('Create library directive', () => {
|
||||
const createLibraryDialog = new CreateLibraryDialogPage();
|
||||
const customSourcesPage = new CustomSourcesPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const visibility = {
|
||||
|
@@ -17,8 +17,7 @@
|
||||
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
PaginationPage,
|
||||
@@ -46,7 +45,7 @@ describe('Delete Directive', () => {
|
||||
const acsUser = new UserModel();
|
||||
const secondAcsUser = new UserModel();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const permissionActions = new PermissionActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
@@ -17,8 +17,7 @@
|
||||
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BrowserVisibility,
|
||||
FileBrowserUtil,
|
||||
LoginPage,
|
||||
@@ -64,7 +63,7 @@ describe('Version component actions', () => {
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_location
|
||||
});
|
||||
|
||||
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,
|
||||
LoginPage,
|
||||
NotificationHistoryPage,
|
||||
@@ -42,7 +41,7 @@ describe('Edit folder directive', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
ContentNodeSelectorDialogPage,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
@@ -42,7 +41,7 @@ describe('Favorite directive', () => {
|
||||
const trashcanPage = new TrashcanPage();
|
||||
const contentListPage = contentServicesPage.getDocumentList();
|
||||
const contentNodeSelector = new ContentNodeSelectorDialogPage();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const pdfFile = new FileModel({
|
||||
|
@@ -21,8 +21,7 @@ import { NodeEntry } from '@alfresco/js-api';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { TrashcanPage } from '../../core/pages/trashcan.page';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BreadcrumbPage,
|
||||
LoginPage,
|
||||
NotificationHistoryPage,
|
||||
@@ -44,7 +43,7 @@ describe('Restore content directive', () => {
|
||||
const breadCrumbPage = new BreadcrumbPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const waitActions = new WaitActions(apiService);
|
||||
|
||||
|
@@ -18,8 +18,7 @@
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
FileBrowserUtil,
|
||||
IdentityService,
|
||||
LoginPage,
|
||||
@@ -40,7 +39,7 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
const loginSsoPage = new LoginPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
|
||||
const apiService = new ApiService({ authType: 'OAUTH' });
|
||||
const apiService = createApiService({ authType: 'OAUTH' });
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const identityService = new IdentityService(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
ContentNodeSelectorDialogPage,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
@@ -37,7 +36,7 @@ describe('Document List Component - Actions', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const contentNodeSelector = new ContentNodeSelectorDialogPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { browser } from 'protractor';
|
||||
import { ApiService, LoginPage, StringUtil, UploadActions, UsersActions, ViewerPage } from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, StringUtil, UploadActions, UsersActions, ViewerPage } from '@alfresco/adf-testing';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import moment from 'moment-es6';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
@@ -30,7 +30,7 @@ describe('Document List Component', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BrowserActions,
|
||||
ContentNodeSelectorDialogPage,
|
||||
LoginPage,
|
||||
@@ -41,7 +40,7 @@ describe('Document List Component', () => {
|
||||
const contentNodeSelector = new ContentNodeSelectorDialogPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import { by, element } from 'protractor';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BreadcrumbPage,
|
||||
BreadcrumbDropdownPage,
|
||||
ContentNodeSelectorDialogPage,
|
||||
@@ -44,7 +43,7 @@ describe('Document List Component - Actions', () => {
|
||||
const breadCrumbPage = new BreadcrumbPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { browser } from 'protractor';
|
||||
import { ApiService, LoginPage, StringUtil, UploadActions, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, StringUtil, UploadActions, UsersActions } from '@alfresco/adf-testing';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
@@ -25,7 +25,7 @@ describe('Document List Component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
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,
|
||||
ArrayUtil,
|
||||
FileBrowserUtil,
|
||||
LocalStorageUtil,
|
||||
@@ -62,7 +61,7 @@ describe('Document List - Pagination', () => {
|
||||
const folderThreeModel = new FolderModel({ name: 'folderThree' });
|
||||
const numberOfSubFolders = 6;
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
import { browser } from 'protractor';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { ApiService, BrowserActions, ErrorPage, LoginPage, StringUtil, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, BrowserActions, ErrorPage, LoginPage, StringUtil, UsersActions } from '@alfresco/adf-testing';
|
||||
import { SitesApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Document List Component', () => {
|
||||
@@ -27,7 +27,7 @@ describe('Document List Component', () => {
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const errorPage = new ErrorPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let privateSite;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, DropActions, LoginPage, UploadActions, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, DropActions, LoginPage, UploadActions, UsersActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { browser } from 'protractor';
|
||||
@@ -28,7 +28,7 @@ describe('Document List Component - Properties', () => {
|
||||
const navigationBar = new NavigationBarPage();
|
||||
|
||||
let subFolder, parentFolder;
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
let acsUser = null;
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, LoginPage, PaginationPage, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, PaginationPage, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { FolderModel } from '../../models/ACS/folder.model';
|
||||
@@ -36,7 +36,7 @@ describe('Document List - Selection', () => {
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_location
|
||||
});
|
||||
const displayColumnName = 'Display name';
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
beforeAll(async () => {
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { browser } from 'protractor';
|
||||
import { ApiService, LoginPage, StringUtil, UploadActions, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, StringUtil, UploadActions, UsersActions } from '@alfresco/adf-testing';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
@@ -26,7 +26,7 @@ describe('Document List Component', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
let uploadedFolder, uploadedFolderExtra;
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
let acsUser = null;
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { ApiService, LoginPage, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { UploadDialogPage } from '../../core/pages/dialog/upload-dialog.page';
|
||||
import { UploadTogglesPage } from '../../core/pages/dialog/upload-toggles.page';
|
||||
@@ -24,7 +24,7 @@ import { FileModel } from '../../models/ACS/file.model';
|
||||
|
||||
describe('Upload component', async () => {
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const uploadDialog = new UploadDialogPage();
|
||||
const uploadToggles = new UploadTogglesPage();
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser, by, element } from 'protractor';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
DropActions,
|
||||
LocalStorageUtil,
|
||||
LoginPage,
|
||||
@@ -38,7 +37,7 @@ describe('Upload component - Excluded Files', () => {
|
||||
const uploadToggles = new UploadTogglesPage();
|
||||
const loginPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let acsUser: UserModel;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, LoginPage, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { UploadDialogPage } from '../../core/pages/dialog/upload-dialog.page';
|
||||
import { UploadTogglesPage } from '../../core/pages/dialog/upload-toggles.page';
|
||||
@@ -30,7 +30,7 @@ describe('Upload component', () => {
|
||||
const uploadToggles = new UploadTogglesPage();
|
||||
const loginPage = new LoginPage();
|
||||
const versionManagePage = new VersionManagePage();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
@@ -17,8 +17,7 @@
|
||||
|
||||
import { browser, by, element } from 'protractor';
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
DropActions,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
@@ -40,7 +39,7 @@ describe('Upload component', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { ApiService, LoginPage, NotificationHistoryPage, StringUtil, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, NotificationHistoryPage, StringUtil, UsersActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { UploadDialogPage } from '../../core/pages/dialog/upload-dialog.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
@@ -31,7 +31,7 @@ describe('Upload - User permission', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const emptyFile = new FileModel({
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BrowserActions,
|
||||
BrowserVisibility,
|
||||
FileBrowserUtil,
|
||||
@@ -40,7 +39,7 @@ describe('Version component actions', () => {
|
||||
const versionManagePage = new VersionManagePage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const uploadDialog = new UploadDialogPage();
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const viewerPage = new ViewerPage();
|
||||
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser, by, element } from 'protractor';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
LoginPage,
|
||||
NotificationHistoryPage,
|
||||
StringUtil,
|
||||
@@ -50,7 +49,7 @@ describe('Version component permissions', () => {
|
||||
const managerUser = new UserModel();
|
||||
const fileCreatorUser = new UserModel();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser, by, element } from 'protractor';
|
||||
import {
|
||||
ApiService,
|
||||
import { createApiService,
|
||||
BrowserVisibility,
|
||||
LoginPage,
|
||||
UploadActions,
|
||||
@@ -37,7 +36,7 @@ describe('Version Properties', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let acsUser: UserModel;
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { ApiService, LoginPage, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { VersionManagePage } from '../../core/pages/version-manager.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
@@ -30,7 +30,7 @@ describe('Version component', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const versionManagePage = new VersionManagePage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let acsUser: UserModel;
|
||||
|
Reference in New Issue
Block a user