Intermittent failure in ee/browser_ui/3_create/merge_request/approval_rules_spec.rb:26 | Create Approval rules allows multiple approval rules with users and groups
Summary
The test fails while waiting for the user to appear in the drop down.
Job: https://ops.gitlab.net/gitlab-org/quality/staging/-/jobs/1127502
Stack trace
1) Create Approval rules allows multiple approval rules with users and groups
Failure/Error:
merge_request = Resource::MergeRequest.fabricate_via_browser_ui! do |resource|
resource.title = 'Add a new feature'
resource.description = 'Great feature, much approval'
resource.project = project
resource.approval_rules = [
{
name: "user",
approvals_required: 1,
users: [approver1]
},
Capybara::ElementNotFound:
Unable to find css ".select2-results .user-username"
# /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/node/finders.rb:296:in `block in synced_resolve'
# /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/node/base.rb:83:in `synchronize'
# /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/node/finders.rb:287:in `synced_resolve'
# /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/node/finders.rb:52:in `find'
# /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/session.rb:749:in `block (2 levels) in <class:Session>'
# /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'
# ./qa/ee/page/merge_request/new.rb:51:in `select_user_member'
# ./qa/ee/page/merge_request/new.rb:30:in `block (2 levels) in add_approval_rules'
# ./qa/ee/page/merge_request/new.rb:29:in `each'
# ./qa/ee/page/merge_request/new.rb:29:in `block in add_approval_rules'
# ./qa/ee/page/merge_request/new.rb:21:in `each'
# ./qa/ee/page/merge_request/new.rb:21:in `add_approval_rules'
# ./qa/resource/merge_request.rb:76:in `block in fabricate!'
# ./qa/scenario/actable.rb:16:in `perform'
# ./qa/resource/merge_request.rb:68:in `fabricate!'
# ./qa/resource/base.rb:30:in `block (2 levels) in fabricate_via_browser_ui!'
# ./qa/resource/base.rb:135:in `log_fabrication'
# ./qa/resource/base.rb:30:in `block in fabricate_via_browser_ui!'
# ./qa/resource/base.rb:118:in `do_fabricate!'
# ./qa/resource/base.rb:29:in `fabricate_via_browser_ui!'
# ./qa/specs/features/ee/browser_ui/3_create/merge_request/approval_rules_spec.rb:28:in `block (3 levels) in <module:QA>'
Screenshot / HTML page
create_approval_rules_allows_multiple_approval_rules_with_users_and_groups.html
Possible fixes
We probably need to wait a bit in select_user_member(name)
Edited by Sanad Liaquat