[timepicker] Set scope properly, update spinner selector on tests, wait for refresh button to hide

This commit is contained in:
Jonathan Budzenski 2016-02-11 14:57:06 -06:00
parent 9c8c7f4c47
commit bc10322c64
7 changed files with 13 additions and 8 deletions

View file

@ -45,7 +45,7 @@
<config
ng-if="chrome.getVisible()"
config-template="configTemplate"
config-object="conf">
config-object="opts">
</config>
<navbar ng-if="chrome.getVisible()" name="visualize-search">

View file

@ -128,7 +128,7 @@ uiModules
$scope.state = $state;
$scope.uiState = $state.makeStateful('uiState');
$scope.timefilter = timefilter;
$scope.conf = _.pick($scope, 'doSave', 'savedVis', 'shareData', 'timefilter');
$scope.opts = _.pick($scope, 'doSave', 'savedVis', 'shareData', 'timefilter');
$scope.configTemplate = configTemplate;
editableVis.listeners.click = vis.listeners.click = filterBarClickHandler($state);

View file

@ -1 +1 @@
<saved-object-finder type="visualizations"></saved-object-finder>
<saved-object-finder type="visualizations"></saved-object-finder>

View file

@ -1,7 +1,7 @@
<form role="form" ng-submit="conf.doSave()">
<form role="form" ng-submit="opts.doSave()">
<div class="form-group">
<label for="visTitle">Title</label>
<input class="form-control" input-focus="select" type="text" name="visTitle" ng-model="conf.savedVis.title" required>
<input class="form-control" input-focus="select" type="text" name="visTitle" ng-model="opts.savedVis.title" required>
</div>
<button type="submit" class="btn btn-primary">Save</button>
</form>
</form>

View file

@ -1,4 +1,4 @@
<share
object-type="visualization"
object-id="{{conf.savedVis.id}}">
object-id="{{opts.savedVis.id}}">
</share>

View file

@ -51,6 +51,11 @@ define(function (require) {
common.debug('setAbsoluteRange');
return headerPage.setAbsoluteRange(fromTime, toTime);
})
.then(function () {
//After hiding the time picker, we need to wait for
//the refresh button to hide before clicking the share button
return common.sleep(1000);
})
.catch(common.handleError(this));
});

View file

@ -148,7 +148,7 @@ define(function (require) {
var self = this;
return this.remote
.setFindTimeout(defaultTimeout * 10)
.findByCssSelector('span.spinner.ng-hide');
.findByCssSelector('.navbar-text.ng-hide .spinner');
}
};