mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-1797] added e2e automated tests (#5509)
* added e2e automation - [C260064] Should download only the last selection when changing pages in Single mode * [AAE-1797] added e2e automated test- start a process within ACS * refactoring with dropdownPage * spellcheck refactoring
This commit is contained in:
committed by
GitHub
parent
6bf8c17771
commit
e5efe74e5e
@@ -24,6 +24,8 @@ export class PaginationPage {
|
||||
pageSelectorDropDown: ElementFinder = element(by.css('div[class*="adf-pagination__page-selector"]'));
|
||||
pageSelectorArrow: ElementFinder = element(by.css('button[data-automation-id="page-selector"]'));
|
||||
itemsPerPage: ElementFinder = element(by.css('span[class="adf-pagination__max-items"]'));
|
||||
itemsPerPageOpenDropdown: ElementFinder = element(by.css('.adf-pagination__perpage-block button'));
|
||||
itemsPerPageOptions: Locator = by.css('.adf-pagination__page-selector .mat-menu-item');
|
||||
currentPage: ElementFinder = element(by.css('span[class="adf-pagination__current-page"]'));
|
||||
totalPages: ElementFinder = element(by.css('span[class="adf-pagination__total-pages"]'));
|
||||
paginationRange: ElementFinder = element(by.css('span[class="adf-pagination__range"]'));
|
||||
@@ -53,6 +55,10 @@ export class PaginationPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.pageSelectorArrow);
|
||||
}
|
||||
|
||||
async clickItemsPerPageDropdown(): Promise<void> {
|
||||
await BrowserActions.click(this.itemsPerPageOpenDropdown);
|
||||
}
|
||||
|
||||
async checkPaginationIsNotDisplayed() {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.paginationSectionEmpty);
|
||||
}
|
||||
@@ -99,6 +105,18 @@ export class PaginationPage {
|
||||
return initialList;
|
||||
}
|
||||
|
||||
async getItemsPerPageDropdownOptions() {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element.all(this.itemsPerPageOptions).first());
|
||||
const initialList = [];
|
||||
await element.all(this.itemsPerPageOptions).each(async (currentOption) => {
|
||||
const text = await BrowserActions.getText(currentOption);
|
||||
if (text !== '') {
|
||||
initialList.push(text);
|
||||
}
|
||||
});
|
||||
return initialList;
|
||||
}
|
||||
|
||||
async checkNextPageButtonIsDisabled(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.nextButtonDisabled);
|
||||
}
|
||||
|
@@ -17,3 +17,4 @@
|
||||
|
||||
export * from './form-fields.page';
|
||||
export * from './start-process-dialog.page';
|
||||
export * from './select-apps-dialog.page';
|
||||
|
@@ -0,0 +1,53 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* 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 { by, element, ElementFinder } from 'protractor';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
|
||||
export class SelectAppsDialog {
|
||||
|
||||
selectAppsDialog: ElementFinder = element(by.css('mat-dialog-container[aria-labelledby="adf-select-app-dialog-title"]'));
|
||||
title: ElementFinder = element(by.id('adf-select-app-dialog-title'));
|
||||
dropdownAppsButton: ElementFinder = element(by.id('adf-select-app-dialog-dropdown'));
|
||||
appsOption: ElementFinder = element(by.css('.mat-option span'));
|
||||
continueButton: ElementFinder = element(by.css('adf-select-apps-dialog .mat-button-wrapper'));
|
||||
|
||||
async checkSelectAppsDialogIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.selectAppsDialog);
|
||||
}
|
||||
|
||||
async getTitle(): Promise<string> {
|
||||
return BrowserActions.getText(this.title);
|
||||
}
|
||||
|
||||
async clickDropdownAppsButton(): Promise<void> {
|
||||
await BrowserActions.click(this.dropdownAppsButton);
|
||||
}
|
||||
|
||||
async clickContinueButton(): Promise<void> {
|
||||
await BrowserActions.click(this.continueButton);
|
||||
}
|
||||
|
||||
async clickAppsOption(): Promise<void> {
|
||||
await BrowserActions.click(this.appsOption);
|
||||
}
|
||||
|
||||
async checkSelectAppsDialogIsNotDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.selectAppsDialog);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user