rusackas commented on code in PR #33269:
URL: https://github.com/apache/superset/pull/33269#discussion_r2066957724
##########
superset-frontend/packages/superset-ui-chart-controls/test/operators/renameOperator.test.ts:
##########
@@ -170,6 +186,61 @@ test('should add renameOperator if exist "actual value"
time comparison', () =>
});
});
+test('should add renameOperator if exist derived time comparison', () => {
+ expect(
+ renameOperator(
+ {
+ ...formData,
+ ...{
+ comparison_type: ComparisonType.Ratio,
+ time_compare: ['1 year ago', '1 year later'],
+ },
+ },
+ queryObject,
+ ),
+ ).toEqual({
+ operation: 'rename',
+ options: {
+ columns: {
+ 'ratio__count(*)__count(*)__1 year ago': '1 year ago',
+ 'ratio__count(*)__count(*)__1 year later': '1 year later',
+ },
+ inplace: true,
+ level: 0,
+ },
+ });
+});
+
+test('should add renameOperator if exists multiple metrics', () => {
Review Comment:
```suggestion
test('should add renameOperator if multiple metrics exist', () => {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]