mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
add check for selected time field option
This commit is contained in:
parent
43a5e2b838
commit
b3f2d5bfed
1 changed files with 11 additions and 1 deletions
|
@ -47,12 +47,22 @@ define(function (require) {
|
|||
selectTimeFieldOption: function (selection) {
|
||||
var self = this;
|
||||
|
||||
// open dropdown
|
||||
return self.getTimeFieldNameField().click()
|
||||
.then(function () {
|
||||
// close dropdown, keep focus
|
||||
return self.getTimeFieldNameField().click();
|
||||
})
|
||||
.then(function () {
|
||||
return self.getTimeFieldOption(selection);
|
||||
return common.tryForTime(defaultTimeout, function () {
|
||||
return self.getTimeFieldOption(selection).click()
|
||||
.then(function () {
|
||||
return self.getTimeFieldOption(selection).isSelected();
|
||||
})
|
||||
.then(function (selected) {
|
||||
if (!selected) throw new Error('option not selected: ' + selected);
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue