Skip to content

E2E test: add test for explaining code via duo chat

Jay McCure requested to merge jmc-explain-code-e2e into master

What does this MR do and why?

Resolves #460807 (closed)

Adds an E2E test to explain code in a repository. The test highlights a keyword, and clicks the button. The question button opens duo chat with /explain The test checks that some response is returned.

This test requires an :external_ai_provider to run, so it only runs in live environments.

I also ran the gitlab-qa image from this MR against staging and the test passes: https://ops.gitlab.net/gitlab-org/quality/staging/-/jobs/14589318#L1071

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

dc-explain

How to set up and validate locally

note requires GDK with working duo chat QA_LOG_LEVEL=DEBUG QA_GITLAB_URL=https://gdk.test:3443 GITLAB_QA_PASSWORD_1=x bundle exec rspec qa/specs/features/ee/browser_ui/3_create/repository/duo_chat_explain_code_spec.rb

alternatively can be run against staging: QA_LOG_LEVEL=debug GITLAB_QA_USER_AGENT=x GITLAB_USERNAME=gitlab-qa GITLAB_PASSWORD=x GITLAB_QA_ACCESS_TOKEN=x QA_GITLAB_URL=https://staging.gitlab.com bundle exec rspec qa/specs/features/ee/browser_ui/3_create/repository/duo_chat_explain_code_spec.rb

Edited by Jay McCure

Merge request reports