mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-08-07 17:48:54 +00:00
[AAE-1729] Move task-process filters methods into adf-testing, refactor dropdowns to use dropdown material testing page (#5467)
* [AAE-1729] Move task-process filters methods into adf-testing * [AAE-1729] Add default filters methods in testing package * [AAE-1729] Refactor testing package and e2e to use Dropdown testing page * [AAE-1729] Rename function * [AAE-1729] Fix failing e2e, add click and select dropdown method * [AAE-1729] Fix e2e * [AAE-1729] fix e2e * [AAE-1729] Add default filters methods in testing package * [AAE-1729] Slow down upload speed, fix cancel upload e2e * [AAE-1729] Undo slow down upload speed, fix cancel upload e2e
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder, protractor } from 'protractor';
|
||||
|
||||
export class ProcessListDemoPage {
|
||||
@@ -25,8 +25,9 @@ export class ProcessListDemoPage {
|
||||
emptyProcessContent: ElementFinder = element(by.css('div[class="adf-empty-content"]'));
|
||||
processDefinitionInput: ElementFinder = element(by.css('input[data-automation-id="process-definition-id"]'));
|
||||
processInstanceInput: ElementFinder = element(by.css('input[data-automation-id="process-instance-id"]'));
|
||||
stateSelector: ElementFinder = element(by.css('mat-select[data-automation-id="state"'));
|
||||
sortSelector: ElementFinder = element(by.css('mat-select[data-automation-id="sort"'));
|
||||
|
||||
stateDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="state"')));
|
||||
sortDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="sort"')));
|
||||
|
||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
||||
|
||||
@@ -34,16 +35,12 @@ export class ProcessListDemoPage {
|
||||
return this.dataTable.getAllRowsColumnValues('Name');
|
||||
}
|
||||
|
||||
async selectSorting(sort): Promise<void> {
|
||||
await BrowserActions.click(this.sortSelector);
|
||||
const sortLocator: ElementFinder = element(by.cssContainingText('mat-option span', sort));
|
||||
await BrowserActions.click(sortLocator);
|
||||
async selectSorting(sortingOption: string): Promise<void> {
|
||||
await this.sortDropdown.clickDropdownWithOption(sortingOption);
|
||||
}
|
||||
|
||||
async selectStateFilter(state): Promise<void> {
|
||||
await BrowserActions.click(this.stateSelector);
|
||||
const stateLocator: ElementFinder = element(by.cssContainingText('mat-option span', state));
|
||||
await BrowserActions.click(stateLocator);
|
||||
async selectStateFilter(stateOption: string): Promise<void> {
|
||||
await this.stateDropdown.clickDropdownWithOption(stateOption);
|
||||
}
|
||||
|
||||
async addAppId(appId): Promise<void> {
|
||||
@@ -82,12 +79,12 @@ export class ProcessListDemoPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.processInstanceInput);
|
||||
}
|
||||
|
||||
async checkStateFieldIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.stateSelector);
|
||||
async checkStateDropdownIsDisplayed(): Promise<void> {
|
||||
await this.stateDropdown.checkDropdownIsVisible();
|
||||
}
|
||||
|
||||
async checkSortFieldIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.sortSelector);
|
||||
async checkSortDropdownIsDisplayed(): Promise<void> {
|
||||
await this.sortDropdown.checkDropdownIsVisible();
|
||||
}
|
||||
|
||||
async addProcessDefinitionId(procDefinitionId): Promise<void> {
|
||||
|
Reference in New Issue
Block a user