diff --git a/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js b/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js index 6d88ad9c8b4..a171bf1a46a 100644 --- a/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js +++ b/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js @@ -10,10 +10,10 @@ module.exports = { this.api.page.personalPage().elements.sideBar ).waitForElementVisible(this.elements.fileInfoIcon) }, - closeSidebar: function(timeout = null) { + closeSidebar: async function(timeout = null) { timeout = timeoutHelper.parseTimeout(timeout) try { - this.click({ + await this.click({ selector: '@sidebarCloseBtn', timeout: timeout }) @@ -29,18 +29,14 @@ module.exports = { this.api.globals.waitForNegativeConditionTimeout ) if (!active) { - try { - this.click({ - selector: '@sidebarBackBtn' - }) - } catch (e) { - // do nothing - } + await this.click({ + selector: '@sidebarBackBtn', + timeout: timeoutHelper.parseTimeout(this.api.globals.waitForNegativeConditionTimeout) + }) await this.waitForAnimationToFinish() this.useXpath() - .initAjaxCounters() .click(this.getXpathOfPanelSelect(item)) - .waitForOutstandingAjaxCalls() + .waitForAjaxCallsToStartAndFinish() .useCss() await this.waitForAnimationToFinish() } @@ -117,7 +113,7 @@ module.exports = { let isVisible = false timeout = timeoutHelper.parseTimeout(timeout) await this.isVisible({ locateStrategy: 'css selector', selector, timeout }, result => { - isVisible = result.status === 0 + isVisible = result.value === true }) return isVisible },