Simplify and reduce Capybara specs test coverage for Duo Chat

What does this MR do and Why

It removes Duo Chat Capybara specs coverage that was migrated to MSW Jest specs in the MR series listed below and other specs that I identified as redundant. It also moves all Duo Chat feature specs to the ee/spec/features/duo_chat directory for better discoverability. Duo Chat shared specs were included in many feature specs across the application to test Duo Chat in different contexts. However, the behavior tested by the specs didn't change across contexts. As explained below, this testing strategy has created significant pipeline flakyness with little value in return.

This Merge Request removes these shared examples and creates a single agentic_chat_smoke_spec.rb suite that covers functionality that is not easy to cover with MSW integration specs.

Why?

Duo Agentic Chat feature specs have been among the worst flakiness offenders in CI:

Migrating UI-focused capybara specs to MSW integration tests reduces pipeline duration and mitigates flakyness. Removing redundant tests make maintenance easier.

Verification

  • bundle exec rubocop is clean on the 10 remaining Ruby files the MR touches.
  • bundle exec rspec --dry-run across the 8 specs the MR changes, plus the two other consumers of the extracted shared context, gives 67 examples, 0 failures, 1 pending — which is what confirms no shared example or context is left dangling.
  • A grep for all five deleted shared-example names returns nothing anywhere in ee/ or spec/.
  • The four examples in agentic_chat_smoke_spec.rb were not run locally: they need a live duo-workflow-service, which :duo_workflow_service starts. CI is the first place they run in full.
  • The permission gates behind those four were checked separately instead, with a throwaway spec asserting the abilities under the migrated setup: summarize_comments, troubleshoot_job_with_ai and the explain-code availability helper all come out true, matching the setups the examples came from.
  • jest-msw-integration does not run for this MR: its CI rule matches only spec/frontend/msw_integration/**, and this MR is Ruby-only.

The MR series

# MR What it does Status
1 !248777 (merged) Sets up MSW test foundations Merged
2 !248782 (merged) Covers the AI panel shell Merged
3 !248783 (merged) Covers the chat conversation lifecycle Merged
4 !248785 (merged) Covers chat tool calls Merged
5 !248787 (merged) Covers agent and model selection Merged
6 !248791 (merged) Covers additional context Merged
7 !244590 (merged) Removes the replaced Capybara specs This MR, merges last

Related issue: Make Duo Agentic Chat feature specs more stable (#603605 - closed)

Edited by Enrique Alcántara

Merge request reports

Loading
Loading