[ACS-5761] Demo Shell pages cleanup (#8802)

remove the content that is not covered by e2e testing, preparation steps for the demo shell decommissioning
This commit is contained in:
Denys Vuika
2023-08-08 14:09:41 +01:00
committed by GitHub
parent 17535c9f53
commit 4f2b3bce3c
257 changed files with 528 additions and 15154 deletions

View File

@@ -46,10 +46,4 @@ export class PermissionActions {
const nodeBody = { permissions: { isInheritanceEnabled: false } };
return this.nodesApi.updateNode(nodeId, nodeBody, { include: ['permissions'] });
}
enableInheritedPermissionsForNode(nodeId: string): Promise<NodeEntry> {
const nodeBody = { permissions: { isInheritanceEnabled: true } };
return this.nodesApi.updateNode(nodeId, nodeBody, { include: ['permissions'] });
}
}

View File

@@ -41,10 +41,6 @@ export class AddPermissionsDialogPage {
return $$('.mat-option-text');
}
async clickCloseButton(): Promise<void> {
await BrowserActions.click(this.closeButton);
}
async clickAddPermissionButton(): Promise<void> {
await BrowserActions.clickExecuteScript('button[data-automation-id="adf-add-permission-button"]');
}
@@ -72,20 +68,11 @@ export class AddPermissionsDialogPage {
await BrowserActions.click(this.addButton);
}
async checkPermissionsDatatableIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible($('[class*="adf-datatable-permission"]'));
}
async getRoleCellValue(rowName: string): Promise<string> {
const locator = this.dataTableComponentPage.getCellByRowContentAndColumn('Users and Groups', rowName, column.role);
return BrowserActions.getText(locator);
}
async clickRoleDropdownByUserOrGroupName(name: string): Promise<void> {
const row = this.dataTableComponentPage.getRow('Users and Groups', name);
await BrowserActions.click(row.$('adf-select-role-permission'));
}
async selectOption(name: string): Promise<void> {
await new DropdownPage().selectOption(name);
}

View File

@@ -1,28 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { $ } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
export class DownloadDialogPage {
cancelButton = $(`#cancel-button`);
async clickCancelButton(): Promise<void> {
await BrowserActions.click(this.cancelButton);
}
}

View File

@@ -17,4 +17,3 @@
export * from './content-node-selector-dialog.page';
export * from './add-permissions-dialog.page';
export * from './download-dialog.page';

View File

@@ -101,13 +101,4 @@ export class DocumentListPage {
async doubleClickRow(nodeName: string): Promise<void> {
await this.dataTable.doubleClickRow('Display name', nodeName);
}
async isItemPresent(name: string): Promise<boolean> {
return this.dataTable.getRow('Display name', name).isPresent();
}
async getLibraryRole(name: string): Promise<string> {
return this.dataTable.getRow('Display name', name).$('adf-library-role-column').getText();
}
}

View File

@@ -1,51 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { $, browser } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
export class LikePage {
likeCounter = $(`div[id="adf-like-counter"]`);
likeButton = $(`.adf-like-grey`);
unlikeButton = $(`.adf-like-select`);
async checkLikeCounter(counter: number): Promise<void> {
await BrowserVisibility.waitUntilElementHasText(this.likeCounter, counter);
}
async clickLike(): Promise<void> {
await BrowserActions.click(this.likeButton);
}
async clickUnlike(): Promise<void> {
await BrowserActions.click(this.unlikeButton);
}
async removeHoverFromLikeButton(): Promise<void> {
await browser.actions().mouseMove({ x: 200, y: 200 }).click().perform();
}
async getLikedIconColor(): Promise<string> {
return BrowserActions.getColor(this.unlikeButton);
}
async getUnLikedIconColor(): Promise<string> {
return BrowserActions.getColor(this.likeButton);
}
}

View File

@@ -15,9 +15,6 @@
* limitations under the License.
*/
export * from './like.page';
export * from './rate.page';
export * from './document-list.page';
export * from './breadcrumb/public-api';
export * from './search/public-api';

View File

@@ -1,66 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { $ } from 'protractor';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { BrowserActions } from '../../core/utils/browser-actions';
export class RatePage {
private ratingsCounter = $(`div[id="adf-rating-counter"]`);
async rateComponent(rateValue: number) {
const unratedStar = await this.coloredStar(rateValue);
await BrowserActions.click(unratedStar);
}
async removeRating(rateValue: number): Promise<void> {
const ratedStar = await this.coloredStar(rateValue);
await BrowserActions.click(ratedStar);
}
async checkRatingCounter(rating: number): Promise<void> {
await BrowserVisibility.waitUntilElementHasText(this.ratingsCounter, rating);
}
async isStarRated(rateValue: number): Promise<void> {
const ratedStar = await this.coloredStar(rateValue);
await BrowserVisibility.waitUntilElementIsVisible(ratedStar);
}
async isNotStarRated(rateValue: number): Promise<void> {
const unratedStar = await this.greyStar(rateValue);
await BrowserVisibility.waitUntilElementIsVisible(unratedStar);
}
async getRatedStarColor(rateValue: number): Promise<string> {
const ratedStar = await this.coloredStar(rateValue);
return BrowserActions.getColor(ratedStar);
}
async getUnratedStarColor(rateValue: number): Promise<string> {
const unratedStar = await this.greyStar(rateValue);
return BrowserActions.getColor(unratedStar);
}
async getAverageStarColor(rateValue: number): Promise<string> {
const coloredStar = await this.coloredStar(rateValue);
return BrowserActions.getColor(coloredStar);
}
private coloredStar = async (rateValue: number) => $(`span[id="adf-rate-${rateValue}"] mat-icon`);
private greyStar = async (rateValue: number) => $(`mat-icon[id="adf-grey-star-${rateValue}"]`);
}

