onurtashan commented on PR #40758:
URL: https://github.com/apache/superset/pull/40758#issuecomment-4646509093

   Good catch @sadpandajoe. The root issue is that `SAVE_TYPE_OVERWRITE` gates 
the PUT call behind a `ConfirmDashboardDiff` feature-flag check — if the flag 
is enabled, the function does a GET precheck and may dispatch 
`SET_OVERRIDE_CONFIRM` instead of calling PUT, so `putStub` never fires and the 
assertion is never reached (the test times out rather than failing on the 
assertion, making a reverted fix invisible).
   
   Fixed by mocking `isFeatureEnabled` to return `false`, following the same 
pattern as `dashboardState.test.ts`. This ensures `SAVE_TYPE_OVERWRITE` always 
skips the precheck and calls PUT directly via `cleanedData`, so test 1 will 
reliably fail if the fix is reverted: `certified_by: ''` → without the fix 
`cleanedData.certification_details` stays `'Old details'` → 
`expect(body.certification_details).toBe('')` fails.


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