mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[functionalTests] implement common.findAllTestSubjects() helper
This commit is contained in:
parent
69fb068d55
commit
6b220cfc2b
1 changed files with 9 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
|
||||
import bluebird, {
|
||||
promisify
|
||||
promisify,
|
||||
filter as filterAsync
|
||||
} from 'bluebird';
|
||||
import fs from 'fs';
|
||||
import _ from 'lodash';
|
||||
|
@ -309,4 +310,11 @@ export default class Common {
|
|||
.findDisplayedByCssSelector(testSubjSelector(selector));
|
||||
}
|
||||
|
||||
async findAllTestSubjects(selector) {
|
||||
this.debug('in findAllTestSubjects: ' + testSubjSelector(selector));
|
||||
const remote = this.remote.setFindTimeout(defaultFindTimeout);
|
||||
const all = await remote.findAllByCssSelector(testSubjSelector(selector));
|
||||
return await filterAsync(all, el => el.isDisplayed());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue