mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Protractor cleanup for demo shell (#9019)
* [ci:force] cleanup protractor tests * [ci:force] cleanup insights test * [ci:force] cleanup dead demo shell e2e * [ci:force] cleanup e2e * [ci:force] cleanup e2e * cleanup files component * [ci:force] cleanup e2e * [ci:force] remove user info SSO protractor e2e * [ci:force] remove viewer e2e already covered by other tests * [ci:force] remove custom font from demo shell * [ci:force] demo shell viewer cleanup * [ci:force] cleanup viewer in demo shell * [ci:force] rollback model changes * [ci:force] remove site picker from content demo * [ci:force] cleanup files demo shell component * [ci:force] cleanup e2e and dead code * [ci:force] cleanup dead code * [ci:force] fix linting * [ci:force] standalone home component * [ci:force] cleanup demo shell app layout * [ci:force] cleanup css * [ci:force] cleanup demo shell logout * Update demo-shell/src/app/components/app-layout/app-layout.component.html Co-authored-by: Mykyta Maliarchuk <84377976+nikita-web-ua@users.noreply.github.com> --------- Co-authored-by: Mykyta Maliarchuk <84377976+nikita-web-ua@users.noreply.github.com>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { DropActions, BrowserActions, BrowserVisibility, DocumentListPage, DropdownPage, Logger } from '@alfresco/adf-testing';
|
||||
import { $$, browser, by, element, protractor, $ } from 'protractor';
|
||||
import { $$, browser, protractor, $ } from 'protractor';
|
||||
import { FolderDialogPage } from './dialog/folder-dialog.page';
|
||||
import { NavigationBarPage } from './navigation-bar.page';
|
||||
import * as path from 'path';
|
||||
@@ -51,17 +51,11 @@ export class ContentServicesPage {
|
||||
createdByColumnHeader = 'createdByUser.displayName';
|
||||
createdColumnHeader = 'createdAt';
|
||||
deleteContentElement = $('button[data-automation-id="Delete"]');
|
||||
metadataAction = $('button[data-automation-id="Info"]');
|
||||
versionManagerAction = $('button[data-automation-id="Manage versions"]');
|
||||
downloadContent = $('button[data-automation-id="Download"]');
|
||||
downloadButton = $('button[title="Download"]');
|
||||
multiSelectToggle = $('[data-automation-id="multiSelectToggle"]');
|
||||
selectionModeDropdown = $('.mat-select[placeholder="Selection Mode"]');
|
||||
siteListDropdown = new DropdownPage($(`mat-select[data-automation-id='site-my-files-option']`));
|
||||
|
||||
async pressContextMenuActionNamed(actionName: string): Promise<void> {
|
||||
await BrowserActions.clickExecuteScript(`button[data-automation-id="context-${actionName}"]`);
|
||||
}
|
||||
|
||||
async isContextActionEnabled(actionName: string): Promise<boolean> {
|
||||
const actionButton = $(`button[data-automation-id="context-${actionName}"`);
|
||||
@@ -73,43 +67,17 @@ export class ContentServicesPage {
|
||||
return this.contentList;
|
||||
}
|
||||
|
||||
async checkDeleteIsDisabled(content: string): Promise<void> {
|
||||
await this.contentList.clickOnActionMenu(content);
|
||||
const disabledDelete = $(`button[data-automation-id='Delete'][disabled='true']`);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(disabledDelete);
|
||||
}
|
||||
|
||||
async deleteContent(content: string): Promise<void> {
|
||||
await this.contentList.clickOnActionMenu(content);
|
||||
await BrowserActions.click(this.deleteContentElement);
|
||||
await this.checkContentIsNotDisplayed(content);
|
||||
}
|
||||
|
||||
async metadataContent(content: string): Promise<void> {
|
||||
await this.contentList.clickOnActionMenu(content);
|
||||
await BrowserActions.click(this.metadataAction);
|
||||
}
|
||||
|
||||
async versionManagerContent(content: string): Promise<void> {
|
||||
await this.contentList.clickOnActionMenu(content);
|
||||
await BrowserActions.click(this.versionManagerAction);
|
||||
}
|
||||
|
||||
async clickFileHyperlink(fileName: string): Promise<void> {
|
||||
const hyperlink = this.contentList.dataTablePage().getFileHyperlink(fileName);
|
||||
await BrowserActions.click(hyperlink);
|
||||
}
|
||||
|
||||
async checkFileHyperlinkIsEnabled(fileName: string): Promise<void> {
|
||||
const hyperlink = this.contentList.dataTablePage().getFileHyperlink(fileName);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(hyperlink);
|
||||
}
|
||||
|
||||
async clickHyperlinkNavigationToggle(): Promise<void> {
|
||||
const hyperlinkToggle = element(by.cssContainingText('.mat-slide-toggle-content', 'Hyperlink navigation'));
|
||||
await BrowserActions.click(hyperlinkToggle);
|
||||
}
|
||||
|
||||
async getElementsDisplayedId() {
|
||||
return this.contentList.dataTablePage().getAllRowsColumnValues(this.columns.nodeId);
|
||||
}
|
||||
@@ -267,25 +235,11 @@ export class ContentServicesPage {
|
||||
await BrowserVisibility.waitUntilElementIsClickable(this.uploadFileButton);
|
||||
}
|
||||
|
||||
async uploadButtonIsEnabled(): Promise<boolean> {
|
||||
return this.uploadFileButton.isEnabled();
|
||||
}
|
||||
|
||||
async enableInfiniteScrolling(): Promise<void> {
|
||||
const infiniteScrollButton = element(by.cssContainingText('.mat-slide-toggle-content', 'Enable Infinite Scrolling'));
|
||||
await BrowserActions.click(infiniteScrollButton);
|
||||
}
|
||||
|
||||
async enableMediumTimeFormat(): Promise<void> {
|
||||
const mediumTimeFormat = $('#enableMediumTimeFormat');
|
||||
await BrowserActions.click(mediumTimeFormat);
|
||||
}
|
||||
|
||||
async enableThumbnails(): Promise<void> {
|
||||
const thumbnailSlide = $('#adf-thumbnails-upload-switch');
|
||||
await BrowserActions.click(thumbnailSlide);
|
||||
}
|
||||
|
||||
async checkPaginationIsNotDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.emptyPagination);
|
||||
}
|
||||
@@ -339,11 +293,6 @@ export class ContentServicesPage {
|
||||
await expect(await BrowserActions.getAttribute(this.emptyFolderImage, 'src')).toContain(url);
|
||||
}
|
||||
|
||||
async getRowIconImageUrl(fileName: string): Promise<string> {
|
||||
const iconRow = $(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`);
|
||||
return BrowserActions.getAttribute(iconRow, 'src');
|
||||
}
|
||||
|
||||
async getAttributeValueForElement(elementName: string, propertyName: string): Promise<string> {
|
||||
const elementSize = $(
|
||||
`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"] span`
|
||||
@@ -351,10 +300,6 @@ export class ContentServicesPage {
|
||||
return BrowserActions.getText(elementSize);
|
||||
}
|
||||
|
||||
async checkSelectedSiteIsDisplayed(siteName: string): Promise<void> {
|
||||
await this.siteListDropdown.checkOptionIsSelected(siteName);
|
||||
}
|
||||
|
||||
async clickDownloadButton(): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click(this.downloadButton);
|
||||
|
Reference in New Issue
Block a user