exclude one test and do some fixes (#1869)

* exclude one test and do some fixes

* try to get more logs

* some more fixes

* try to workaround the slow update of toggle menus

* more logging

* no message

* trigger another run

* Update delete-undo-delete.test.ts

* no message

* rename methods

* no message

* no message

* no message

* no message

* no message

* no message

* update travis.yml

* run travis on branch

* trigger travis

* cleanup

* no message
This commit is contained in:
Adina Parpalita
2020-12-15 12:10:01 +02:00
committed by GitHub
parent 7a5350a06d
commit 13fa065654
31 changed files with 581 additions and 389 deletions

View File

@@ -190,6 +190,7 @@ export class DataTable extends Component {
}
async hasCheckMarkIcon(itemName: string, location: string = ''): Promise<boolean> {
Logger.info(`--- check if item already selected : ${itemName} ${location}`);
const row = this.getRowByName(itemName, location);
return row.element(by.css('.mat-icon[class*="selected"]')).isPresent();
}
@@ -235,6 +236,7 @@ export class DataTable extends Component {
const isSelected = await this.hasCheckMarkIcon(name, location);
if (!isSelected) {
try {
Logger.info(`--- selecting item : ${name} ${location}`);
const item = this.getRowFirstCell(name, location);
await item.click();
} catch (e) {

View File

@@ -61,14 +61,18 @@ export class CreateFromTemplateDialog extends GenericDialog {
}
}
async getName(): Promise<string> {
async getNameInputValue(): Promise<string> {
return BrowserActions.getInputValue(this.nameInput);
}
async getDescription(): Promise<string> {
async getDescriptionValue(): Promise<string> {
return BrowserActions.getInputValue(this.descriptionTextArea);
}
async getTitleInputValue(): Promise<string> {
return BrowserActions.getInputValue(this.titleInput);
}
async enterName(name: string): Promise<void> {
await typeText(this.nameInput, name);
}

View File

@@ -60,7 +60,7 @@ export abstract class GenericDialog {
return isPresentAndDisplayed(this.rootElem);
}
async getTitle(): Promise<string> {
async getDialogTitle(): Promise<string> {
return this.title.getText();
}

View File

@@ -48,7 +48,7 @@ export class ShareDialog extends GenericDialog {
super('.adf-share-dialog');
}
async getTitle(): Promise<string> {
async getDialogTitle(): Promise<string> {
return this.dialogTitle.getText();
}

View File

@@ -82,6 +82,7 @@ export class Toolbar extends Component {
await BrowserActions.click(moreMenu);
await this.menu.waitForMenuToOpen();
await browser.sleep(500);
}
async closeMoreMenu() {

View File

@@ -37,6 +37,7 @@ export class Viewer extends Component {
fileTitle = this.byCss('.adf-viewer__file-title');
viewerExtensionContent = this.byCss('adf-preview-extension');
pdfViewerContentPages = this.allByCss('.adf-pdf-viewer__content .page');
txtViewerContent = this.byCss('.adf-txt-viewer-content');
toolbar = new Toolbar('adf-viewer');
@@ -44,7 +45,7 @@ export class Viewer extends Component {
super('adf-viewer', ancestor);
}
async waitForViewerToOpen() {
async waitForViewerToOpen(): Promise<void> {
try {
await waitForPresence(this.viewerContainer);
await waitForPresence(this.viewerLayout);
@@ -53,6 +54,15 @@ export class Viewer extends Component {
}
}
async waitForTxtViewerToLoad(): Promise<void> {
try {
await this.waitForViewerToOpen();
await waitForPresence(this.txtViewerContent);
} catch (error) {
Logger.error('\n-----> catch waitForTxtViewerToLoad <-----\n', error);
}
}
async isViewerOpened() {
return browser.isElementPresent(this.viewerLayout);
}
@@ -94,11 +104,6 @@ export class Viewer extends Component {
return count > 0;
}
async clickDownloadButton(): Promise<void> {
const downloadButton: ElementFinder = element(by.id(`app.viewer.download`));
await BrowserActions.click(downloadButton);
}
async clickCloseButton(): Promise<void> {
const closeButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-back"]'));
await BrowserActions.click(closeButton);