increase default timeout due possible slow env (#1812)

* increase default timeout due possible slow env

* parallel test can affect this check

* unused call

* remove

* reduce size test lib

* fix search test

* remove log

* build

* reorganize file actionsAvailable tests

* fix

* fix

* Update single-file-actions.test.ts

* Update single-file-actions.test.ts

* fix viewer actions from search results tests

* fix snackbar actions tests

* forgot console.log

* exclude

Co-authored-by: Adina Parpalita <Adina.Parpalita@ness.com>
This commit is contained in:
Eugenio Romano
2020-11-23 10:35:28 +00:00
committed by GitHub
parent 092d430470
commit 8186ee16ac
31 changed files with 1979 additions and 1577 deletions

View File

@@ -276,7 +276,7 @@ export class DataTable extends Component {
async clearSelection(): Promise<void> {
try {
const count = await this.getSelectedRowsCount();
if (count !== 0) {
if (count > 0) {
await browser.refresh();
await this.wait();
}

View File

@@ -26,7 +26,7 @@
import { browser, by, protractor } from 'protractor';
import { Component } from '../component';
import { waitForPresence, waitElement } from '../../utilities/utils';
import { BrowserActions, BrowserVisibility } from '@alfresco/adf-testing';
import { BrowserActions } from '@alfresco/adf-testing';
export class SearchInput extends Component {
searchButton = this.component.element(by.css('.app-search-button'));
@@ -47,10 +47,6 @@ export class SearchInput extends Component {
await waitForPresence(this.searchControl);
}
async waitForSearchInputToBeInteractive() {
await BrowserVisibility.waitUntilElementIsClickable(this.searchControl);
}
async isSearchContainerDisplayed() {
const isContainerDisplayed = await this.searchContainer.isDisplayed();
const isSearchButtonDisplayed = await this.searchButton.isDisplayed();
@@ -154,7 +150,6 @@ export class SearchInput extends Component {
}
async searchFor(text: string) {
await this.waitForSearchInputToBeInteractive();
await BrowserActions.clearWithBackSpace(this.searchInput);
await this.searchInput.sendKeys(text);
await this.searchInput.sendKeys(protractor.Key.ENTER);

View File

@@ -96,7 +96,8 @@ export abstract class Page {
async clickSnackBarAction(): Promise<void> {
try {
await BrowserActions.click(this.byCss('.mat-simple-snackbar-action button'));
const action = await waitElement('.mat-simple-snackbar-action button');
await action.click();
} catch (e) {
Logger.error(e, '.......failed on click snack bar action.........');
}