View File

@@ -29,15 +29,4 @@ export class UploadButtonPage {
await this.uploadButton.sendKeys(file.getLocation());
}
}
async isButtonNotDisplayed(): Promise<boolean> {
let result = false;
try {
await BrowserVisibility.waitUntilElementIsNotVisible(this.uploadButton);
result = true;
} catch (e) { /* do nothing */ }
return result;
}
}

View File

@@ -32,7 +32,6 @@ export class DataTableComponentPage {
selectedRowNumber: ElementFinder;
allSelectedRows: ElementArrayFinder;
selectAll: ElementFinder;
copyColumnTooltip: ElementFinder;
emptyList: ElementFinder;
emptyListTitle: ElementFinder;
emptyListSubtitle: ElementFinder;
@@ -51,7 +50,6 @@ export class DataTableComponentPage {
this.selectedRowNumber = this.rootElement.$(`adf-datatable-row[class*='is-selected'] div[data-automation-id*='text_']`);
this.allSelectedRows = this.rootElement.$$(`adf-datatable-row[class*='is-selected']`);
this.selectAll = this.rootElement.$(`div[class*='adf-datatable-header'] mat-checkbox`);
this.copyColumnTooltip = this.rootElement.$(`adf-copy-content-tooltip span`);
this.emptyList = this.rootElement.$(`adf-empty-content`);
this.emptyListTitle = this.rootElement.$(`.adf-empty-content__title`);
this.emptyListSubtitle = this.rootElement.$(`.adf-empty-content__subtitle`);
@@ -114,28 +112,6 @@ export class DataTableComponentPage {
await browser.actions().sendKeys(protractor.Key.NULL).perform();
}
async selectMultipleRows(columnName: string, items: string[]): Promise<void> {
await browser.actions().sendKeys(protractor.Key.ESCAPE).perform();
await this.clearRowsSelection();
await browser.actions().sendKeys(protractor.Key.COMMAND).perform();
for (const item of items) {
await this.selectRow(columnName, item);
}
await browser.actions().sendKeys(protractor.Key.NULL).perform();
}
async clearRowsSelection(): Promise<void> {
try {
const count = await this.getNumberOfSelectedRows();
if (count !== 0) {
await browser.refresh();
await BrowserVisibility.waitUntilElementIsVisible(this.rootElement);
}
} catch (error) {
Logger.error('------ clearSelection catch : ', error);
}
}
async checkRowIsSelected(columnName: string, columnValue: string): Promise<void> {
const selectedRow = this.getCellElementByValue(columnName, columnValue).element(by.xpath(`ancestor::adf-datatable-row[contains(@class, 'is-selected')]`));
await BrowserVisibility.waitUntilElementIsVisible(selectedRow);
@@ -228,12 +204,6 @@ export class DataTableComponentPage {
return BrowserActions.getAttribute(this.getCellElementByValue(columnName, columnValue), 'title');
}
async rightClickOnRowByIndex(index: number): Promise<void> {
const row = this.getRowByIndex(index);
await BrowserActions.rightClick(row);
await BrowserVisibility.waitUntilElementIsVisible($('#adf-context-menu-content'));
}
async rightClickOnItem(columnName: string, columnValue: string): Promise<void> {
const row = this.getRow(columnName, columnValue);
await BrowserActions.rightClick(row);
@@ -289,6 +259,7 @@ export class DataTableComponentPage {
await BrowserVisibility.waitUntilElementIsVisible(this.tableBody);
}
/** @deprecated Use Playwright API instead */
async getFirstElementDetail(detail: string): Promise<string> {
const firstNode = $$(`adf-datatable div[title="${detail}"] span`).first();
return BrowserActions.getText(firstNode);
@@ -356,6 +327,7 @@ export class DataTableComponentPage {
return this.rootElement.all(by.xpath(`//div[starts-with(@title, '${columnName}')]//div[contains(@data-automation-id, '${columnValue}')]//ancestor::adf-datatable-row[contains(@class, 'adf-datatable-row')]`)).first();
}
/** @deprecated use Playwright instead **/
getRowByIndex(index: number): ElementFinder {
return this.rootElement.element(by.xpath(`//div[contains(@class,'adf-datatable-body')]//adf-datatable-row[contains(@class,'adf-datatable-row')][${index}]`));
}
@@ -374,7 +346,6 @@ export class DataTableComponentPage {
}
async waitTillContentLoaded(): Promise<void> {
if (await this.isSpinnerPresent()) {
Logger.log('wait datatable loading spinner disappear');
await BrowserVisibility.waitUntilElementIsNotVisible(this.rootElement.element(by.tagName('mat-progress-spinner')), MAX_LOADING_TIME);
@@ -429,10 +400,7 @@ export class DataTableComponentPage {
}
}
async checkColumnIsDisplayed(columnKey: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible($(`div[data-automation-id="auto_id_${columnKey}"]`));
}
/** @deprecated use Playwright instead **/
async isColumnDisplayed(columnTitle: string): Promise<boolean> {
const isColumnDisplated = (await this.allColumns).some(
async column => {
@@ -444,10 +412,7 @@ export class DataTableComponentPage {
return isColumnDisplated;
}
async checkNoContentContainerIsDisplayed() {
await BrowserVisibility.waitUntilElementIsVisible(this.noContentContainer);
}
/** @deprecated use Playwright instead **/
async getNumberOfColumns(): Promise<number> {
return this.allColumns.count();
}
@@ -520,46 +485,6 @@ export class DataTableComponentPage {
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
}
async getCopyContentTooltip(): Promise<string> {
return BrowserActions.getText(this.copyColumnTooltip);
}
async copyContentTooltipIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsStale(this.copyColumnTooltip);
}
async mouseOverColumn(columnName: string, columnValue: string): Promise<void> {
const column = this.getCellElementByValue(columnName, columnValue);
await BrowserVisibility.waitUntilElementIsVisible(column);
await browser.actions().mouseMove(column).perform();
}
async clickColumn(columnName: string, columnValue: string): Promise<void> {
await BrowserActions.clickExecuteScript(`div[title="${columnName}"] div[data-automation-id="text_${columnValue}"] span`);
}
async selectMultipleItems(names: string[]): Promise<void> {
await browser.actions().sendKeys(protractor.Key.ESCAPE).perform();
await browser.actions().sendKeys(protractor.Key.COMMAND).perform();
for (const name of names) {
await this.selectRowByContent(name);
}
await this.clearSelection();
}
async clearSelection(): Promise<void> {
await browser.actions().sendKeys(protractor.Key.NULL).perform();
}
async getEmptyListText(): Promise<string> {
const isEmpty = await this.isEmpty();
if (isEmpty) {
return this.rootElement.$('adf-custom-empty-content-template').getText();
}
return '';
}
async isEmpty(): Promise<boolean> {
await browser.sleep(500);
@@ -576,26 +501,6 @@ export class DataTableComponentPage {
return isDisplayed;
}
async waitForEmptyState(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.emptyList);
}
async getEmptyStateTitle(): Promise<string> {
const isEmpty = await this.isEmpty();
if (isEmpty) {
return this.emptyListTitle.getText();
}
return '';
}
async getEmptyStateSubtitle(): Promise<string> {
const isEmpty = await this.isEmpty();
if (isEmpty) {
return this.emptyListSubtitle.getText();
}
return '';
}
private async isSpinnerPresent(): Promise<boolean> {
let isSpinnerPresent;

View File

@@ -25,15 +25,12 @@ export interface LoginOptions {
waitForUserIcon: boolean;
}
export class LoginPage {
loginUrl = `${browser.baseUrl}/login`;
ssoButton = $(`[data-automation-id="login-button-sso"]`);
usernameField = $('#username');
passwordField = $('#password');
loginButton = $('input[type="submit"]');
userIcon = $(`[data-automation-id*='user-initials']`);
loginError = $(`div[data-automation-id="login-error"]`);
userIcon = $(`[data-automation-id='user-initials-image']`);
visibilityLabel = $('#v');
txtUsernameBasicAuth = $('input[id="username"]');
@@ -139,18 +136,9 @@ export class LoginPage {
await BrowserActions.click(this.loginButton);
}
async checkLoginErrorIsDisplayed() {
await BrowserVisibility.waitUntilElementIsVisible(this.loginError);
}
async getLoginErrorMessage() {
return BrowserActions.getText(this.loginError);
}
async displayPassword(): Promise<void> {
await BrowserActions.click(this.visibilityLabel);
const passwordInputTypeText = $(`input[name="password"][type="text"]`);
await BrowserVisibility.waitUntilElementIsVisible(passwordInputTypeText);
}
}

View File

@@ -40,23 +40,10 @@ export class NotificationHistoryPage {
await BrowserVisibility.waitUntilElementIsVisible(notificationListButton);
}
async checkNotificationIsNotPresent(text: string): Promise<void> {
const notificationLisText = await BrowserActions.getText(this.notificationList);
await expect(notificationLisText).not.toContain(text);
}
async checkNotifyContains(text: string): Promise<void> {
await this.clickNotificationButton();
await this.checkNotificationIsPresent(text);
await this.clickMarkAsRead();
await BrowserVisibility.waitUntilElementIsNotVisible(this.notificationList);
}
async checkNotifyNotContains(text: string): Promise<void> {
await this.clickNotificationButton();
await this.checkNotificationIsNotPresent(text);
await this.clickNotificationButton();
await BrowserActions.closeMenuAndDialogs();
await BrowserVisibility.waitUntilElementIsNotVisible(this.notificationList);
}
}

View File

@@ -21,24 +21,18 @@ import { BrowserActions } from '../utils/browser-actions';
import { DropdownPage } from '../../core/pages/material/dropdown.page';
export class SettingsPage {
settingsURL: string = browser.baseUrl + '/settings';
ecmText = $('input[data-automation-id*="ecmHost"]');
bpmText = $('input[data-automation-id*="bpmHost"]');
clientIdText = $('input[id="clientId"]');
authHostText = $('input[id="oauthHost"]');
logoutUrlText = $('input[id="logout-url"]');
basicAuthRadioButton = element(by.cssContainingText('mat-radio-button[id*="mat-radio"]', 'Basic Authentication'));
identityHostText = $('input[id="identityHost"]');
ssoRadioButton = element(by.cssContainingText('[id*="mat-radio"]', 'SSO'));
silentLoginToggleLabel = $('mat-slide-toggle[formcontrolname="silentLogin"] label');
silentLoginToggleElement = $('mat-slide-toggle[formcontrolname="silentLogin"]');
implicitFlowLabel = $('mat-slide-toggle[formcontrolname="implicitFlow"] label');
implicitFlowElement = $('mat-slide-toggle[formcontrolname="implicitFlow"]');
applyButton = $('button[data-automation-id*="host-button"]');
backButton = element(by.cssContainingText('button .mat-button-wrapper', 'Back'));
validationMessage = element(by.cssContainingText('mat-error', 'This field is required'));
applyButton = $('button[data-automation-id="settings-apply-button"]');
providerDropdown = new DropdownPage($('mat-select[id="adf-provider-selector"]'));
async goToSettingsPage(): Promise<void> {
@@ -60,49 +54,11 @@ export class SettingsPage {
await this.providerDropdown.checkOptionIsSelected(option);
}
async getSelectedOptionText(): Promise<string> {
return this.providerDropdown.getSelectedOptionText();
}
async getBpmHostUrl() {
return BrowserActions.getInputValue(this.bpmText);
}
async getEcmHostUrl() {
return BrowserActions.getInputValue(this.ecmText);
}
async setProviderEcmBpm() {
await this.setProvider('ALL');
await this.clickApply();
}
async setProviderBpm() {
await this.setProvider('BPM');
await this.clickApply();
}
async setProviderEcm() {
await this.setProvider('ECM');
await this.clickApply();
}
async setProviderOauth() {
await this.goToSettingsPage();
await this.setProvider('OAUTH');
await this.clickApply();
}
async clickBackButton() {
await BrowserActions.click(this.backButton);
}
async clickSsoRadioButton() {
await BrowserActions.click(this.ssoRadioButton);
}
async setProviderEcmSso(contentServiceURL, authHost, identityHost, silentLogin = true, implicitFlow = true, clientId?: string, logoutUrl: string = '/logout') {
await this.goToSettingsPage();
await this.setProvider('ECM');
await this.clickSsoRadioButton();
@@ -117,48 +73,11 @@ export class SettingsPage {
await browser.sleep(1000);
}
async setProviderBpmSso(processServiceURL, authHost, identityHost, silentLogin = true, implicitFlow = true) {
await this.goToSettingsPage();
await this.setProvider('BPM');
await BrowserVisibility.waitUntilElementIsVisible(this.bpmText);
await BrowserVisibility.waitUntilElementIsNotVisible(this.ecmText);
await this.clickSsoRadioButton();
await this.setClientId();
await this.setProcessServicesURL(processServiceURL);
await this.setAuthHost(authHost);
await this.setIdentityHost(identityHost);
await this.setSilentLogin(silentLogin);
await this.setImplicitFlow(implicitFlow);
await this.clickApply();
await browser.sleep(1000);
}
async setProviderEcmBpmSso(contentServicesURL: string, processServiceURL, authHost, identityHost, clientId: string, silentLogin = true, implicitFlow = true) {
await this.goToSettingsPage();
await this.setProvider('ALL');
await BrowserVisibility.waitUntilElementIsVisible(this.bpmText);
await BrowserVisibility.waitUntilElementIsVisible(this.ecmText);
await this.clickSsoRadioButton();
await this.setClientId(clientId);
await this.setContentServicesURL(contentServicesURL);
await this.setProcessServicesURL(processServiceURL);
await this.setAuthHost(authHost);
await this.setIdentityHost(identityHost);
await this.setSilentLogin(silentLogin);
await this.setImplicitFlow(implicitFlow);
await this.clickApply();
await browser.sleep(1000);
}
async setLogoutUrl(logoutUrl) {
await BrowserVisibility.waitUntilElementIsPresent(this.logoutUrlText);
await BrowserActions.clearSendKeys(this.logoutUrlText, logoutUrl);
}
async setProcessServicesURL(processServiceURL) {
await BrowserActions.clearSendKeys(this.bpmText, processServiceURL);
}
async setClientId(clientId: string = browser.params.testConfig.appConfig.oauth2.clientId) {
await BrowserActions.clearSendKeys(this.clientIdText, clientId);
}
@@ -167,14 +86,6 @@ export class SettingsPage {
await BrowserActions.clearSendKeys(this.ecmText, contentServiceURL);
}
async clearContentServicesURL() {
await BrowserActions.clearWithBackSpace(this.ecmText);
}
async clearProcessServicesURL() {
await BrowserActions.clearWithBackSpace(this.bpmText);
}
async setAuthHost(authHostURL) {
await BrowserActions.clearSendKeys(this.authHostText, authHostURL);
}
@@ -206,50 +117,4 @@ export class SettingsPage {
await BrowserActions.click(this.implicitFlowLabel);
}
}
async checkApplyButtonIsDisabled() {
await BrowserVisibility.waitUntilElementIsVisible($('button[data-automation-id*="host-button"]:disabled'));
}
async checkProviderDropdownIsDisplayed() {
await this.providerDropdown.checkDropdownIsVisible();
}
async checkValidationMessageIsDisplayed() {
await BrowserVisibility.waitUntilElementIsVisible(this.validationMessage);
}
async checkProviderOptions() {
await this.providerDropdown.clickDropdown();
await this.providerDropdown.checkOptionIsDisplayed('ALL');
await this.providerDropdown.checkOptionIsDisplayed('ECM');
await this.providerDropdown.checkOptionIsDisplayed('BPM');
}
getBasicAuthRadioButton() {
return this.basicAuthRadioButton;
}
getSsoRadioButton() {
return this.ssoRadioButton;
}
getBackButton() {
return this.backButton;
}
getApplyButton() {
return this.applyButton;
}
async checkBasicAuthRadioIsSelected() {
const radioButton = this.getBasicAuthRadioButton();
await expect(await BrowserActions.getAttribute(radioButton, 'class')).toContain('mat-radio-checked');
}
async checkSsoRadioIsNotSelected() {
const radioButton = this.getSsoRadioButton();
await expect(await BrowserActions.getAttribute(radioButton, 'class')).not.toContain('mat-radio-checked');
}
}

View File

@@ -19,6 +19,7 @@ import { $, $$ } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { BrowserActions } from '../utils/browser-actions';
/** @deprecated Use Playwright API instead */
export class SnackbarPage {
notificationSnackBar = $$(`[data-automation-id='adf-snackbar-message-content']`).first();
@@ -41,6 +42,7 @@ export class SnackbarPage {
return this.notificationSnackBar.getText();
}
/** @deprecated Use Playwright API instead */
async getSnackBarActionMessage(): Promise<string> {
await this.waitForSnackBarToAppear();
return this.snackBarAction.getText();
@@ -51,6 +53,7 @@ export class SnackbarPage {
return this.decorativeIconSnackBar.getText();
}
/** @deprecated Use Playwright API instead */
async clickSnackBarAction(): Promise<void> {
await this.waitForSnackBarToAppear();
await BrowserActions.click(this.snackBarAction);

View File

@@ -17,33 +17,14 @@
import { $, $$ } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { TabsPage } from '../../core/pages/material/tabs.page';
import { BrowserActions } from '../utils/browser-actions';
export class UserInfoPage {
dialog = $$('mat-card[class*="adf-userinfo-card"]').first();
userImage = $('div[id="user-initial-image"]');
userInfoEcmHeaderTitle = $('div[id="ecm-username"]');
userInfoEcmTitle = $('mat-card-content span[id="ecm-full-name"]');
ecmEmail = $('span[id="ecm-email"]');
ecmJobTitle = $('span[id="ecm-job-title"]');
userInfoProcessHeaderTitle = $('div[id="bpm-username"]');
userInfoProcessTitle = $('mat-card-content span[id="bpm-full-name"]');
processEmail = $('span[id="bpm-email"]');
processTenant = $('.detail-profile');
apsImage = $('img[id="bpm-user-detail-image"]');
acsImage = $('img[id="ecm-user-detail-image"]');
initialImage = $$('div[data-automation-id="user-initials-image"]').first();
userInfoSsoHeaderTitle = this.dialog.$('div[id="identity-username"]');
userInfoSsoTitle = $('.adf-userinfo__detail-title');
ssoEmail = $('#identity-email');
userProfileButton = $('button[data-automation-id="adf-user-profile"]');
tabsPage = new TabsPage();
async dialogIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.dialog);
}
async dialogIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.dialog);
@@ -53,59 +34,6 @@ export class UserInfoPage {
await BrowserActions.click(this.userProfileButton);
}
async clickOnContentServicesTab(): Promise<void> {
await this.tabsPage.clickTabByTitle('Content Services');
}
async checkProcessServicesTabIsSelected(): Promise<void> {
await this.tabsPage.checkTabIsSelectedByTitle('Process Services');
}
async checkContentServicesTabIsSelected(): Promise<void> {
await this.tabsPage.checkTabIsSelectedByTitle('Content Services');
}
async clickOnProcessServicesTab(): Promise<void> {
await this.tabsPage.clickTabByTitle('Process Services');
}
async userImageIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.userImage);
}
async getContentHeaderTitle(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.dialog);
return BrowserActions.getText(this.userInfoEcmHeaderTitle);
}
async getContentTitle(): Promise<string> {
return BrowserActions.getText(this.userInfoEcmTitle);
}
async getContentEmail(): Promise<string> {
return BrowserActions.getText(this.ecmEmail);
}
async getContentJobTitle(): Promise<string> {
return BrowserActions.getText(this.ecmJobTitle);
}
async getProcessHeaderTitle(): Promise<string> {
return BrowserActions.getText(this.userInfoProcessHeaderTitle);
}
async getProcessTitle(): Promise<string> {
return BrowserActions.getText(this.userInfoProcessTitle);
}
async getProcessEmail(): Promise<string> {
return BrowserActions.getText(this.processEmail);
}
async getProcessTenant(): Promise<string> {
return BrowserActions.getText(this.processTenant);
}
async getSsoHeaderTitle(): Promise<string> {
return BrowserActions.getText(this.userInfoSsoHeaderTitle);
}
@@ -122,31 +50,4 @@ export class UserInfoPage {
await BrowserVisibility.waitUntilElementIsVisible(this.dialog);
await BrowserActions.closeMenuAndDialogs();
}
async checkACSProfileImage(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.acsImage);
}
async checkAPSProfileImage(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.apsImage);
}
async checkInitialImage(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.initialImage);
}
async initialImageNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.initialImage);
}
// eslint-disable-next-line @typescript-eslint/naming-convention
async ACSProfileImageNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.acsImage);
}
// eslint-disable-next-line @typescript-eslint/naming-convention
async APSProfileImageNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.apsImage);
}
}

