waitForState minor refactor
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
65f4a432aa
commit
b95de5d788
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue