231801_test_to_master #1519
|
@ -156,14 +156,14 @@ let actions = {
|
|||
await this.waitForSpinnerLoad();
|
||||
},
|
||||
|
||||
accessToSection: async function(state) {
|
||||
accessToSection: async function(state, name = 'Others') {
|
||||
await this.waitForSelector('vn-left-menu');
|
||||
let nested = await this.evaluate(state => {
|
||||
return document.querySelector(`vn-left-menu li li > a[ui-sref="${state}"]`) != null;
|
||||
}, state);
|
||||
|
||||
if (nested) {
|
||||
let selector = 'vn-left-menu vn-item-section > vn-icon[icon=keyboard_arrow_down]';
|
||||
let selector = `vn-left-menu li[name="${name}"]`;
|
||||
await this.evaluate(selector => {
|
||||
document.querySelector(selector).scrollIntoViewIfNeeded();
|
||||
}, selector);
|
||||
|
|
Loading…
Reference in New Issue