diff --git a/e2e/helpers/extensions.js b/e2e/helpers/extensions.js index 9cecbd7e5..8647483b0 100644 --- a/e2e/helpers/extensions.js +++ b/e2e/helpers/extensions.js @@ -123,15 +123,20 @@ let actions = { }, waitForState: async function(state) { - await this.waitFor(state => { + await this.waitForFunction(state => { let $state = angular.element(document.body).injector().get('$state'); return !$state.transition && $state.is(state); }, {}, state); + await this.waitForFunction(() => { + return angular.element(() => { + return true; + }); + }); await this.waitForSpinnerLoad(); }, waitForTransition: async function() { - await this.waitFor(() => { + await this.waitForFunction(() => { const $state = angular.element(document.body).injector().get('$state'); return !$state.transition; }); @@ -522,7 +527,7 @@ let actions = { }, waitForSpinnerLoad: async function() { - await this.waitFor('vn-topbar vn-spinner', {hidden: true}); + await this.waitForSelector('vn-topbar vn-spinner', {hidden: true}); }, waitForWatcherData: async function(selector) {