E2E test: avoid stale element duo chat spec
What does this MR do and why?
Duo Chat specs are occasionally getting a stale element exception, resolves:
- https://gitlab.com/gitlab-org/gitlab/-/issues/467187
- https://gitlab.com/gitlab-org/gitlab/-/issues/467447
- https://gitlab.com/gitlab-org/gitlab/-/issues/467149
Rather than accessing the element's text attribute, we can just search for the existence of an element containing text
to avoid this.
How to set up and validate locally
To test the self-managed version of the test or view the test passing in pipeline:
CHROME_DISABLE_DEV_SHM=true QA_IMAGE="registry.gitlab.com/gitlab-org/gitlab/gitlab-ee-qa:jmc-dc-stale" DOCKER_DEFAULT_PLATFORM=linux/amd64 GITLAB_LICENSE_MODE=test QA_EE_ACTIVATION_CODE= GITLAB_QA_ACCESS_TOKEN= bundle exec gitlab-qa Test::Integration::AiGateway EE
To test the gitlab.com version: (i've run a pipeline against staging using the gitlab-qa image from this MR and the test passes: web_ide & gitlab ui
GITLAB_URL=https://staging.gitlab.com bundle exec rspec qa/specs/features/ee/browser_ui/16_ai_powered/duo_chat/duo_chat_spec.rb --tag=external_ai_provider
Edited by Jay McCure