View File

@@ -38,18 +38,16 @@ export class ViewerPage {
zoomOutButton = $('#viewer-zoom-out-button');
scalePageButton = $('#viewer-scale-page-button');
fullScreenButton = $('button[data-automation-id="adf-toolbar-fullscreen"]');
rotateLeft = $('button[id="viewer-rotate-left-button"]');
rotateRight = $('button[id="viewer-rotate-right-button"]');
scaleImg = $('button[id="viewer-reset-button"]');
fileThumbnail = $('img[data-automation-id="adf-file-thumbnail"]');
pageSelectorInput = $('input[data-automation-id="adf-page-selector"]');
imgContainer = $('div[data-automation-id="adf-image-container"]');
mediaContainer = $('.adf-media-player');
percentage = $('div[data-automation-id="adf-page-scale"');
percentage = $('div[data-automation-id="adf-page-scale"]');
thumbnailsBtn = $('button[data-automation-id="adf-thumbnails-button"]');
thumbnailsContent = $('div[data-automation-id="adf-thumbnails-content"]');
thumbnailsClose = $('button[data-automation-id="adf-thumbnails-close"]');
secondThumbnail = $('adf-pdf-thumb > img[title="Page 2"');
secondThumbnail = $('adf-pdf-thumb > img[title="Page 2"]');
lastThumbnailDisplayed = $$('adf-pdf-thumb').last();
passwordDialog = $('adf-pdf-viewer-password-dialog');
passwordSubmit = $('button[data-automation-id="adf-password-dialog-submit"]');
@@ -60,7 +58,6 @@ export class ViewerPage {
infoSideBar = $('#adf-right-sidebar');
leftSideBar = $('#adf-left-sidebar');
viewer = $('adf-viewer');
pdfViewer = $('adf-pdf-viewer');
imgViewer = $('adf-img-viewer');
activeTab = $('div[class*="mat-tab-label-active"]');
toolbarSwitch = $('#adf-switch-toolbar');
@@ -75,7 +72,6 @@ export class ViewerPage {
moreActionsMenuSwitch = $('#adf-switch-moreactionsmenu');
moreActionsMenu = $('button[data-automation-id="adf-toolbar-more-actions"]');
customNameSwitch = $('#adf-switch-custoname');
customToolbarToggle = $('#adf-toggle-custom-toolbar');
customToolbar = $('adf-viewer-toolbar[data-automation-id="adf-viewer-custom-toolbar"]');
@@ -98,16 +94,8 @@ export class ViewerPage {
timeButton = $('#adf-viewer-time');
bugButton = $('#adf-viewer-bug');
codeViewer = $('#adf-monaco-file-editor');
showTabWithIconSwitch = $('#adf-tab-with-icon');
showTabWithIconAndLabelSwitch = $('#adf-icon-and-label-tab');
unknownFormat = $(`adf-viewer-unknown-format .adf-viewer__unknown-format-view`);
async checkCodeViewerIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.codeViewer);
}
async viewFile(fileName: string): Promise<void> {
const fileView = $$(`#document-list-container div[data-automation-id="${fileName}"]`).first();
await BrowserActions.click(fileView);
@@ -254,12 +242,6 @@ export class ViewerPage {
await BrowserVisibility.waitUntilElementHasText(this.fileName, filename);
}
async checkFileIsOpenedInViewerAndClose(filename: string): Promise<void> {
await this.checkFileThumbnailIsDisplayed();
await this.checkFileNameIsDisplayed(filename);
await this.clickCloseButton();
}
async checkPreviousPageButtonIsDisplayed() {
await BrowserVisibility.waitUntilElementIsVisible(this.previousPageButton);
}
@@ -284,7 +266,7 @@ export class ViewerPage {
await BrowserVisibility.waitUntilElementIsVisible(this.scalePageButton);
}
async checkPageSelectorInputIsDisplayed(checkNumber): Promise<void> {
async checkPageSelectorInputIsDisplayed(checkNumber: string): Promise<void> {
await expect(await BrowserActions.getInputValue(this.pageSelectorInput)).toEqual(checkNumber);
}
@@ -312,10 +294,6 @@ export class ViewerPage {
await BrowserVisibility.waitUntilElementIsVisible(this.fullScreenButton);
}
async checkFullScreenButtonIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.fullScreenButton);
}
async checkPercentageIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.percentage);
}
@@ -328,23 +306,10 @@ export class ViewerPage {
await expect(await BrowserActions.getText(this.percentage)).toBeLessThan(zoom);
}
async checkRotateLeftButtonIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.rotateLeft);
}
async checkRotateRightButtonIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.rotateRight);
}
async checkScaleImgButtonIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.scaleImg);
}
async checkRotation(text): Promise<void> {
const rotation = await BrowserActions.getAttribute(this.imgContainer, 'style');
await expect(rotation).toEqual(text);
}
async checkInfoSideBarIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.infoSideBar);
}
@@ -406,10 +371,6 @@ export class ViewerPage {
await BrowserActions.click(this.thumbnailsBtn);
}
async clickScaleImgButton(): Promise<void> {
await BrowserActions.click(this.scaleImg);
}
async clickDownloadButton(): Promise<void> {
await BrowserActions.click(this.downloadButton);
}
@@ -442,14 +403,6 @@ export class ViewerPage {
await BrowserActions.click(this.fullScreenButton);
}
async clickRotateLeftButton(): Promise<void> {
await BrowserActions.click(this.rotateLeft);
}
async clickRotateRightButton(): Promise<void> {
await BrowserActions.click(this.rotateRight);
}
async getActiveTab(): Promise<string> {
return BrowserActions.getText(this.activeTab);
}
@@ -514,15 +467,6 @@ export class ViewerPage {
await this.togglePage.enableToggle(this.openWithSwitch);
}
async enableShowTabWithIcon(): Promise<void> {
await browser.executeScript('arguments[0].scrollIntoView()', this.showTabWithIconSwitch);
await this.togglePage.enableToggle(this.showTabWithIconSwitch);
}
async enableShowTabWithIconAndLabel(): Promise<void> {
await this.togglePage.enableToggle(this.showTabWithIconAndLabelSwitch);
}
async checkDownloadButtonIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.downloadButton);
}
@@ -600,14 +544,6 @@ export class ViewerPage {
await BrowserVisibility.waitUntilElementIsVisible(this.customToolbar);
}
async disableCustomName(): Promise<void> {
await this.togglePage.disableToggle(this.customNameSwitch);
}
async enableCustomName(): Promise<void> {
await this.togglePage.enableToggle(this.customNameSwitch);
}
async clickToggleRightSidebar(): Promise<void> {
await BrowserActions.click(this.showRightSidebarSwitch);
}
@@ -616,11 +552,6 @@ export class ViewerPage {
await BrowserActions.click(this.showLeftSidebarSwitch);
}
async enterCustomName(text: string): Promise<void> {
const textField = $('input[data-automation-id="adf-text-custom-name"]');
await BrowserActions.clearSendKeys(textField, text);
}
async disableOverlay(): Promise<void> {
await this.togglePage.disableToggle($('#adf-viewer-overlay'));
}
@@ -633,26 +564,6 @@ export class ViewerPage {
await BrowserVisibility.waitUntilElementIsVisible($('div[class*="adf-viewer-inline-container"]'));
}
async checkTabHasNoIcon(index: number): Promise<void> {
const tab = $(`div[id="mat-tab-label-1-${index}"] .mat-tab-label-content mat-icon`);
await BrowserVisibility.waitUntilElementIsNotVisible(tab);
}
async checkTabHasNoLabel(index: number): Promise<void> {
const tab = $(`div[id="mat-tab-label-1-${index}"] .mat-tab-label-content span`);
await BrowserVisibility.waitUntilElementIsNotVisible(tab);
}
async getTabLabelById(index: number): Promise<string> {
const tab = $(`div[id="mat-tab-label-1-${index}"] .mat-tab-label-content span`);
return BrowserActions.getText(tab);
}
async getTabIconById(index: number): Promise<string> {
const tab = $(`div[id="mat-tab-label-1-${index}"] .mat-tab-label-content mat-icon`);
return BrowserActions.getText(tab);
}
async checkUnknownFormatIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.unknownFormat);
}

