E2E test: use testids for generate commit spec
What does this MR do and why?
In https://gitlab.com/gitlab-org/gitlab/-/issues/506323 we sawee/browser_ui/3_create/merge_request/generate_commit_message_spec.rb
fail due to multiple elements having Insert
in the name. This MR gives the button a data-testid
so it can be uniquely identifed.
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
This test runs against live environments only, but it can be verified against a GDK with Duo Enterprise:
- GDK has Duo Enterprise
- Add break point so seat can be assigned to test user:
diff --git a/qa/qa/specs/features/ee/browser_ui/3_create/merge_request/generate_commit_message_spec.rb b/qa/qa/specs/features/ee/browser_ui/3_create/merge_request/generate_commit_message_spec.rb
index 02c9280eb0d7..721b1694251b 100644
--- a/qa/qa/specs/features/ee/browser_ui/3_create/merge_request/generate_commit_message_spec.rb
+++ b/qa/qa/specs/features/ee/browser_ui/3_create/merge_request/generate_commit_message_spec.rb
@@ -20,6 +20,9 @@ module QA
])
Flow::Login.sign_in
+ require 'pry'
+ binding.pry
+ # Add duo seat for test user https://gdk.test:3443/admin/gitlab_duo/seat_utilization and then resume test
merge_request.visit!
end
QA_LOG_LEVEL=DEBUG QA_GITLAB_URL=https://gdk.test:3443 GITLAB_QA_ADMIN_ACCESS_TOKEN=x bundle exec rspec qa/specs/features/ee/browser_ui/3_create/merge_request/generate_commit_message_spec.rb
Edited by Jay McCure