mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
updating adhoc metric filtering (#5105)
This commit is contained in:
@@ -211,8 +211,8 @@ describe('MetricsControl', () => {
|
||||
|
||||
expect(!!wrapper.instance().selectFilterOption(
|
||||
{
|
||||
metric_name: 'a_metric',
|
||||
optionName: 'a_metric',
|
||||
metric_name: 'avg__metric',
|
||||
optionName: 'avg__metric',
|
||||
expression: 'AVG(metric)',
|
||||
},
|
||||
'a',
|
||||
@@ -238,14 +238,27 @@ describe('MetricsControl', () => {
|
||||
|
||||
expect(!!wrapper.instance().selectFilterOption(
|
||||
{
|
||||
metric_name: 'a_metric',
|
||||
optionName: 'a_metric',
|
||||
metric_name: 'avg__metric',
|
||||
optionName: 'avg__metric',
|
||||
expression: 'AVG(metric)',
|
||||
},
|
||||
'a',
|
||||
)).to.be.false;
|
||||
});
|
||||
|
||||
it('includes custom made simple saved metrics', () => {
|
||||
const { wrapper } = setup();
|
||||
|
||||
expect(!!wrapper.instance().selectFilterOption(
|
||||
{
|
||||
metric_name: 'my_fancy_sum_metric',
|
||||
optionName: 'my_fancy_sum_metric',
|
||||
expression: 'SUM(value)',
|
||||
},
|
||||
'sum',
|
||||
)).to.be.true;
|
||||
});
|
||||
|
||||
it('excludes auto generated metrics', () => {
|
||||
const { wrapper } = setup();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user