GabeLoins commented on a change in pull request #4909: [Explore] Adding Adhoc
Filters
URL:
https://github.com/apache/incubator-superset/pull/4909#discussion_r186569870
##########
File path: superset/assets/spec/javascripts/explore/AdhocFilter_spec.js
##########
@@ -0,0 +1,136 @@
+import { expect } from 'chai';
+import { describe, it } from 'mocha';
+
+import AdhocFilter, { EXPRESSION_TYPES, CLAUSES } from
'../../../src/explore/AdhocFilter';
+
+describe('AdhocFilter', () => {
+ it('sets filterOptionName in constructor', () => {
+ const adhocFilter = new AdhocFilter({
+ expressionType: EXPRESSION_TYPES.SIMPLE,
+ subject: 'value',
+ operator: '>',
+ comparator: '10',
+ clause: CLAUSES.WHERE,
+ });
+ expect(adhocFilter.filterOptionName.length).to.be.above(10);
Review comment:
ah the optionNames are just randomized ids in this case. we use them to
differentiate options when updating (sort of like a react key). so I can't
predict what its value is.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]