mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
One new discover test for issue #5937 use back button.
This commit is contained in:
parent
9fe89d9e66
commit
43c7257b88
2 changed files with 37 additions and 3 deletions
|
@ -152,7 +152,7 @@ import {
|
|||
];
|
||||
return discoverPage.setChartInterval(chartInterval)
|
||||
.then(function () {
|
||||
return common.sleep(8000);
|
||||
return common.sleep(4000);
|
||||
})
|
||||
.then(function () {
|
||||
return verifyChartData(expectedBarChartData);
|
||||
|
@ -167,7 +167,7 @@ import {
|
|||
];
|
||||
return discoverPage.setChartInterval(chartInterval)
|
||||
.then(function () {
|
||||
return common.sleep(8000);
|
||||
return common.sleep(4000);
|
||||
})
|
||||
.then(function () {
|
||||
return verifyChartData(expectedBarChartData);
|
||||
|
@ -188,6 +188,26 @@ import {
|
|||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
bdd.it('browser back button should show previous interval Daily', function () {
|
||||
var expectedChartInterval = 'Daily';
|
||||
var expectedBarChartData = [
|
||||
'133.196', '129.192', '129.724'
|
||||
];
|
||||
return this.remote.goBack()
|
||||
.then(function () {
|
||||
return common.try(function tryingForTime() {
|
||||
return discoverPage.getChartInterval()
|
||||
.then(function (actualInterval) {
|
||||
expect(actualInterval).to.be(expectedChartInterval);
|
||||
});
|
||||
});
|
||||
})
|
||||
.then(function () {
|
||||
return verifyChartData(expectedBarChartData);
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
bdd.it('should show correct data for chart interval Monthly', function () {
|
||||
var chartInterval = 'Monthly';
|
||||
var expectedBarChartData = [ '122.535'];
|
||||
|
|
|
@ -100,7 +100,21 @@ export default (function () {
|
|||
getChartInterval: function getChartInterval() {
|
||||
return thisTime
|
||||
.findByCssSelector('a[ng-click="toggleInterval()"]')
|
||||
.getVisibleText();
|
||||
.getVisibleText()
|
||||
.then(function (intervalText) {
|
||||
if (intervalText.length > 0) {
|
||||
return intervalText;
|
||||
} else {
|
||||
return thisTime
|
||||
.findByCssSelector('select[ng-model="state.interval"]')
|
||||
.getProperty('value') // this gets 'string:d' for Daily
|
||||
.then(function (selectedValue) {
|
||||
return thisTime
|
||||
.findByCssSelector('option[value="' + selectedValue + '"]')
|
||||
.getVisibleText();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
setChartInterval: function setChartInterval(interval) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue