corbinrobb commented on a change in pull request #18056:
URL: https://github.com/apache/superset/pull/18056#discussion_r806972575



##########
File path: superset-frontend/src/views/CRUD/utils.test.tsx
##########
@@ -171,3 +172,21 @@ test('does not ask for password when the import type is 
wrong', () => {
   };
   expect(hasTerminalValidation(error.errors)).toBe(true);
 });
+
+test('successfully modified rison to encode correctly', () => {
+  const problemCharacters = '& # ? ^ { } [ ] | " = + `';
+
+  const testObject = problemCharacters.split(' ').reduce((a, c) => {
+    // eslint-disable-next-line no-param-reassign
+    a[c] = c;
+    return a;
+  }, {});
+
+  const actualEncoding = rison.encode(testObject);
+
+  const expectedEncoding =
+    
"('\"':'\"','#':'#','&':'&','+':'+','=':'=','?':'?','[':'[',']':']','^':'^','`':'`','{':'{','|':'|','}':'}')";

Review comment:
       I can have it make and encode an object for each one of the characters 
being tested instead of having it all in one. It will get rid of this big 
string and should be easier to read. I am pushing it up now so let me know if 
it needs more work and I can give it another go




-- 
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]

Reply via email to