include attach file test (#6102)

* include attach file test

* fix

* fix

* fix

* fix
This commit is contained in:
Eugenio Romano
2020-09-10 21:28:50 +01:00
committed by GitHub
parent e765239cbf
commit 5305d65121
9 changed files with 72 additions and 24 deletions

View File

@@ -151,6 +151,7 @@ export class ContentNodeSelectorDialogPage {
async searchAndSelectResult(searchText: string, name: string) {
await this.typeIntoNodeSelectorSearchField(searchText);
await this.contentListPage().dataTablePage().waitTillContentLoaded();
try {
await this.contentListPage().dataTablePage().checkRowContentIsDisplayed(name);
} catch (e) {

View File

@@ -300,6 +300,29 @@ export class DataTableComponentPage {
}
}
try {
Logger.log('wait first element is present');
await BrowserVisibility.waitUntilElementIsVisible(this.contents.first());
} catch (error) {
Logger.log('Possible empty page');
}
}
async waitTillContentLoadedInfinitePagination(): Promise<void> {
await browser.sleep(500);
if (element(by.tagName('mat-progress-bar')).isPresent()) {
Logger.log('wait datatable loading spinner disappear');
await BrowserVisibility.waitUntilElementIsNotPresent(element(by.tagName('mat-progress-bar')));
} else {
try {
Logger.log('wait datatable loading spinner is present');
await BrowserVisibility.waitUntilElementIsPresent(element(by.tagName('mat-progress-bar')));
} catch (error) {
}
}
try {
Logger.log('wait first element is present');
await BrowserVisibility.waitUntilElementIsVisible(this.contents.first(), 1000);

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Locator, by, element } from 'protractor';
import { Locator, by, element, browser } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility';
import { BrowserActions } from '../utils/browser-actions';
import { Logger } from '../utils/logger';
@@ -47,6 +47,7 @@ export class PaginationPage {
await BrowserActions.click(itemsPerPage);
await BrowserVisibility.waitUntilElementIsNotVisible(this.pageSelectorDropDown);
Logger.log('Select page size ', numberOfItem);
await browser.sleep(500);
}
async checkPageSelectorIsNotDisplayed(): Promise<void> {
@@ -82,8 +83,8 @@ export class PaginationPage {
}
async clickOnNextPage(): Promise<void> {
return BrowserActions.click(this.nextPageButton);
Logger.log('Next page');
return BrowserActions.click(this.nextPageButton);
}
async clickOnPageDropdown(): Promise<void> {