Loading
Refactor DuoChatPanel::Component spec to use render_inline
What does this MR do and why?
Addresses the test-related follow-up items from #596538 (closed) (a follow-up from !228881 (merged)):
- Refactors
ee/spec/components/duo_chat_panel/component_spec.rbto userender_inlineand assert against rendered output instead of callingsend(:component_instance)on a private method, per our ViewComponent testing guidance. Each leaf component now sets a distinguishingdata-testidso the dispatcher spec can verify which one was rendered. - Converts
describeblocks that described behavior/state (rather than a method) tocontext, per betterspecs guidance. - Drops the hardcoded
:saastag fromduo_chat_disabled_non_admin_spec.rb, sinceDuoDisabledNonAdminComponenthas no SaaS-specific branching, and documents whyduo_ui_nextmust stay disabled for that empty state to be reachable.
The remaining two follow-up items from #596538 (closed) (renaming
DuoChatHelper and fixing a gl-card CSS override) are handled in a
separate MR since they are unrelated production changes.
References
Related to #596538 (closed)
Screenshots or screen recordings
N/A — test-only change, no UI impact.
How to set up and validate locally
bundle exec rspec ee/spec/components/duo_chat_panel/bundle exec rspec ee/spec/features/duo_chat/duo_chat_disabled_non_admin_spec.rbbundle exec rubocop ee/app/components/duo_chat_panel/ ee/spec/components/duo_chat_panel/ ee/spec/features/duo_chat/duo_chat_disabled_non_admin_spec.rb
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.