mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(templating): Another atempt at fixing #2534 (Init multi value template var used in repeat panel from url), fixes #2564
Conflicts: CHANGELOG.md
This commit is contained in:
@@ -59,16 +59,16 @@ define([
|
||||
beforeEach(function() {
|
||||
var dashboard = { templating: { list: [variable] } };
|
||||
var urlParams = {};
|
||||
urlParams["var-apps"] = ["val1", "val2"];
|
||||
urlParams["var-apps"] = ["val2", "val1"];
|
||||
ctx.$location.search = sinon.stub().returns(urlParams);
|
||||
ctx.service.init(dashboard);
|
||||
});
|
||||
|
||||
it('should update current value', function() {
|
||||
expect(variable.current.value.length).to.be(2);
|
||||
expect(variable.current.value[0]).to.be("val1");
|
||||
expect(variable.current.value[1]).to.be("val2");
|
||||
expect(variable.current.text).to.be("val1 + val2");
|
||||
expect(variable.current.value[0]).to.be("val2");
|
||||
expect(variable.current.value[1]).to.be("val1");
|
||||
expect(variable.current.text).to.be("val2 + val1");
|
||||
expect(variable.options[0].selected).to.be(true);
|
||||
expect(variable.options[1].selected).to.be(true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user