[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

@@ -1,108 +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 { by, element, $, $$, browser } from 'protractor';
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class PeopleGroupCloudComponentPage {
peopleCloudSingleSelectionChecked = $('mat-radio-button[data-automation-id="app-people-single-mode"][class*="mat-radio-checked"]');
peopleCloudMultipleSelectionChecked = $('mat-radio-button[data-automation-id="app-people-multiple-mode"][class*="mat-radio-checked"]');
peopleCloudSingleSelection = $('mat-radio-button[data-automation-id="app-people-single-mode"]');
peopleCloudMultipleSelection = $('mat-radio-button[data-automation-id="app-people-multiple-mode"]');
groupCloudSingleSelection = $('mat-radio-button[data-automation-id="app-group-single-mode"]');
groupCloudMultipleSelection = $('mat-radio-button[data-automation-id="app-group-multiple-mode"]');
peopleRoleInput = $('input[data-automation-id="app-people-roles-input"]');
peopleAppInput = $('input[data-automation-id="app-people-app-input"]');
peoplePreselect = $('input[data-automation-id="app-people-preselect-input"]');
groupRoleInput = $('input[data-automation-id="app-group-roles-input"]');
groupAppInput = $('input[data-automation-id="app-group-app-input"]');
peopleCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'People Cloud Component'));
groupCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'Groups Cloud Component'));
preselectValidation = $$('mat-checkbox.app-preselect-value label').first();
preselectValidationStatus = $$('mat-checkbox.app-preselect-value label input').first();
async navigateTo() {
await browser.get('#/cloud/people-group-cloud');
await browser.waitForAngular();
}
async checkPeopleCloudComponentTitleIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudComponentTitle);
}
async checkGroupsCloudComponentTitleIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.groupCloudComponentTitle);
}
async clickPeopleCloudSingleSelection(): Promise<void> {
await BrowserActions.click(this.peopleCloudSingleSelection);
}
async clickPeopleCloudMultipleSelection(): Promise<void> {
await BrowserActions.click(this.peopleCloudMultipleSelection);
}
async checkPeopleCloudSingleSelectionIsSelected(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudSingleSelectionChecked);
}
async checkPeopleCloudMultipleSelectionIsSelected(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudMultipleSelectionChecked);
}
async enterPeopleRoles(roles: string): Promise<void> {
await BrowserActions.clearSendKeys(this.peopleRoleInput, roles);
}
async enterPeoplePreselect(preselect: string): Promise<void> {
await BrowserActions.clearSendKeys(this.peoplePreselect, preselect);
}
async clearField(locator): Promise<void> {
await BrowserActions.clearSendKeys(locator, '');
}
async clickGroupCloudSingleSelection(): Promise<void> {
await BrowserActions.click(this.groupCloudSingleSelection);
}
async clickGroupCloudMultipleSelection(): Promise<void> {
await BrowserActions.click(this.groupCloudMultipleSelection);
}
async enterGroupRoles(roles): Promise<void> {
await BrowserActions.clearSendKeys(this.groupRoleInput, roles);
}
async clickPreselectValidation(): Promise<void> {
await BrowserActions.click(this.preselectValidation);
}
async getPreselectValidationStatus(): Promise<string> {
return BrowserActions.getAttribute(this.preselectValidationStatus, 'aria-checked');
}
async enterPeopleAppName(appName: string): Promise<void> {
await BrowserActions.clearSendKeys(this.peopleAppInput, appName);
}
async enterGroupAppName(appName: string): Promise<void> {
await BrowserActions.clearSendKeys(this.groupAppInput, appName);
}
}

View File

@@ -1,74 +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,
BrowserActions,
DataTableComponentPage
} from '@alfresco/adf-testing';
export class ServiceTaskListPage {
dataTableComponentPage = new DataTableComponentPage();
allServiceTaskButton = $('button[data-automation-id="my-service-tasks_filter"]');
completedServiceTaskButton = $('button[data-automation-id="completed-tasks_filter"]');
errorServiceTaskButton = $('button[data-automation-id="errored-service-tasks_filter"]');
searchHeader = $('adf-cloud-edit-service-task-filter mat-expansion-panel-header');
serviceTaskList = $('adf-cloud-service-task-list');
activityNameField = $('input[data-automation-id="adf-cloud-edit-task-property-activityName"]');
activityStatus = $('[data-automation-id="datatable-row-0"] div[aria-label="Status"]');
activityName = $('[data-automation-id="datatable-row-0"] div[aria-label="Activity name"]');
resultList = $('div[role="rowgroup"].adf-datatable-body');
async checkServiceTaskFiltersDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.allServiceTaskButton);
await BrowserVisibility.waitUntilElementIsVisible(this.completedServiceTaskButton);
await BrowserVisibility.waitUntilElementIsVisible(this.errorServiceTaskButton);
}
async checkSearchServiceTaskFiltersDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.searchHeader);
}
async checkServiceTaskListDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.serviceTaskList);
}
async clickCompletedServiceTask(): Promise<void> {
await BrowserActions.click(this.completedServiceTaskButton);
}
async clickSearchHeaderServiceTask(): Promise<void> {
await BrowserActions.click(this.searchHeader);
}
async searchByActivityName(text: string): Promise<void> {
await BrowserActions.clearSendKeys(this.activityNameField, text);
}
async getActivityNameText(): Promise<string> {
return BrowserActions.getText(this.activityName);
}
async getStatusText(): Promise<string> {
return BrowserActions.getText(this.activityStatus);
}
async checkServiceTaskListResultsIsLoaded(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.resultList);
}
}

