aminghadersohi opened a new pull request, #40124: URL: https://github.com/apache/superset/pull/40124
## Summary - `add_chart_to_existing_dashboard` previously fell back to the first tab silently when a `target_tab` was specified but not matched - Now returns a descriptive error listing available tabs when the specified `target_tab` is not found - Also returns a clear error when `target_tab` is specified on a dashboard that has no tabs - Adds `_resolve_parent_container` helper to keep the main function's cyclomatic complexity within bounds - Updates `target_tab` field description to document that it accepts both display names and component IDs - Adds tests for the two new error paths and for `_collect_available_tab_names` ## Test plan - [x] `test_add_chart_target_tab_not_found` — error when specified tab doesn't exist - [x] `test_add_chart_target_tab_on_non_tabbed_dashboard` — error when no tabs at all - [x] `test_find_tab_insert_target_unmatched_returns_none` — updated unit test for changed function semantics - [x] `test_collect_available_tab_names_*` — unit tests for the new helper -- 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]
