1) Create New Merge Request when approvals are enabled for the target project saving the MR shows the saved MR Failure/Error: expect(page).to have_link('Close merge request') expected to find link "Close merge request" but there were no matches # ./spec/features/merge_requests/create_new_mr_spec.rb:61:in `block (4 levels) in <top (required)>'Finished in 15 minutes 12 seconds (files took 16.53 seconds to load)767 examples, 1 failureFailed examples:rspec ./spec/features/merge_requests/create_new_mr_spec.rb:57 # Create New Merge Request when approvals are enabled for the target project saving the MR shows the saved MR
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
1) Merge request approvals Group approvers when creating an MR allows setting groups as approvers Failure/Error: find('.approvals-components') Capybara::ElementNotFound: Unable to find css ".approvals-components" # ./spec/features/merge_requests/approvals_spec.rb:79:in `block (4 levels) in <top (required)>' 2) Merge request approvals Group approvers when creating an MR allows delete approvers group when it is set in project Failure/Error: page.evaluate_script('jQuery.active').zero? Capybara::Poltergeist::JavascriptError: One or more errors were raised in the Javascript code on the page. If you don't care about these errors, you can ignore them by setting js_errors: false in your Poltergeist configuration (see documentation for details). ReferenceError: Can't find variable: jQuery ReferenceError: Can't find variable: jQuery at undefined:1 at :1 at :1 # ./spec/support/wait_for_ajax.rb:9:in `finished_all_ajax_requests?' # ./spec/support/wait_for_ajax.rb:4:in `block in wait_for_ajax' # ./spec/support/wait_for_ajax.rb:3:in `wait_for_ajax' # ./spec/features/merge_requests/approvals_spec.rb:100:in `block (4 levels) in <top (required)>' 3) Merge request approvals Group approvers when editing an MR with a different author allows setting groups as approvers Failure/Error: page.evaluate_script('jQuery.active').zero? Capybara::Poltergeist::JavascriptError: One or more errors were raised in the Javascript code on the page. If you don't care about these errors, you can ignore them by setting js_errors: false in your Poltergeist configuration (see documentation for details). ReferenceError: Can't find variable: jQuery ReferenceError: Can't find variable: jQuery at undefined:1 at :1 at :1 # ./spec/support/wait_for_ajax.rb:9:in `finished_all_ajax_requests?' # ./spec/support/wait_for_ajax.rb:4:in `block in wait_for_ajax' # ./spec/support/wait_for_ajax.rb:3:in `wait_for_ajax' # ./spec/features/merge_requests/approvals_spec.rb:131:in `block (4 levels) in <top (required)>' 4) Merge request approvals Group approvers when editing an MR with a different author allows delete approvers group when it`s set in project Failure/Error: find('.approvals-components') Capybara::ElementNotFound: Unable to find css ".approvals-components" # ./spec/features/merge_requests/approvals_spec.rb:153:in `block (4 levels) in <top (required)>' 5) Merge request approvals Group approvers when editing an MR with a different author allows changing approvals number Failure/Error: find('.approvals-components') Capybara::ElementNotFound: Unable to find css ".approvals-components" # ./spec/features/merge_requests/approvals_spec.rb:163:in `block (4 levels) in <top (required)>' 6) Merge request approvals Approving by approvers from groups when group is assigned to a project I am able to approve Failure/Error: page.within '.mr-state-widget' do click_button 'Approve Merge Request' end Capybara::ElementNotFound: Unable to find css ".mr-state-widget" # ./spec/features/merge_requests/approvals_spec.rb:245:in `approve_merge_request' # ./spec/features/merge_requests/approvals_spec.rb:210:in `block (4 levels) in <top (required)>' 7) Merge request approvals Approving by approvers from groups when group is assigned to a project I am able to unapprove Failure/Error: page.within '.mr-state-widget' do click_button 'Approve Merge Request' end Capybara::ElementNotFound: Unable to find css ".mr-state-widget" # ./spec/features/merge_requests/approvals_spec.rb:245:in `approve_merge_request' # ./spec/features/merge_requests/approvals_spec.rb:216:in `block (4 levels) in <top (required)>' 8) Merge request approvals Approving by approvers from groups when group is assigned to a merge request I am able to approve Failure/Error: page.within '.mr-state-widget' do click_button 'Approve Merge Request' end Capybara::ElementNotFound: Unable to find css ".mr-state-widget" # ./spec/features/merge_requests/approvals_spec.rb:245:in `approve_merge_request' # ./spec/features/merge_requests/approvals_spec.rb:229:in `block (4 levels) in <top (required)>' 9) Merge request approvals Approving by approvers from groups when group is assigned to a merge request I am able to unapprove Failure/Error: page.within '.mr-state-widget' do click_button 'Approve Merge Request' end Capybara::ElementNotFound: Unable to find css ".mr-state-widget" # ./spec/features/merge_requests/approvals_spec.rb:245:in `approve_merge_request' # ./spec/features/merge_requests/approvals_spec.rb:236:in `block (4 levels) in <top (required)>'Finished in 48 minutes 38 seconds (files took 22.42 seconds to load)940 examples, 9 failuresFailed examples:rspec ./spec/features/merge_requests/approvals_spec.rb:65 # Merge request approvals Group approvers when creating an MR allows setting groups as approversrspec ./spec/features/merge_requests/approvals_spec.rb:83 # Merge request approvals Group approvers when creating an MR allows delete approvers group when it is set in projectrspec ./spec/features/merge_requests/approvals_spec.rb:116 # Merge request approvals Group approvers when editing an MR with a different author allows setting groups as approversrspec ./spec/features/merge_requests/approvals_spec.rb:136 # Merge request approvals Group approvers when editing an MR with a different author allows delete approvers group when it`s set in projectrspec ./spec/features/merge_requests/approvals_spec.rb:157 # Merge request approvals Group approvers when editing an MR with a different author allows changing approvals numberrspec ./spec/features/merge_requests/approvals_spec.rb:209 # Merge request approvals Approving by approvers from groups when group is assigned to a project I am able to approverspec ./spec/features/merge_requests/approvals_spec.rb:215 # Merge request approvals Approving by approvers from groups when group is assigned to a project I am able to unapproverspec ./spec/features/merge_requests/approvals_spec.rb:228 # Merge request approvals Approving by approvers from groups when group is assigned to a merge request I am able to approverspec ./spec/features/merge_requests/approvals_spec.rb:235 # Merge request approvals Approving by approvers from groups when group is assigned to a merge request I am able to unapprove
@jarka or @brycepj I see that you're the last ones to have edited spec/features/merge_requests/approvals_spec.rb, could you have a look at the failures? Thanks in advance!
@rymai I ran spec/features/merge_requests/approvals_spec.rb multiple times locally. I didn't get any of those errors however it behaves strangely. I can investigate further but will need to leave soon today.
It can be a local problem only or something really simple but I am leaving here what fails for me locally in case someone will look into it:
Failed examples:rspec ./spec/features/merge_requests/approvals_spec.rb:83 # Merge request approvals Group approvers when creating an MR allows delete approvers group when it is set in projectrspec ./spec/features/merge_requests/approvals_spec.rb:162 # Merge request approvals Group approvers when editing an MR with a different author allows changing approvals number
Problem:
Failure/Error: User. active. where("(#{wheres.join(' OR ')}) AND id NOT IN (#{approvals.select(:user_id).to_sql})"). where.not(id: author.id). count ActionView::Template::Error: undefined method `id' for nil:NilClass # ./app/models/concerns/approvable.rb:58:in `number_of_potential_approvers' # ./app/models/concerns/approvable.rb:19:in `approvals_left' # ./app/models/concerns/approvable.rb:10:in `approved?' # ./app/views/projects/merge_requests/widget/_open.html.haml:4:in
However when I run just one example it is ok.
Also (from number_of_potential_approvers in models/concerns/approvable.rb):