mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(templating): fixed issue detecting template variable dependency, fixes #7354
This commit is contained in:
@@ -12,10 +12,15 @@ describe('containsVariable', function() {
|
||||
});
|
||||
|
||||
it('should not find it if only part matches with $var syntax', function() {
|
||||
var contains = containsVariable('this.$ServerDomain.filters', 'Server');
|
||||
var contains = containsVariable('this.$serverDomain.filters', 'server');
|
||||
expect(contains).to.be(false);
|
||||
});
|
||||
|
||||
it('should find it if it ends with variable and passing multiple test strings', function() {
|
||||
var contains = containsVariable('show field keys from $pgmetric', 'test string2', 'pgmetric');
|
||||
expect(contains).to.be(true);
|
||||
});
|
||||
|
||||
it('should find it with [[var]] syntax', function() {
|
||||
var contains = containsVariable('this.[[test]].filters', 'test');
|
||||
expect(contains).to.be(true);
|
||||
|
||||
Reference in New Issue
Block a user