diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000000..35275aa1fa
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,5 @@
+{
+ "singleQuote": true,
+ "trailingComma": "none",
+ "printWidth": 150
+}
diff --git a/demo-shell/resources/i18n/en.json b/demo-shell/resources/i18n/en.json
index 5359e1634e..0ca6f07a18 100644
--- a/demo-shell/resources/i18n/en.json
+++ b/demo-shell/resources/i18n/en.json
@@ -52,7 +52,6 @@
},
"PERSONAL-FILES": "Personal Files",
"WARN-MULTIPLE-UPLOADS": "Display warning for multiple uploads.",
- "CUSTOM-PERMISSION-MESSAGE": "Enable custom permission message",
"MEDIUM-TIME-FORMAT": "Enable medium time format for document list",
"SEARCH": {
"RADIO": {
@@ -160,12 +159,6 @@
"DESCRIPTION_UPLOAD": "Enable upload",
"ENABLE_INFINITE_SCROLL": "Enable Infinite Scrolling",
"MULTISELECT_DESCRIPTION": "Use Cmd (Mac) or Ctrl (Windows) to toggle selection of multiple items",
- "RECENT": {
- "EMPTY_STATE": {
- "TITLE": "Recent Files list is empty"
- },
- "TITLE": "Recent Files"
- },
"COLUMNS": {
"DISPLAY_NAME": "Display name",
"IS_LOCKED": "Lock",
@@ -179,6 +172,8 @@
"DELETED_BY": "Deleted by"
},
"TOOLBAR": {
+ "TOGGLE_DISPLAY_MODE": "Toggle display mode",
+ "TOGGLE_METADATA": "Toggle metadata",
"CARDVIEW": "Card view mode",
"SHARE_EDIT": "Edit settings",
"NEW_FOLDER": "New folder",
@@ -187,10 +182,6 @@
"DELETE": "Delete",
"FAVORITES": "Add to favorites",
"SHARE": "Share",
- "THEME": "Select a theme",
- "SHOW_VERSION": "Show version",
- "HIDE_VERSION": "Hide version",
- "LISTVIEW": "List view mode",
"CREATE_LIBRARY": "Create Library"
},
"ACTIONS": {
@@ -208,8 +199,7 @@
"DOCUMENT": {
"COPY": "Copy",
"MOVE": "Move",
- "DELETE": "Delete",
- "PROCESS_ACTION": "Start Process"
+ "DELETE": "Delete"
}
}
},
diff --git a/demo-shell/src/app/components/files/files.component.html b/demo-shell/src/app/components/files/files.component.html
index cae5b72aea..12e9b45969 100644
--- a/demo-shell/src/app/components/files/files.component.html
+++ b/demo-shell/src/app/components/files/files.component.html
@@ -1,33 +1,4 @@
-
-
-
-
-
- {{ 'DOCUMENT_LIST.RECENT.TITLE' | translate }}
- history
-
-
-
-
-
-
-
history
-
{{ 'DOCUMENT_LIST.RECENT.EMPTY_STATE.TITLE' | translate}}
-
-
-
-
-
-
@@ -51,7 +22,7 @@
{{errorMessage}}
-
+
- view_comfy
-
- list
-
+ list
-
-
-
-
-
-
-
-
-
-
-
+
view_comfy
list
{{ 'DOCUMENT_LIST.TOOLBAR.CARDVIEW' | translate }}
@@ -243,9 +186,6 @@
(name-click)="documentList.onNodeDblClick($any($event).detail?.node)"
(filterSelection)="onFilterSelected($event)">
-
- You don't have permissions
-
{{ 'SEARCH.NO_RESULT' | translate }}
@@ -278,15 +218,6 @@
[formatTooltip]="getNodeNameTooltip"
class="app-ellipsis-cell adf-expand-cell-5">
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
Current folder ID: {{ documentList.currentFolderId }}
@@ -546,7 +431,7 @@
-
+
{{'DOCUMENT_LIST.MULTIPLE_FILE_UPLOAD' | translate}}
@@ -613,12 +498,6 @@
-
-
- {{'APP.CUSTOM-PERMISSION-MESSAGE' | translate}}
-
-
-
{{'APP.MEDIUM-TIME-FORMAT' | translate}}
@@ -639,21 +518,6 @@
-
-
-
-
diff --git a/demo-shell/src/app/components/files/files.component.scss b/demo-shell/src/app/components/files/files.component.scss
index cc2a02ffc9..3d85ae9c4d 100644
--- a/demo-shell/src/app/components/files/files.component.scss
+++ b/demo-shell/src/app/components/files/files.component.scss
@@ -103,22 +103,3 @@
line-height: 1.33;
letter-spacing: -1px;
}
-
-.app-container-recent {
- mat-icon {
- margin-left: 20px;
- }
-
- .app-empty-list__block {
- height: 100%;
- padding: 0;
- margin: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-}
-
-.adf-preselect-nodes-input {
- width: 100%;
-}
diff --git a/demo-shell/src/app/components/files/files.component.ts b/demo-shell/src/app/components/files/files.component.ts
index 27f27c2a2c..fe3487a22a 100644
--- a/demo-shell/src/app/components/files/files.component.ts
+++ b/demo-shell/src/app/components/files/files.component.ts
@@ -37,20 +37,15 @@ import {
Pagination,
MinimalNodeEntryEntity,
SiteEntry,
- SearchEntry,
- NodeEntry
+ SearchEntry
} from '@alfresco/js-api';
import {
- AlfrescoApiService,
- AuthenticationService,
AppConfigService,
AppConfigValues,
- LogService,
NotificationService,
DataRow,
UserPreferencesService,
PaginationComponent,
- FormValues,
DisplayMode,
ShowHeaderMode,
InfinitePaginationComponent,
@@ -73,15 +68,12 @@ import {
NodesApiService,
SharedLinksApiService
} from '@alfresco/adf-content-services';
-
-import { SelectAppsDialogComponent, ProcessFormRenderingService } from '@alfresco/adf-process-services';
-
+import { ProcessFormRenderingService } from '@alfresco/adf-process-services';
import { VersionManagerDialogAdapterComponent } from './version-manager-dialog-adapter.component';
import { MetadataDialogAdapterComponent } from './metadata-dialog-adapter.component';
import { Subject } from 'rxjs';
import { PreviewService } from '../../services/preview.service';
import { takeUntil, debounceTime, scan } from 'rxjs/operators';
-import { ThemePalette } from '@angular/material/core';
const DEFAULT_FOLDER_TO_SHOW = '-my-';
@@ -110,8 +102,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
this.appConfig.get(AppConfigValues.BASESHAREURL) ||
this.appConfig.get(AppConfigValues.ECMHOST)) + '/preview/s/';
- toolbarColor: ThemePalette;
-
selectionModes = [
{value: 'none', viewValue: 'None'},
{value: 'single', viewValue: 'Single'},
@@ -122,10 +112,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
@Input()
currentFolderId: string = DEFAULT_FOLDER_TO_SHOW;
- formValues: FormValues = {};
-
- processId;
-
@Input()
sorting = ['name', 'ASC'];
@@ -240,18 +226,13 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
permissionsStyle: PermissionStyleModel[] = [];
infiniteScrolling: boolean;
stickyHeader: boolean;
- preselectNodes: boolean;
warnOnMultipleUploads = false;
thumbnails = false;
- noHeaderMode = ShowHeaderMode.Never;
- enableCustomPermissionMessage = false;
enableMediumTimeFormat = false;
displayEmptyMetadata = false;
hyperlinkNavigation = false;
- selectedNodes = [];
-
- enableDownloadPrompt: boolean = this.appConfig.get('viewer.enableDownloadPrompt', false);
+ enableDownloadPrompt = this.appConfig.get('viewer.enableDownloadPrompt', false);
enableDownloadPromptReminder: boolean = this.appConfig.get('viewer.enableDownloadPromptReminders', false);
downloadPromptDelay = this.appConfig.get('viewer.downloadPromptDelay', 50);
downloadPromptReminderDelay = this.appConfig.get('viewer.downloadPromptReminderDelay', 30);
@@ -264,13 +245,10 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
private dialog: MatDialog,
private location: Location,
private router: Router,
- private logService: LogService,
private appConfig: AppConfigService,
private preference: UserPreferencesService,
private preview: PreviewService,
@Optional() private route: ActivatedRoute,
- public authenticationService: AuthenticationService,
- public alfrescoApiService: AlfrescoApiService,
private contentMetadataService: ContentMetadataService,
private sharedLinksApiService: SharedLinksApiService,
private dialogAspectListService: DialogAspectListService,
@@ -284,12 +262,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
}
}
- toggleFolder() {
- this.multipleFileUpload = false;
- this.folderUpload = !this.folderUpload;
- return this.folderUpload;
- }
-
toggleThumbnails() {
this.thumbnails = !this.thumbnails;
this.documentList.reload();
@@ -327,19 +299,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
takeUntil(this.onDestroy$)
)
.subscribe((value: any[]) => {
- let selectedNodes: NodeEntry[] = [];
-
- if (this.preselectNodes) {
- if (value && value.length > 0) {
- if (this.selectionMode === 'single') {
- selectedNodes = [...[value[value.length - 1]].map((uploadedFile) => uploadedFile.data)];
- } else {
- selectedNodes = [...value.map((uploadedFile) => uploadedFile.data)];
- }
- this.selectedNodes = [...selectedNodes];
- }
- }
-
this.onFileUploadEvent(value[0]);
});
@@ -421,15 +380,12 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
}
onFolderCreated(event: FolderCreatedEvent) {
- this.logService.log('FOLDER CREATED');
- this.logService.log(event);
if (event && event.parentId === this.documentList.currentFolderId) {
this.documentList.reload();
}
}
onFolderAction(node) {
- this.logService.log(node);
if (node && node.parentId === this.documentList.currentFolderId) {
this.documentList.reload();
}
@@ -459,10 +415,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
this.documentListReady.emit(event);
}
- pageIsEmpty(node: NodePaging) {
- return node && node.list && node.list.entries.length === 0;
- }
-
onContentActionError(errors: any) {
const errorStatusCode = JSON.parse(errors.message).error.statusCode;
let message: string;
@@ -582,24 +534,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
return false;
}
- startProcessAction($event: any) {
- this.formValues['file'] = $event.value.entry;
-
- const dialogRef = this.dialog.open(SelectAppsDialogComponent, {
- width: '630px',
- panelClass: 'adf-version-manager-dialog'
- });
-
- dialogRef.afterClosed().subscribe((selectedProcess) => {
- this.processId = selectedProcess.id;
- });
-
- }
-
- closeStartProcess() {
- this.processId = null;
- }
-
onChangePageSize(event: Pagination): void {
this.preference.paginationSize = event.maxItems;
this.pagination.maxItems = event.maxItems;
@@ -619,12 +553,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
this.turnedNextPage.emit(event);
}
- loadNextBatch(event: Pagination): void {
- this.pagination.maxItems = event.maxItems;
- this.pagination.skipCount = event.skipCount;
- this.loadNext.emit(event);
- }
-
onPrevPage(event: Pagination): void {
this.pagination.maxItems = event.maxItems;
this.pagination.skipCount = event.skipCount;
@@ -646,10 +574,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
this.infinitePaginationComponent.reset();
}
- canDownloadNode(node: MinimalNodeEntity): boolean {
- return node && node.entry && node.entry.name === 'custom';
- }
-
onBeginUpload(event: UploadFilesEvent) {
if (this.warnOnMultipleUploads && event) {
const files = event.files || [];
@@ -673,14 +597,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
}
}
- isCustomActionDisabled(node: MinimalNodeEntity): boolean {
- return !(node && node.entry && node.entry.name === 'custom');
- }
-
- runCustomAction(event: any) {
- this.logService.log(event);
- }
-
onUploadNewVersion(ev) {
const contentEntry = ev.detail.data.node.entry;
const showComments = this.showVersionComments;
@@ -758,32 +674,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
this.documentList.reload();
}
- setPreselectNodes(nodes: string) {
- this.selectedNodes = this.getArrayFromString(nodes);
- this.documentList.reload();
- }
-
- isStringArray(str: string): boolean {
- try {
- const result = JSON.parse(str);
- return Array.isArray(result);
- } catch (e) {
- return false;
- }
- }
-
- private getArrayFromString(value: string): T[] {
- if (this.isStringArray(value)) {
- return JSON.parse(value);
- } else {
- return [];
- }
- }
-
- onMultipleFilesUpload() {
- this.selectedNodes = [];
- }
-
onEnableDownloadPrompt() {
const previewConfig = this.appConfig?.config['viewer'];
previewConfig['enableDownloadPrompt'] = this.enableDownloadPrompt;
@@ -813,5 +703,4 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
const previewConfig = this.appConfig?.config['viewer'];
previewConfig['fileAutoDownloadSizeThresholdInMB'] = this.fileAutoDownloadSizeThresholdInMB;
}
-
}
diff --git a/e2e/content-services/document-list/document-list-permissions.e2e.ts b/e2e/content-services/document-list/document-list-permissions.e2e.ts
index dffdd453ec..8222ed0cec 100644
--- a/e2e/content-services/document-list/document-list-permissions.e2e.ts
+++ b/e2e/content-services/document-list/document-list-permissions.e2e.ts
@@ -16,7 +16,6 @@
*/
import { browser } from 'protractor';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { createApiService, BrowserActions, ErrorPage, LoginPage, StringUtil, UsersActions } from '@alfresco/adf-testing';
import { SitesApi } from '@alfresco/js-api';
@@ -24,7 +23,6 @@ import { SitesApi } from '@alfresco/js-api';
describe('Document List Component', () => {
const loginPage = new LoginPage();
- const contentServicesPage = new ContentServicesPage();
const errorPage = new ErrorPage();
const navigationBarPage = new NavigationBarPage();
const apiService = createApiService();
@@ -61,12 +59,5 @@ describe('Document List Component', () => {
await expect(await errorPage.getErrorCode()).toBe('403');
await expect(await errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
});
-
- it('[C279924] Should display custom message when accessing a file without permissions', async () => {
- await contentServicesPage.goToDocumentList();
- await contentServicesPage.enableCustomPermissionMessage();
- await BrowserActions.getUrl(browser.baseUrl + '/files/' + privateSite.entry.guid);
- await expect(await errorPage.getErrorCode()).toBe('403');
- });
});
});
diff --git a/e2e/content-services/document-list/document-list-thumbnails-tooltips.e2e.ts b/e2e/content-services/document-list/document-list-thumbnails-tooltips.e2e.ts
index ac75a81767..bb69e9a92a 100644
--- a/e2e/content-services/document-list/document-list-thumbnails-tooltips.e2e.ts
+++ b/e2e/content-services/document-list/document-list-thumbnails-tooltips.e2e.ts
@@ -25,35 +25,13 @@ describe('Document List Component', () => {
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
- let uploadedFolder; let uploadedFolderExtra;
const apiService = createApiService();
const uploadActions = new UploadActions(apiService);
let acsUser = null;
- let testFileNode; let pdfBFileNode;
const navigationBarPage = new NavigationBarPage();
const usersActions = new UsersActions(apiService);
- afterEach(async () => {
- await apiService.loginWithProfile('admin');
- if (uploadedFolder) {
- await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id);
- uploadedFolder = null;
- }
- if (uploadedFolderExtra) {
- await uploadActions.deleteFileOrFolder(uploadedFolderExtra.entry.id);
- uploadedFolderExtra = null;
- }
- if (testFileNode) {
- await uploadActions.deleteFileOrFolder(testFileNode.entry.id);
- testFileNode = null;
- }
- if (pdfBFileNode) {
- await uploadActions.deleteFileOrFolder(pdfBFileNode.entry.id);
- pdfBFileNode = null;
- }
- });
-
describe('Thumbnails and tooltips', () => {
const pdfFile = new FileModel({
name: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
diff --git a/e2e/core/pages/content-services.page.ts b/e2e/core/pages/content-services.page.ts
index d5cbfcb56e..005f52605f 100644
--- a/e2e/core/pages/content-services.page.ts
+++ b/e2e/core/pages/content-services.page.ts
@@ -49,7 +49,6 @@ export class ContentServicesPage {
multipleFileUploadToggle = $('#adf-document-list-enable-drop-files');
uploadBorder = $('#document-list-container');
- contentServices = $('.app-sidenav-link[data-automation-id="Content Services"]');
currentFolder = $('div[class*="adf-breadcrumb-item adf-active"] div');
createFolderButton = $('button[data-automation-id="create-new-folder"]');
editFolderButton = $('button[data-automation-id="edit-folder"]');
@@ -60,20 +59,14 @@ export class ContentServicesPage {
uploadFileButtonInput = $('input[data-automation-id="upload-single-file"]');
uploadMultipleFileButton = $('input[data-automation-id="upload-multiple-files"]');
uploadFolderButton = $('input[data-automation-id="uploadFolder"]');
- errorSnackBar = $('simple-snack-bar[class*="mat-simple-snackbar"]');
emptyPagination = $('adf-pagination[class*="adf-pagination__empty"]');
dragAndDrop = $$('adf-upload-drag-area div').first();
nameHeader = $$('div[data-automation-id="auto_header_content_id_name"] > span').first();
sizeHeader = $$('div[data-automation-id="auto_header_content_id_content.sizeInBytes"] > span').first();
createdByHeader = $$('div[data-automation-id="auto_header_content_id_createdByUser.displayName"] > span').first();
createdHeader = $$('div[data-automation-id="auto_header_content_id_createdAt"] > span').first();
- recentFiles = $('.app-container-recent');
- recentFilesExpanded = $('.app-container-recent mat-expansion-panel-header.mat-expanded');
- recentFilesClosed = $('.app-container-recent mat-expansion-panel-header');
- recentFileIcon = $('.app-container-recent mat-expansion-panel-header mat-icon');
emptyFolder = $('.adf-empty-folder-this-space-is-empty');
emptyFolderImage = $('.adf-empty-folder-image');
- emptyRecent = $('.app-container-recent .app-empty-list__title');
gridViewButton = $('button[data-automation-id="document-list-grid-view"]');
cardViewContainer = $('div.app-document-list-container div.adf-datatable-card');
shareNodeButton = element(by.cssContainingText('mat-icon', ' share '));
@@ -234,36 +227,6 @@ export class ContentServicesPage {
return sorted;
}
- async checkRecentFileToBeShowed() {
- await BrowserVisibility.waitUntilElementIsVisible(this.recentFiles);
- }
-
- async expandRecentFiles(): Promise {
- await this.checkRecentFileToBeShowed();
- await this.checkRecentFileToBeClosed();
- await BrowserActions.click(this.recentFilesClosed);
- await this.checkRecentFileToBeOpened();
- }
-
- async closeRecentFiles(): Promise {
- await this.checkRecentFileToBeShowed();
- await this.checkRecentFileToBeOpened();
- await BrowserActions.click(this.recentFilesExpanded);
- await this.checkRecentFileToBeClosed();
- }
-
- async checkRecentFileToBeClosed(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.recentFilesClosed);
- }
-
- async checkRecentFileToBeOpened(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.recentFilesExpanded);
- }
-
- async getRecentFileIcon(): Promise {
- return BrowserActions.getText(this.recentFileIcon);
- }
-
// @deprecated prefer waitTillContentLoaded
async checkDocumentListElementsAreDisplayed(): Promise {
await this.checkAcsContainer();
@@ -286,10 +249,6 @@ export class ContentServicesPage {
await this.contentList.dataTablePage().waitTillContentLoaded();
}
- async clickOnContentServices(): Promise {
- await BrowserActions.click(this.contentServices);
- }
-
async numberOfResultsDisplayed(): Promise {
return this.contentList.dataTablePage().numberOfRows();
}
@@ -331,10 +290,6 @@ export class ContentServicesPage {
return this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.createdBy);
}
- async checkListIsSortedBySizeColumn(sortOrder: string): Promise {
- return this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.size);
- }
-
async sortAndCheckListIsOrderedByAuthor(sortOrder: string): Promise {
await this.sortByAuthor(sortOrder);
return this.checkListIsSortedByAuthorColumn(sortOrder);
@@ -460,11 +415,6 @@ export class ContentServicesPage {
return BrowserActions.getAttribute(this.uploadMultipleFileButton, 'title');
}
- async getFolderButtonTooltip(): Promise {
- await BrowserVisibility.waitUntilElementIsPresent(this.uploadFolderButton);
- return BrowserActions.getAttribute(this.uploadFolderButton, 'title');
- }
-
async checkUploadButton(): Promise {
await BrowserVisibility.waitUntilElementIsClickable(this.uploadFileButton);
}
@@ -473,20 +423,11 @@ export class ContentServicesPage {
return this.uploadFileButton.isEnabled();
}
- async getErrorMessage(): Promise {
- return BrowserActions.getText(this.errorSnackBar);
- }
-
async enableInfiniteScrolling(): Promise {
const infiniteScrollButton = element(by.cssContainingText('.mat-slide-toggle-content', 'Enable Infinite Scrolling'));
await BrowserActions.click(infiniteScrollButton);
}
- async enableCustomPermissionMessage(): Promise {
- const customPermissionMessage = element(by.cssContainingText('.mat-slide-toggle-content', 'Enable custom permission message'));
- await BrowserActions.click(customPermissionMessage);
- }
-
async enableMediumTimeFormat(): Promise {
const mediumTimeFormat = $('#enableMediumTimeFormat');
await BrowserActions.click(mediumTimeFormat);
@@ -532,11 +473,6 @@ export class ContentServicesPage {
await DropActions.dropFile(this.dragAndDrop, file);
}
- async dragAndDropFolder(folderName: string): Promise {
- await this.checkDragAndDropDIsDisplayed();
- await DropActions.dropFolder(this.dragAndDrop, folderName);
- }
-
async checkLockIsDisplayedForElement(name): Promise {
const lockButton = $(`div.adf-datatable-cell[data-automation-id="${name}"] button`);
await BrowserVisibility.waitUntilElementIsVisible(lockButton);
@@ -546,12 +482,6 @@ export class ContentServicesPage {
return this.contentList.dataTablePage().getColumnValueForRow(this.columns.name, file, columnName);
}
- async getStyleValueForRowText(rowName, styleName): Promise {
- const row = $(`div.adf-datatable-cell[data-automation-id="${rowName}"] span.adf-datatable-cell-value[title="${rowName}"]`);
- await BrowserVisibility.waitUntilElementIsVisible(row);
- return row.getCssValue(styleName);
- }
-
async checkEmptyFolderTextToBe(text): Promise {
await BrowserVisibility.waitUntilElementIsVisible(this.emptyFolder);
await expect(await this.emptyFolder.getText()).toContain(text);
@@ -561,10 +491,6 @@ export class ContentServicesPage {
await expect(await BrowserActions.getAttribute(this.emptyFolderImage, 'src')).toContain(url);
}
- async checkEmptyRecentFileIsDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.emptyRecent);
- }
-
async getRowIconImageUrl(fileName): Promise {
const iconRow = $(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`);
return BrowserActions.getAttribute(iconRow, 'src');
diff --git a/e2e/core/pages/data-table.page.ts b/e2e/core/pages/data-table.page.ts
index dbe61c31da..4954400da7 100644
--- a/e2e/core/pages/data-table.page.ts
+++ b/e2e/core/pages/data-table.page.ts
@@ -33,18 +33,10 @@ export class DataTablePage {
};
dataTable: DataTableComponentPage;
- multiSelect = $(`div[data-automation-id='multiselect'] label > .mat-checkbox-inner-container`);
reset = element(by.xpath(`//span[contains(text(),'Reset to default')]/..`));
allSelectedRows = $$(`adf-datatable-row[class*='is-selected']`);
selectedRowNumber = $(`adf-datatable-row[class*='is-selected'] div[data-automation-id*='text_']`);
- selectAll = $(`div[class*='header'] label`);
- addRowElement = element(by.xpath(`//span[contains(text(),'Add row')]/..`));
- replaceRowsElement = element(by.xpath(`//span[contains(text(),'Replace rows')]/..`));
- replaceColumnsElement = element(by.xpath(`//span[contains(text(),'Replace columns')]/..`));
- createdOnColumn = $(`div[data-automation-id='auto_id_createdOn']`);
idColumnHeader = $(`div[data-automation-id='auto_id_id']`);
- pasteClipboardInput = $(`input[data-automation-id='paste clipboard input']`);
-
selectModeDropdown = new DropdownPage($(`mat-select[data-automation-id='datatable-selection-mode']`));
constructor(data?) {
@@ -55,35 +47,6 @@ export class DataTablePage {
}
}
- async insertFilter(filterText: string): Promise {
- const inputFilter = $(`#adf-datatable-filter-input`);
- await BrowserActions.clearSendKeys(inputFilter, filterText);
- }
-
- async addRow(): Promise {
- await BrowserActions.click(this.addRowElement);
- }
-
- async replaceRows(id: string): Promise {
- const rowID = this.dataTable.getCellElementByValue(this.columns.id, id);
- await BrowserVisibility.waitUntilElementIsVisible(rowID);
- await BrowserActions.click(this.replaceRowsElement);
- await BrowserVisibility.waitUntilElementIsNotVisible(rowID);
- }
-
- async replaceColumns(): Promise {
- await BrowserActions.click(this.replaceColumnsElement);
- await BrowserVisibility.waitUntilElementIsNotVisible(this.createdOnColumn);
- }
-
- async clickMultiSelect(): Promise {
- await BrowserActions.click(this.multiSelect);
- }
-
- async clickReset(): Promise {
- await BrowserActions.click(this.reset);
- }
-
async checkRowIsNotSelected(rowNumber: string): Promise {
const isRowSelected = this.dataTable.getCellElementByValue(this.columns.id, rowNumber)
.element(by.xpath(`ancestor::adf-datatable-row[contains(@class, 'adf-datatable-row custom-row-style ng-star-inserted is-selected')]`));
@@ -94,29 +57,10 @@ export class DataTablePage {
await BrowserVisibility.waitUntilElementIsNotVisible(this.selectedRowNumber);
}
- async checkAllRows(): Promise {
- await BrowserActions.click(this.selectAll);
- }
-
- async checkRowIsChecked(rowNumber: string): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.getRowCheckbox(rowNumber));
- }
-
- async checkRowIsNotChecked(rowNumber: string): Promise {
- await BrowserVisibility.waitUntilElementIsNotVisible(this.getRowCheckbox(rowNumber));
- }
-
async getNumberOfSelectedRows(): Promise {
return this.allSelectedRows.count();
}
- async clickCheckbox(rowNumber: string): Promise {
- await BrowserActions.closeMenuAndDialogs();
- const checkbox = this.dataTable.getCellElementByValue(this.columns.id, rowNumber)
- .element(by.xpath(`ancestor::adf-datatable-row[contains(@class, 'adf-datatable-row')]//mat-checkbox/label`));
- await BrowserActions.click(checkbox);
- }
-
async selectRow(rowNumber: string): Promise {
const row = this.dataTable.getCellElementByValue(this.columns.id, rowNumber);
await BrowserActions.click(row);
@@ -132,32 +76,6 @@ export class DataTablePage {
await this.selectModeDropdown.selectDropdownOption(selectionMode);
}
- getRowCheckbox(rowNumber: string): ElementFinder {
- return this.dataTable.getCellElementByValue(this.columns.id, rowNumber).element(by.xpath(`ancestor::adf-datatable-row/div/mat-checkbox[contains(@class, 'mat-checkbox-checked')]`));
- }
-
- async getCopyContentTooltip(): Promise {
- return this.dataTable.getCopyContentTooltip();
- }
-
- async mouseOverNameColumn(name: string): Promise {
- await this.dataTable.mouseOverColumn(this.columns.name, name);
- }
-
- async mouseOverCreatedByColumn(name: string): Promise {
- await this.dataTable.mouseOverColumn(this.columns.createdBy, name);
- }
-
- async mouseOverIdColumn(name: string): Promise {
- await this.dataTable.mouseOverColumn(this.columns.id, name);
- }
-
- async mouseOverJsonColumn(rowNumber: number): Promise {
- const cell = this.dataTable.getCellByRowNumberAndColumnName(rowNumber - 1, this.columns.json);
- await BrowserVisibility.waitUntilElementIsVisible(cell);
- await browser.actions().mouseMove(cell).perform();
- }
-
getDropTargetIdColumnCell(rowNumber: number): ElementFinder {
return this.dataTable.getCellByRowNumberAndColumnName(rowNumber - 1, this.columns.id);
}
@@ -165,31 +83,4 @@ export class DataTablePage {
getDropTargetIdColumnHeader(): ElementFinder {
return this.idColumnHeader;
}
-
- async clickOnIdColumn(name: string): Promise {
- await this.dataTable.clickColumn(this.columns.id, name);
- }
-
- async clickOnJsonColumn(rowNumber: number): Promise {
- await BrowserActions.click(this.dataTable.getCellByRowNumberAndColumnName(rowNumber - 1, this.columns.json));
- }
-
- async clickOnNameColumn(name: string): Promise {
- await this.dataTable.clickColumn(this.columns.name, name);
- }
-
- async clickOnCreatedByColumn(name: string): Promise {
- await this.dataTable.clickColumn(this.columns.createdBy, name);
- }
-
- async pasteClipboard(): Promise {
- await this.pasteClipboardInput.clear();
- await BrowserActions.click(this.pasteClipboardInput);
- await this.pasteClipboardInput.sendKeys(protractor.Key.chord(protractor.Key.SHIFT, protractor.Key.INSERT));
- }
-
- async getClipboardInputText(): Promise {
- const inputValue = await BrowserActions.getInputValue(this.pasteClipboardInput);
- return inputValue.match(/\d/).toString();
- }
}
diff --git a/e2e/core/pages/dialog/upload-dialog.page.ts b/e2e/core/pages/dialog/upload-dialog.page.ts
index 6ab54c162a..6317e4086b 100644
--- a/e2e/core/pages/dialog/upload-dialog.page.ts
+++ b/e2e/core/pages/dialog/upload-dialog.page.ts
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import { element, by, browser, ElementFinder, $, $$ } from 'protractor';
+import { by, browser, ElementFinder, $, $$ } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class UploadDialogPage {
@@ -31,12 +31,6 @@ export class UploadDialogPage {
title = $('span[class*="upload-dialog__title"]');
minimizeButton = $('mat-icon[title="Minimize"]');
maximizeButton = $('mat-icon[title="Maximize"]');
- canUploadConfirmationTitle = $('.upload-dialog__confirmation--title');
- canUploadConfirmationDescription = $('.upload-dialog__confirmation--text');
- confirmationDialogNoButton = element(by.partialButtonText('No'));
- confirmationDialogYesButton = element(by.partialButtonText('Yes'));
- cancelUploadsElement = $('footer[class*="upload-dialog__actions"] button[id="adf-upload-dialog-cancel-all"]');
- cancelUploadInProgressButton = $('div[data-automation-id="cancel-upload-progress"]');
async clickOnCloseButton(): Promise {
await this.checkCloseButtonIsDisplayed();
@@ -76,8 +70,8 @@ export class UploadDialogPage {
}
async filesAreUploaded(content: string[]): Promise {
- for (let i = 0; i < content.length; i++) {
- await this.fileIsUploaded(content[i]);
+ for (const item of content) {
+ await this.fileIsUploaded(item);
}
}
@@ -85,18 +79,6 @@ export class UploadDialogPage {
await BrowserVisibility.waitUntilElementIsNotVisible($(`div[class*='uploading-row'] span[title="${content}"]`));
}
- async cancelUploads(): Promise {
- await BrowserActions.click(this.cancelUploadsElement);
- }
-
- async cancelProgress(): Promise {
- await BrowserActions.click(this.cancelUploadInProgressButton);
- }
-
- async checkCancelProgressIsVisible(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.cancelUploadInProgressButton);
- }
-
async fileIsCancelled(content: string): Promise {
const row: ElementFinder = await this.getRowByRowName(content);
await BrowserVisibility.waitUntilElementIsVisible(row);
@@ -115,24 +97,6 @@ export class UploadDialogPage {
return this.title.getText();
}
- async getConfirmationDialogTitleText(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.canUploadConfirmationTitle);
- return this.canUploadConfirmationTitle.getText();
- }
-
- async getConfirmationDialogDescriptionText(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.canUploadConfirmationDescription);
- return this.canUploadConfirmationDescription.getText();
- }
-
- async clickOnConfirmationDialogYesButton(): Promise {
- await BrowserActions.click(this.confirmationDialogYesButton);
- }
-
- async clickOnConfirmationDialogNoButton(): Promise {
- await BrowserActions.click(this.confirmationDialogNoButton);
- }
-
async numberOfCurrentFilesUploaded(): Promise {
const text = await this.getTitleText();
return text.split('Uploaded ')[1].split(' / ')[0];
diff --git a/e2e/core/pages/dialog/upload-toggles.page.ts b/e2e/core/pages/dialog/upload-toggles.page.ts
index c80d10c6e5..da6e82302f 100644
--- a/e2e/core/pages/dialog/upload-toggles.page.ts
+++ b/e2e/core/pages/dialog/upload-toggles.page.ts
@@ -44,16 +44,6 @@ export class UploadTogglesPage {
await this.togglePage.enableToggle(this.uploadFolderToggle);
}
- async checkFolderUploadToggleIsEnabled(): Promise {
- try {
- const enabledFolderUpload = $('mat-slide-toggle[id="adf-folder-upload-switch"][class*="mat-checked"]');
- await BrowserVisibility.waitUntilElementIsVisible(enabledFolderUpload);
- return true;
- } catch {
- return false;
- }
- }
-
async checkMultipleFileUploadToggleIsEnabled(): Promise {
const enabledToggle = $('mat-slide-toggle[id="adf-multiple-upload-switch"][class*="mat-checked"]');
await BrowserVisibility.waitUntilElementIsVisible(enabledToggle);
@@ -69,19 +59,6 @@ export class UploadTogglesPage {
await BrowserVisibility.waitUntilElementIsVisible(enabledToggle);
}
- async disableFolderUpload(): Promise {
- await this.togglePage.disableToggle(this.uploadFolderToggle);
- }
- async checkFolderUploadToggleIsNotEnabled(): Promise {
- try {
- const inactiveToggleFolder = $('#adf-folder-upload-switch .mat-slide-toggle-label');
- await BrowserVisibility.waitUntilElementIsVisible(inactiveToggleFolder);
- return true;
- } catch {
- return false;
- }
- }
-
async enableExtensionFilter(): Promise {
await browser.executeScript('arguments[0].scrollIntoView()', this.extensionFilterToggle);
await this.togglePage.enableToggle(this.extensionFilterToggle);
@@ -125,5 +102,4 @@ export class UploadTogglesPage {
async clearText(): Promise {
await BrowserActions.clearSendKeys(this.maxSizeField, '');
}
-
}
diff --git a/e2e/core/pages/login-shell.page.ts b/e2e/core/pages/login-shell.page.ts
index e326d45899..e7df71cc48 100644
--- a/e2e/core/pages/login-shell.page.ts
+++ b/e2e/core/pages/login-shell.page.ts
@@ -19,7 +19,6 @@ import { $, browser, by, element } from 'protractor';
import { TogglePage, BrowserActions, BrowserVisibility, LoginPage } from '@alfresco/adf-testing';
export class LoginShellPage {
-
loginURL = browser.baseUrl + '/login';
loginSSOPage = new LoginPage();
@@ -27,17 +26,12 @@ export class LoginShellPage {
txtUsername = $('input[id="username"]');
txtPassword = $('input[id="password"]');
logoImg = $('img[id="adf-login-img-logo"]');
- successRouteTxt = $('input[data-automation-id="adf-success-route"]');
logoTxt = $('input[data-automation-id="adf-url-logo"]');
usernameError = $('span[data-automation-id="username-error"]');
- passwordError = $('span[data-automation-id="password-required"]');
- loginError = $('.adf-login-error-message');
usernameInactive = $('input[id="username"][class*="ng-invalid"]');
- passwordInactive = $('input[id="password"][class*="ng-invalid"]');
adfLogo = $('.adf-img-logo');
usernameHighlighted = $('input[id="username"][aria-invalid="true"]');
- passwordHighlighted = $('input[id="password"][aria-invalid="true"]');
signInButton = $('#login-button');
showPasswordElement = $('button[data-automation-id="show_password"]');
hidePasswordElement = $('button[data-automation-id="hide_password"]');
@@ -46,7 +40,6 @@ export class LoginShellPage {
register = $('#adf-login-action-right');
footerSwitch = $('#switch4');
rememberMeSwitch = $('#adf-toggle-show-rememberme');
- successRouteSwitch = $('#adf-toggle-show-successRoute');
logoSwitch = $('#adf-toggle-logo');
header = $('#adf-header');
settingsIcon = element(by.cssContainingText('a[data-automation-id="settings"] mat-icon', 'settings'));
@@ -84,18 +77,6 @@ export class LoginShellPage {
return BrowserActions.getText(this.usernameError);
}
- async getPasswordTooltip(): Promise {
- return BrowserActions.getText(this.passwordError);
- }
-
- async getLoginError(): Promise {
- return BrowserActions.getText(this.loginError);
- }
-
- async checkLoginErrorIsDisplayed(loginError: string): Promise {
- await BrowserVisibility.waitUntilElementHasText(this.loginError, loginError);
- }
-
async checkLoginImgURL(): Promise {
return BrowserActions.getAttribute(this.logoImg, 'src');
}
@@ -104,29 +85,15 @@ export class LoginShellPage {
await BrowserVisibility.waitUntilElementIsVisible(this.usernameInactive);
}
- async checkPasswordInactive(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.passwordInactive);
- }
-
async checkUsernameHighlighted(): Promise {
await BrowserActions.click(this.adfLogo);
await BrowserVisibility.waitUntilElementIsVisible(this.usernameHighlighted);
}
- async checkPasswordHighlighted(): Promise {
- await BrowserActions.click(this.adfLogo);
- await browser.sleep(900000);
- await BrowserVisibility.waitUntilElementIsVisible(this.passwordHighlighted);
- }
-
async checkUsernameTooltipIsNotVisible(): Promise {
await BrowserVisibility.waitUntilElementIsNotVisible(this.usernameError);
}
- async checkPasswordTooltipIsNotVisible(): Promise {
- await BrowserVisibility.waitUntilElementIsNotVisible(this.passwordError);
- }
-
async getSignInButtonIsEnabled(): Promise {
return this.signInButton.isEnabled();
}
@@ -191,18 +158,10 @@ export class LoginShellPage {
await this.togglePage.disableToggle(this.rememberMeSwitch);
}
- async enableSuccessRouteSwitch(): Promise {
- await this.togglePage.enableToggle(this.successRouteSwitch);
- }
-
async enableLogoSwitch(): Promise {
await this.togglePage.enableToggle(this.logoSwitch);
}
- async enterSuccessRoute(route: string): Promise {
- await BrowserActions.clearSendKeys(this.successRouteTxt, route);
- }
-
async enterLogo(logo: string): Promise {
await BrowserActions.clearSendKeys(this.logoTxt, logo);
}
diff --git a/e2e/core/pages/navigation-bar.page.ts b/e2e/core/pages/navigation-bar.page.ts
index f6a83307b2..b1dbd15cab 100644
--- a/e2e/core/pages/navigation-bar.page.ts
+++ b/e2e/core/pages/navigation-bar.page.ts
@@ -20,21 +20,12 @@ import { $, browser, ElementFinder } from 'protractor';
import { ProcessServicesPage } from '../../process-services/pages/process-services.page';
export class NavigationBarPage {
-
- linkListContainer = $('.app-sidenav-linklist');
linkMenuChildrenContainer = $('.nestedMenu');
dataTableNestedButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="Datatable"]');
- dataTableCopyContentButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="Copy Content"]');
dataTableDragAndDropButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="Drag and Drop"]');
processServicesNestedButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="App"]');
processServicesCloudHomeButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="Home"]');
- themeButton = $('button[data-automation-id="theme menu"]');
- themeMenuContent = $('div[class*="mat-menu-panel"]');
- appTitle = $('.adf-app-title');
- menuButton = $('button[data-automation-id="adf-menu-icon"]');
formButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="Form"]');
- peopleGroupCloudButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="People/Group Cloud"]');
- serviceTaskListButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="Service Task List"]');
logoutSection = $('div[data-automation-id="adf-logout-section"]');
personalFiles = $('div [title="Personal Files"]');
@@ -61,10 +52,6 @@ export class NavigationBarPage {
await this.clickNavigationBarItem('Content Services', this.personalFiles);
}
- async clickHeaderDataButton(): Promise {
- await this.clickNavigationBarItem('Header Data');
- }
-
async clickTaskListButton(): Promise {
await this.clickNavigationBarItem('Task List');
}
@@ -87,18 +74,6 @@ export class NavigationBarPage {
await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
}
- async navigateToPeopleGroupCloudPage(): Promise {
- await this.clickProcessCloudButton();
- await BrowserActions.click(this.peopleGroupCloudButton);
- await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
- }
-
- async navigateToServiceTaskListCloudPage(): Promise {
- await this.clickProcessCloudButton();
- await BrowserActions.click(this.serviceTaskListButton);
- await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
- }
-
private async clickProcessServicesButton() {
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.clickUntilIsNotVisible(this.getMenuItemLocator('Process Services'), this.linkMenuChildrenContainer);
@@ -117,10 +92,6 @@ export class NavigationBarPage {
await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
}
- async clickLoginButton(): Promise {
- await this.clickNavigationBarItem('Login');
- }
-
async clickTrashcanButton(): Promise {
await this.clickNavigationBarItem('Trashcan');
}
@@ -146,12 +117,6 @@ export class NavigationBarPage {
await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
}
- async navigateToCopyContentDatatable(): Promise {
- await this.clickDataTable();
- await BrowserActions.click(this.dataTableCopyContentButton);
- await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
- }
-
async clickTagButton(): Promise {
await this.clickNavigationBarItem('Tag');
}
@@ -160,14 +125,6 @@ export class NavigationBarPage {
await this.clickNavigationBarItem('Social');
}
- async clickSettingsButton(): Promise {
- await this.clickNavigationBarItem('Settings');
- }
-
- async clickConfigEditorButton(): Promise {
- await this.clickNavigationBarItem('Configuration Editor');
- }
-
async clickOverlayViewerButton(): Promise {
await this.clickNavigationBarItem('Overlay Viewer');
}
@@ -176,14 +133,6 @@ export class NavigationBarPage {
await this.clickNavigationBarItem('Tree View');
}
- async clickIconsButton(): Promise {
- await this.clickNavigationBarItem('Icons');
- }
-
- async clickAboutButton(): Promise {
- await this.clickNavigationBarItem('About');
- }
-
async clickLogoutButton(): Promise {
Logger.log('Logout');
try {
@@ -196,58 +145,11 @@ export class NavigationBarPage {
}
}
- async clickThemeButton(): Promise {
- await BrowserActions.closeMenuAndDialogs();
- await BrowserActions.click(this.themeButton);
- await BrowserVisibility.waitUntilElementIsVisible(this.themeMenuContent);
- }
-
- async clickOnSpecificThemeButton(themeName): Promise {
- const themeElement = $(`button[data-automation-id="${themeName}"]`);
- await BrowserActions.click(themeElement);
- await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
- }
-
async openContentServicesFolder(folderId): Promise {
await BrowserActions.getUrl(`${browser.baseUrl}/files/${folderId}`);
}
- async checkMenuButtonIsDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.menuButton);
- }
-
- async checkMenuButtonIsNotDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsNotVisible(this.menuButton);
- }
-
- async checkToolbarColor(color: string): Promise {
- const toolbarColor = $(`mat-toolbar[class*="mat-${color}"]`);
- await BrowserVisibility.waitUntilElementIsVisible(toolbarColor);
- }
-
- async clickAppLogo(logoTitle: string): Promise {
- const appLogo = $('a[title="' + logoTitle + '"]');
- await BrowserActions.click(appLogo);
- }
-
- async clickAppLogoText(): Promise {
- await BrowserActions.click(this.appTitle);
- }
-
- async checkLogoTooltip(logoTooltipTitle: string): Promise {
- const logoTooltip = $('a[title="' + logoTooltipTitle + '"]');
- await BrowserVisibility.waitUntilElementIsVisible(logoTooltip);
- }
-
- async openViewer(nodeId: string): Promise {
- await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${nodeId}/view`);
- }
-
async goToSite(site): Promise {
await BrowserActions.getUrl(browser.baseUrl + `/files/${site.entry.guid}/display/list`);
}
-
- async scrollTo(el: ElementFinder): Promise {
- await browser.executeScript(`return arguments[0].scrollTop = arguments[1].offsetTop`, this.linkListContainer.getWebElement(), el.getWebElement());
- }
}
diff --git a/e2e/process-services-cloud/pages/process-cloud-demo.page.ts b/e2e/process-services-cloud/pages/process-cloud-demo.page.ts
index c8fa14529b..5332017ca1 100644
--- a/e2e/process-services-cloud/pages/process-cloud-demo.page.ts
+++ b/e2e/process-services-cloud/pages/process-cloud-demo.page.ts
@@ -16,11 +16,11 @@
*/
import { BrowserActions, BrowserVisibility, EditProcessFilterCloudComponentPage, ProcessFiltersCloudComponentPage, ProcessListCloudComponentPage } from '@alfresco/adf-testing';
-import { by, element, $ } from 'protractor';
+import { $ } from 'protractor';
export class ProcessCloudDemoPage {
- createButton = $('button[data-automation-id="create-button"');
+ createButton = $('button[data-automation-id="create-button"]');
newProcessButton = $('button[data-automation-id="btn-start-process"]');
processListCloud = new ProcessListCloudComponentPage();
@@ -35,10 +35,6 @@ export class ProcessCloudDemoPage {
return this.processListCloud;
}
- getAllRowsByIdColumn(): Promise {
- return this.processListCloud.getAllRowsByColumn('Id');
- }
-
async openNewProcessForm(): Promise {
await this.clickOnCreateButton();
await this.newProcessButtonIsDisplayed();
@@ -52,11 +48,4 @@ export class ProcessCloudDemoPage {
async clickOnCreateButton(): Promise {
await BrowserActions.click(this.createButton);
}
-
- async checkActionExecuted(processInstanceId: string, action: string): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Action Menu:')));
- await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Context Menu:')));
- await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Process Instance ID: ' + processInstanceId)));
- await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Action Type: ' + action)));
- }
}
diff --git a/e2e/process-services/process/start-process-component.e2e.ts b/e2e/process-services/process/start-process-component.e2e.ts
index cdd7f35cdc..e54f08d5d9 100644
--- a/e2e/process-services/process/start-process-component.e2e.ts
+++ b/e2e/process-services/process/start-process-component.e2e.ts
@@ -17,12 +17,10 @@
import CONSTANTS = require('../../util/constants');
import { createApiService,
- ApplicationsUtil, BrowserActions,
+ ApplicationsUtil,
FileBrowserUtil,
- LocalStorageUtil,
LoginPage, ModelsActions,
ProcessInstanceTasksPage,
- SelectAppsDialog,
StartProcessPage,
StringUtil,
UserModel,
@@ -37,8 +35,6 @@ import { ProcessDetailsPage } from './../pages/process-details.page';
import { ProcessFiltersPage } from './../pages/process-filters.page';
import { ProcessServicesPage } from './../pages/process-services.page';
import { ProcessServiceTabBarPage } from './../pages/process-service-tab-bar.page';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
-import { UploadDialogPage } from '../../core/pages/dialog/upload-dialog.page';
import { ProcessInstancesApi } from '@alfresco/js-api';
describe('Start Process Component', () => {
@@ -46,7 +42,6 @@ describe('Start Process Component', () => {
const app = browser.params.resources.Files.APP_WITH_PROCESSES;
const simpleApp = browser.params.resources.Files.WIDGETS_SMOKE_TEST;
const dateFormApp = browser.params.resources.Files.APP_WITH_DATE_FIELD_FORM;
- const startProcessAttachFileApp = browser.params.resources.Files.START_PROCESS_ATTACH_FILE;
const loginPage = new LoginPage();
const navigationBarPage = new NavigationBarPage();
@@ -57,8 +52,6 @@ describe('Start Process Component', () => {
const processDetailsPage = new ProcessDetailsPage();
const attachmentListPage = new AttachmentListPage();
const processInstanceTasksPage = new ProcessInstanceTasksPage();
- const contentServicesPage = new ContentServicesPage();
- const selectAppsDialog = new SelectAppsDialog();
const widget = new Widget();
const apiService = createApiService();
@@ -471,70 +464,4 @@ describe('Start Process Component', () => {
});
});
});
-
- describe('Provider: ALL', () => {
- const uploadDialog = new UploadDialogPage();
- let processUserModel;
- const imageUploaded = new FileModel({
- name: browser.params.resources.Files.PROFILE_IMAGES.ECM.file_name,
- location: browser.params.resources.Files.PROFILE_IMAGES.ECM.file_location
- });
-
- beforeAll(async () => {
- const apiServiceAll = createApiService({
- provider: 'ALL',
- hostEcm: browser.params.testConfig.appConfig.ecmHost,
- hostBpm: browser.params.testConfig.appConfig.bpmHost
- });
-
- const usersActionsAll = new UsersActions(apiServiceAll);
-
- await apiServiceAll.login(browser.params.testConfig.users.admin.username, browser.params.testConfig.users.admin.password);
-
- processUserModel = await usersActionsAll.createUser();
-
- const alfrescoJsBPMAdminUser = createApiService({ hostBpm: browser.params.testConfig.appConfig.bpmHost });
-
- await alfrescoJsBPMAdminUser.login(processUserModel.username, processUserModel.password);
-
- const applicationsService = new ApplicationsUtil(alfrescoJsBPMAdminUser);
-
- await applicationsService.importPublishDeployApp(startProcessAttachFileApp.file_path);
- });
-
- it('[C260490] Should be able to start a Process within ACS', async () => {
- await BrowserActions.getUrl(`${browser.baseUrl}/settings`);
-
- await LocalStorageUtil.setStorageItem('providers', 'ALL');
-
- await loginPage.login(processUserModel.username, processUserModel.password);
-
- await contentServicesPage.goToDocumentList();
- await contentServicesPage.uploadFile(imageUploaded.location);
- await contentServicesPage.checkContentIsDisplayed(imageUploaded.name);
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- await contentServicesPage.checkContentIsDisplayed(imageUploaded.name);
-
- await contentServicesPage.getDocumentList().rightClickOnRow(imageUploaded.name);
- await contentServicesPage.checkContextActionIsVisible('Start Process');
- await contentServicesPage.pressContextMenuActionNamed('Start Process');
- await selectAppsDialog.checkSelectAppsDialogIsDisplayed();
- await selectAppsDialog.selectApp('start process app');
- await selectAppsDialog.clickContinueButton();
- await startProcessPage.enterProcessName('Test Process');
-
- await attachmentListPage.checkFileIsAttached(imageUploaded.name);
- await startProcessPage.clickFormStartProcessButton();
- await navigationBarPage.navigateToProcessServicesPage();
- await processServicesPage.checkApsContainer();
- await processServicesPage.goToApp(startProcessAttachFileApp.title);
-
- await processServiceTabBarPage.clickProcessButton();
- await processFiltersPage.clickCompletedFilterButton();
- await processFiltersPage.selectFromProcessList('Test Process');
- await expect(await processDetailsPage.auditLogEmptyListMessage.getText()).toBe('This list is empty');
- });
- });
-
});
diff --git a/e2e/search/components/search-sorting-picker.e2e.ts b/e2e/search/components/search-sorting-picker.e2e.ts
index 2fd1e00626..5beadb5bbf 100644
--- a/e2e/search/components/search-sorting-picker.e2e.ts
+++ b/e2e/search/components/search-sorting-picker.e2e.ts
@@ -209,8 +209,8 @@ describe('Search Sorting Picker', () => {
const nodeList = await getNodesDisplayed(numberOfElements, idList);
const modifiedDateList = [];
- for (let i = 0; i < nodeList.length; i++) {
- modifiedDateList.push(new Date(nodeList[i].entry.modifiedAt));
+ for (const item of nodeList) {
+ modifiedDateList.push(new Date(item.entry.modifiedAt));
}
await expect(contentServices.checkElementsDateSortedAsc(modifiedDateList)).toBe(true);
@@ -218,14 +218,12 @@ describe('Search Sorting Picker', () => {
const getNodesDisplayed = async function(numberOfElements: number, idList: string[]) {
const promises = [];
- let nodeList;
for (let i = 0; i < (numberOfElements - 1); i++) {
if (idList[i] && idList[i].trim() !== '') {
promises.push(nodesApi.getNode(idList[i]));
}
}
- nodeList = await Promise.all(promises);
- return nodeList;
+ return Promise.all(promises);
};
});
diff --git a/e2e/search/search-page.e2e.ts b/e2e/search/search-page.e2e.ts
index 25933be762..07428d4638 100644
--- a/e2e/search/search-page.e2e.ts
+++ b/e2e/search/search-page.e2e.ts
@@ -52,20 +52,18 @@ describe('Search component - Search Page', () => {
const acsUser = new UserModel();
const emptyFolderModel = new FolderModel({ name: 'search' + StringUtil.generateRandomString() });
- let firstFileModel;
const newFolderModel = new FolderModel();
- let fileNames = [];
- const nrOfFiles = 15;
- const adminNrOfFiles = 5;
beforeAll(async () => {
- fileNames = StringUtil.generateFilesNames(1, nrOfFiles, search.active.base, search.active.extension);
+ const nrOfFiles = 15;
+ const adminNrOfFiles = 5;
+ const fileNames = StringUtil.generateFilesNames(1, nrOfFiles, search.active.base, search.active.extension);
const adminFileNames = StringUtil.generateFilesNames(nrOfFiles + 1, nrOfFiles + adminNrOfFiles, search.active.base, search.active.extension);
search.active.firstFile = fileNames[0];
search.active.secondFile = fileNames[1];
fileNames.splice(0, 1);
- firstFileModel = new FileModel({
+ const firstFileModel = new FileModel({
name: search.active.firstFile,
location: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_path
});
diff --git a/lib/content-services/src/lib/document-list/components/document-list.component.ts b/lib/content-services/src/lib/document-list/components/document-list.component.ts
index 5118867ff6..3894c1dd38 100644
--- a/lib/content-services/src/lib/document-list/components/document-list.component.ts
+++ b/lib/content-services/src/lib/document-list/components/document-list.component.ts
@@ -353,7 +353,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
private layoutPresets = {};
private rowMenuCache: { [key: string]: ContentActionModel[] } = {};
- private loadingTimeout;
+ private loadingTimeout: any;
private onDestroy$ = new Subject();
private _nodesApi: NodesApi;