E2E: Target Experimental Features Checkbox Within Permissions Settings
What does this MR do and why?
Fixes https://gitlab.com/gitlab-org/gitlab/-/issues/480538
A new GitLab Duo features
section has been added to group settings that contains the Use experiment and beta GitLab Duo features
checkbox, which also currently exists in the Permissions and group features
section. This is because the new checkbox added to the GitLab Duo features
section is currently in development behind a feature flag, and once that has been fully rolled out and tested, the checkbox will be removed from the old Permissions and group features
section.
This is a temporary fix to resolve the ambiguous match errors in the test by targeting the use-experimental-features-checkbox
within the permissions-settings
element specifically. It makes use of the yield
provided within the expand_content
method.
A long term solution to use the new GitLab Duo features
section checkbox will need to be worked on separately as part of https://gitlab.com/gitlab-org/gitlab/-/issues/480538
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.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
The test ee/browser_ui/10_govern/explain_this_vulnerability_spec.rb
is currently only configured to run against live environments.
To run this test against Staging, set the following QA env variables. The values for these can be found in the Staging Quality Ops' group's CI/CD settings
export GITLAB_USERNAME=gitlab-qa
export GITLAB_PASSWORD=<secret>
export WEBDRIVER_HEADLESS=false
export GITLAB_QA_USER_AGENT=<secret>
export GITLAB_ADMIN_USERNAME=gitlab-qa-bot
export GITLAB_ADMIN_PASSWORD=<secret>
export GITLAB_QA_ACCESS_TOKEN=<secret>
export GITLAB_QA_ADMIN_ACCESS_TOKEN=<secret>
export QA_GITLAB_URL=https://staging.gitlab.com
Then, in your local GDK, cd qa
, and run:
bundle exec rspec qa/specs/features/ee/browser_ui/10_govern/explain_this_vulnerability_spec.rb