mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
Unexclude due the timeout (#1805)
* change base method to wait * fix import * reduce log * fix * data placeholder * fix * fix * fix * fix style * change visibility with common method * fix * use common get value method * remove unused import * fix a few incorrect api calls * - use separate variables * correctly wait for items after they have been created * use browseraction click * Exclude failing tests * increase timeout and some fix * check env before execute test * simplify conf * exclude * rerun * logs * refactor pagination tests to use only 51 items take out pagination tests into a separate stage * fix check * remove hardcoded total items. other shared files might already exist Co-authored-by: Adina Parpalita <Adina.Parpalita@ness.com> Co-authored-by: iuliaib <iulia.burca@ness.com>
This commit is contained in:
@@ -25,7 +25,8 @@
|
||||
|
||||
import { by, browser } from 'protractor';
|
||||
import { Component } from '../component';
|
||||
import { isPresentAndDisplayed, waitForVisibility } from '../../utilities/utils';
|
||||
import { isPresentAndDisplayed } from '../../utilities/utils';
|
||||
import { BrowserActions, BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export type SortByType = 'Relevance' | 'Title' | 'Filename' | 'Modified date' | 'Modifier' | 'Created date' | 'Size' | 'Type';
|
||||
export type SortOrderType = 'ASC' | 'DESC' | '';
|
||||
@@ -41,7 +42,11 @@ export class SearchSortingPicker extends Component {
|
||||
}
|
||||
|
||||
async waitForSortByDropdownToExpand(): Promise<void> {
|
||||
await waitForVisibility(this.sortByDropdownExpanded, 'Timeout waiting for sortBy dropdown to expand');
|
||||
await BrowserVisibility.waitUntilElementIsVisible(
|
||||
this.sortByDropdownExpanded,
|
||||
BrowserVisibility.DEFAULT_TIMEOUT,
|
||||
'Timeout waiting for sortBy dropdown to expand'
|
||||
);
|
||||
}
|
||||
|
||||
async isSortOrderButtonDisplayed(): Promise<boolean> {
|
||||
@@ -73,7 +78,7 @@ export class SearchSortingPicker extends Component {
|
||||
}
|
||||
|
||||
async clickSortByDropdown(): Promise<void> {
|
||||
await this.sortByDropdownCollapsed.click();
|
||||
await BrowserActions.click(this.sortByDropdownCollapsed);
|
||||
await this.waitForSortByDropdownToExpand();
|
||||
}
|
||||
|
||||
@@ -88,18 +93,18 @@ export class SearchSortingPicker extends Component {
|
||||
await this.clickSortByDropdown();
|
||||
}
|
||||
const elem = browser.element(by.cssContainingText('.mat-option .mat-option-text', option));
|
||||
await elem.click();
|
||||
await BrowserActions.click(elem);
|
||||
}
|
||||
|
||||
async setSortOrderASC(): Promise<void> {
|
||||
if ((await this.getSortOrder()) !== 'ASC') {
|
||||
await this.sortOrderButton.click();
|
||||
await BrowserActions.click(this.sortOrderButton);
|
||||
}
|
||||
}
|
||||
|
||||
async setSortOrderDESC(): Promise<void> {
|
||||
if ((await this.getSortOrder()) !== 'DESC') {
|
||||
await this.sortOrderButton.click();
|
||||
await BrowserActions.click(this.sortOrderButton);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user