bito-code-review[bot] commented on code in PR #40628:
URL: https://github.com/apache/superset/pull/40628#discussion_r3337772030
##########
superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.test.tsx:
##########
@@ -173,13 +194,18 @@ describe('EncryptedField', () => {
},
];
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Missing boolean test coverage</b></div>
<div id="fix">
The new `createModeCases` array is missing boolean test cases that existed
in the original `testCases` array. Original had `input: true` → `expected:
'true'` and `input: false` → `expected: 'false'`. Without these, boolean
serialization behavior in create mode goes untested.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
```
---
a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.test.tsx
+++
b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.test.tsx
@@ -176,6 +176,8 @@ describe('EncryptedField', () => {
const createModeCases = [
{
input: { key: 'value', nested: { data: 'test' } },
expected: '{"key":"value","nested":{"data":"test"}}',
description: 'objects to JSON strings',
},
+ { input: true, expected: 'true', description: 'booleans to strings'
},
+ { input: false, expected: 'false', description: 'false booleans to
strings' },
{
input: 'test-string',
expected: 'test-string',
```
</div>
</details>
</div>
<small><i>Code Review Run #7cdc1d</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]