mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(timepicker2): temporarily removed the the option to define custom quick range, will have to be part of future issue, closes #2761
This commit is contained in:
@@ -6,6 +6,22 @@ import moment = require('moment')
|
||||
|
||||
describe("rangeUtil", () => {
|
||||
|
||||
describe("Can get range grouped list of ranges", () => {
|
||||
it('when custom settings should return default range list', () => {
|
||||
var groups = rangeUtil.getRelativeTimesList({time_options: []}, 'Last 5 minutes');
|
||||
expect(_.keys(groups).length).to.be(4)
|
||||
expect(groups[3][0].active).to.be(true)
|
||||
});
|
||||
|
||||
// it('should add custom options to right section', () => {
|
||||
// var groups = rangeUtil.getRelativeTimesList({
|
||||
// time_options: ['12m', '15d']
|
||||
// }, '');
|
||||
// var value = _.findWhere(groups["3"], {display: 'Last 12 minutes'});
|
||||
// expect(value).to.not.be(undefined)
|
||||
// });
|
||||
});
|
||||
|
||||
describe("Can get range text described", () => {
|
||||
it('should handle simple old expression with only amount and unit', () => {
|
||||
var info = rangeUtil.describeTextRange('5m');
|
||||
|
||||
Reference in New Issue
Block a user