View File

@@ -1,72 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { $ } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { ContentNodeSelectorDialogPage } from '../../content-services/dialog/content-node-selector-dialog.page';
import { DocumentListPage } from '../../content-services/pages/document-list.page';
import { Logger } from '../../core/utils/logger';
export class ExternalNodeSelectorDialogPage extends ContentNodeSelectorDialogPage {
txtUsername = $('input[id="username"]');
txtPassword = $('input[id="password"]');
loginElement = $('[data-automation-id="attach-file-dialog-actions-login"]');
title = $('[data-automation-id="content-node-selector-title"]');
constructor() {
super();
this.dialog = $(`adf-content-node-selector-panel`);
this.contentList = new DocumentListPage(this.dialog);
this.dataTable = this.contentList.dataTablePage();
this.header = this.dialog.$(`header[data-automation-id='content-node-selector-title']`);
this.searchInputElement = this.dialog.$(`input[data-automation-id='content-node-selector-search-input']`);
this.selectedRow = this.dialog.$(`adf-datatable-row[class*="adf-is-selected"]`);
this.moveCopyButton = $(`button[data-automation-id="attach-file-dialog-actions-choose"]`);
}
async getTitle(): Promise<string> {
await BrowserVisibility.waitUntilElementIsPresent(this.title);
return this.title.getText();
}
async clickLoginButton() {
await BrowserActions.click(this.loginElement);
}
async enterUsername(username): Promise<void> {
await BrowserActions.clearSendKeys(this.txtUsername, username);
}
async enterPassword(password): Promise<void> {
await BrowserActions.clearSendKeys(this.txtPassword, password);
}
async waitForLogInDialog(): Promise<void> {
await BrowserVisibility.waitUntilElementIsPresent(this.title);
await BrowserVisibility.waitUntilElementIsPresent(this.txtUsername);
await BrowserVisibility.waitUntilElementIsPresent(this.txtPassword);
await BrowserVisibility.waitUntilElementIsPresent(this.loginElement);
}
async login(username, password): Promise<void> {
Logger.log('Login external With ' + username);
await this.waitForLogInDialog();
await this.enterUsername(username);
await this.enterPassword(password);
await this.clickLoginButton();
}
}

View File

@@ -20,10 +20,7 @@ export * from './process-filters.page';
export * from './process-list.page';
export * from './task-list.page';
export * from './task-filters.page';
export * from './task-header.page';
export * from './process-instance-tasks.page';
export * from './process-instance-header.page';
export * from './start-process.page';
export * from './select-apps-dialog.page';
export * from './external-node-selector-dialog.page';
export * from './task-form.page';

View File

@@ -1,52 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { BrowserVisibility } from '../../core/utils/browser-visibility';
import { $ } from 'protractor';
import { BrowserActions } from '../../core/utils/browser-actions';
import { DropdownPage } from '../../core/pages/material/dropdown.page';
export class SelectAppsDialog {
selectAppsDialog = $('mat-dialog-container[aria-labelledby="adf-select-app-dialog-title"]');
title = $('#adf-select-app-dialog-title');
appsDropdown = new DropdownPage($('#adf-select-app-dialog-dropdown'));
continueButton = $('adf-select-apps-dialog .mat-button-wrapper');
async checkSelectAppsDialogIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.selectAppsDialog);
}
async selectApp(appName: string): Promise<void> {
await this.appsDropdown.selectDropdownOption(appName);
}
async getTitle(): Promise<string> {
return BrowserActions.getText(this.title);
}
async clickAppsDropdown(): Promise<void> {
await this.appsDropdown.clickDropdown();
}
async clickContinueButton(): Promise<void> {
await BrowserActions.click(this.continueButton);
}
async checkSelectAppsDialogIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.selectAppsDialog);
}
}

