bito-code-review[bot] commented on PR #40685:
URL: https://github.com/apache/superset/pull/40685#issuecomment-4604622065

   <!-- Bito Reply -->
   The suggestion is appropriate and improves test coverage by addressing the 
scenario where an option exists in the cache but lacks the `OWNER_EMAIL_PROP`. 
Applying this test case ensures that the `email` property is correctly handled 
as `undefined` in that specific edge case, aligning with the PR's goal of 
honoring the optional `email?` type.
   
   **superset-frontend/src/dashboard/components/PropertiesModal/utils.test.ts**
   ```
   test('leaves email undefined when option is cached but carries no email', () 
=> {
     const options = [
       { value: 6, label: 'Dave Doe', [OWNER_TEXT_LABEL_PROP]: 'Dave Doe' },
       // intentionally no OWNER_EMAIL_PROP
     ];
     expect(parseSelectedOwners([{ value: 6, label: 'Dave Doe' }], options, 
[])).toEqual([
       { id: 6, full_name: 'Dave Doe', email: undefined },
     ]);
   });
   ```


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