View File

@@ -25,26 +25,16 @@ import {
} from '@alfresco/adf-testing';
export class TasksCloudDemoPage {
createButton = TestElement.byCss('button[data-automation-id="create-button"');
newTaskButton = TestElement.byCss('button[data-automation-id="btn-start-task"]');
settingsButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Settings')).first();
appButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'App')).first();
displayTaskDetailsToggle = $('mat-slide-toggle[data-automation-id="taskDetailsRedirection"]');
displayProcessDetailsToggle = $('mat-slide-toggle[data-automation-id="processDetailsRedirection"]');
actionMenuToggle = $('mat-slide-toggle[data-automation-id="actionmenu"]');
contextMenuToggle = $('mat-slide-toggle[data-automation-id="contextmenu"]');
multiSelectionToggle = $('mat-slide-toggle[data-automation-id="multiSelection"]');
testingModeToggle = $('mat-slide-toggle[data-automation-id="testingMode"]');
selectedRows = element(by.xpath('//div[text()=\' Selected Rows: \']'));
noOfSelectedRows = element.all(by.xpath('//div[text()=\' Selected Rows: \']//li'));
addActionTitle = element(by.cssContainingText('.mat-card-title', 'Add Action'));
keyInputField = TestElement.byCss('input[data-placeholder="Key"]');
titleInputField = TestElement.byCss('input[data-placeholder="Title"]');
iconInputField = TestElement.byCss('input[data-placeholder="Icon"]');
addActionButton = TestElement.byText('button span', 'Add');
disableCheckbox = TestElement.byCss(`mat-checkbox[formcontrolname='disabled']`);
visibleCheckbox = TestElement.byCss(`mat-checkbox[formcontrolname='visible']`);
spinner = TestElement.byTag('mat-progress-spinner');
modeDropdown = new DropdownPage($('mat-form-field[data-automation-id="selectionMode"]'));
@@ -66,14 +56,6 @@ export class TasksCloudDemoPage {
await this.togglePage.enableToggle(this.multiSelectionToggle);
}
async enableActionMenu(): Promise<void> {
await this.togglePage.enableToggle(this.actionMenuToggle);
}
async enableContextMenu(): Promise<void> {
await this.togglePage.enableToggle(this.contextMenuToggle);
}
async enableTestingMode(): Promise<void> {
await this.togglePage.enableToggle(this.testingModeToggle);
}
@@ -118,44 +100,6 @@ export class TasksCloudDemoPage {
return BrowserActions.getText(row);
}
addActionIsDisplayed(): Promise<void> {
return new TestElement(this.addActionTitle).waitVisible();
}
async addAction(text: string): Promise<void> {
await this.keyInputField.typeText(text);
await this.titleInputField.typeText(text);
await this.iconInputField.typeText(text);
await this.addActionButton.click();
}
async addDisabledAction(text: string): Promise<void> {
await this.keyInputField.typeText(text);
await this.titleInputField.typeText(text);
await this.iconInputField.typeText(text);
await this.disableCheckbox.click();
await this.addActionButton.click();
}
async addInvisibleAction(text: string): Promise<void> {
await this.keyInputField.typeText(text);
await this.titleInputField.typeText(text);
await this.iconInputField.typeText(text);
await this.visibleCheckbox.click();
await this.addActionButton.click();
}
actionAdded(action: string): Promise<void> {
return TestElement.byText(`mat-chip`, action).waitVisible();
}
async checkActionExecuted(taskId: string, action: string): Promise<void> {
await TestElement.byText(`span`, 'Action Menu:').waitVisible();
await TestElement.byText(`span`, 'Context Menu:').waitVisible();
await TestElement.byText(`span`, 'Task ID: ' + taskId).waitVisible();
await TestElement.byText(`span`, 'Action Type: ' + action).waitVisible();
}
async clickStartNewTaskButton() {
await this.createButton.click();
await this.newTaskButton.click();

View File

@@ -33,7 +33,6 @@ describe('Applications list', () => {
let testUser;
const appNames = [];
let applications;
beforeAll(async () => {
await apiService.loginWithProfile('identityAdmin');
@@ -42,7 +41,7 @@ describe('Applications list', () => {
await loginSSOPage.login(testUser.username, testUser.password);
await apiService.login(testUser.username, testUser.password);
applications = await applicationsService.getApplicationsByStatus('RUNNING');
const applications = await applicationsService.getApplicationsByStatus('RUNNING');
applications.list.entries.forEach(app => {
appNames.push(app.entry.name.toLowerCase());