- remove some awaits

- add try catch
- small refactoring
This commit is contained in:
Adina Parpalita
2019-10-17 17:31:29 +03:00
parent 9fd47d3186
commit 227e05e3f9
39 changed files with 1243 additions and 905 deletions

View File

@@ -58,11 +58,11 @@ export class ContentMetadata extends Component {
}
async isPropertiesListExpanded() {
return await browser.isElementPresent(this.expandedPanel);
return browser.isElementPresent(this.expandedPanel);
}
async waitForImagePropertiesPanelToExpand() {
return await browser.wait(EC.visibilityOf(this.expandedImagePropertiesPanel), BROWSER_WAIT_TIMEOUT);
await browser.wait(EC.visibilityOf(this.expandedImagePropertiesPanel), BROWSER_WAIT_TIMEOUT);
}
async getVisiblePropertiesLabels() {
@@ -98,19 +98,19 @@ export class ContentMetadata extends Component {
}
async isLessInfoButtonDisplayed() {
return await browser.isElementPresent(this.lessInfoButton);
return browser.isElementPresent(this.lessInfoButton);
}
async isMoreInfoButtonDisplayed() {
return await browser.isElementPresent(this.moreInfoButton);
return browser.isElementPresent(this.moreInfoButton);
}
async clickLessInformationButton() {
return await this.lessInfoButton.click();
await this.lessInfoButton.click();
}
async clickMoreInformationButton() {
return await this.moreInfoButton.click();
await this.moreInfoButton.click();
}
async isImagePropertiesPanelDisplayed() {
@@ -118,7 +118,7 @@ export class ContentMetadata extends Component {
}
async clickImagePropertiesPanel() {
return await this.imagePropertiesPanel.click();
await this.imagePropertiesPanel.click();
}
}