View File

@@ -1,91 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CardTextItemPage } from '../../core/pages/card-view/card-view-text-item.page';
import { CardDateItemPage } from '../../core/pages/card-view/card-view-date-item.page';
export class TaskHeaderPage {
assignee = new CardTextItemPage('assignee');
status = new CardTextItemPage('status');
priority = new CardTextItemPage('priority');
dueDate = new CardDateItemPage('dueDate');
category = new CardTextItemPage('category');
parentName = new CardDateItemPage('parentName');
createdDate = new CardDateItemPage('created');
duration = new CardTextItemPage('duration');
parentTaskId = new CardTextItemPage('parentTaskId');
endDate = new CardDateItemPage('endDate');
id = new CardTextItemPage('id');
description = new CardTextItemPage('description');
formName = new CardTextItemPage('formName');
async isIdFieldDisplayed(): Promise<boolean> {
try {
await this.id.checkLabelIsVisible();
return true;
} catch (e) {
return false;
}
}
async getIdFieldValue(): Promise<string> {
return this.id.getFieldValue();
}
async isStatusFieldDisplayed(): Promise<boolean> {
try {
await this.status.checkLabelIsVisible();
return true;
} catch (e) {
return false;
}
}
async getStatusFieldValue(): Promise<string> {
return this.status.getFieldValue();
}
async isPriorityFieldDisplayed(): Promise<boolean> {
try {
await this.priority.checkLabelIsVisible();
return true;
} catch (e) {
return false;
}
}
async getPriorityFieldValue(): Promise<string> {
return this.priority.getFieldValue();
}
async setPriorityFieldValue(priority): Promise<void> {
await this.priority.enterTextField(priority);
}
async getDueDateFieldValue(): Promise<string> {
return this.dueDate.getDateValue();
}
async setDueDateFieldValue(date): Promise<void> {
await this.dueDate.setDateValue(date);
}
async setDueDateFieldValueToCurrentDate(): Promise<void> {
await this.dueDate.setTodayDateValue();
}
}