diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/features/merge_requests | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/features/merge_requests')
3 files changed, 18 insertions, 6 deletions
diff --git a/spec/features/merge_requests/user_lists_merge_requests_spec.rb b/spec/features/merge_requests/user_lists_merge_requests_spec.rb index 6b8dcd7dbb6..ab6242784fe 100644 --- a/spec/features/merge_requests/user_lists_merge_requests_spec.rb +++ b/spec/features/merge_requests/user_lists_merge_requests_spec.rb @@ -23,7 +23,9 @@ RSpec.describe 'Merge requests > User lists merge requests' do milestone: create(:milestone, project: project, due_date: '2013-12-11'), created_at: 1.minute.ago, updated_at: 1.minute.ago) - create(:merge_request, + @fix.metrics.update_column(:merged_at, 10.seconds.ago) + + @markdown = create(:merge_request, title: 'markdown', source_project: project, source_branch: 'markdown', @@ -32,12 +34,15 @@ RSpec.describe 'Merge requests > User lists merge requests' do milestone: create(:milestone, project: project, due_date: '2013-12-12'), created_at: 2.minutes.ago, updated_at: 2.minutes.ago) - create(:merge_request, + @markdown.metrics.update_column(:merged_at, 50.seconds.ago) + + @merge_test = create(:merge_request, title: 'merge-test', source_project: project, source_branch: 'merge-test', created_at: 3.minutes.ago, updated_at: 10.seconds.ago) + @merge_test.metrics.update_column(:merged_at, 10.seconds.ago) end context 'merge request reviewers' do @@ -102,6 +107,13 @@ RSpec.describe 'Merge requests > User lists merge requests' do expect(count_merge_requests).to eq(3) end + it 'sorts by merged at' do + visit_merge_requests(project, sort: sort_value_merged_date) + + expect(first_merge_request).to include('markdown') + expect(count_merge_requests).to eq(3) + end + it 'filters on one label and sorts by due date' do label = create(:label, project: project) create(:label_link, label: label, target: @fix) diff --git a/spec/features/merge_requests/user_mass_updates_spec.rb b/spec/features/merge_requests/user_mass_updates_spec.rb index 0fe69c5ca5b..46c12784ea8 100644 --- a/spec/features/merge_requests/user_mass_updates_spec.rb +++ b/spec/features/merge_requests/user_mass_updates_spec.rb @@ -18,7 +18,7 @@ RSpec.describe 'Merge requests > User mass updates', :js do visit project_merge_requests_path(project) end - it 'closes merge request' do + it 'closes merge request', :js do change_status('Closed') expect(page).to have_selector('.merge-request', count: 0) @@ -31,7 +31,7 @@ RSpec.describe 'Merge requests > User mass updates', :js do visit project_merge_requests_path(project, state: 'closed') end - it 'reopens merge request' do + it 'reopens merge request', :js do change_status('Open') expect(page).to have_selector('.merge-request', count: 0) @@ -109,7 +109,7 @@ RSpec.describe 'Merge requests > User mass updates', :js do click_button 'Edit merge requests' check 'Select all' click_button 'Select status' - click_link text + click_button text click_update_merge_requests_button end diff --git a/spec/features/merge_requests/user_sorts_merge_requests_spec.rb b/spec/features/merge_requests/user_sorts_merge_requests_spec.rb index 54c9fbef218..99473f3b1ea 100644 --- a/spec/features/merge_requests/user_sorts_merge_requests_spec.rb +++ b/spec/features/merge_requests/user_sorts_merge_requests_spec.rb @@ -60,7 +60,7 @@ RSpec.describe 'User sorts merge requests' do visit(project_issues_path(project)) - expect(find('.issues-filters a.is-active')).not_to have_content('Milestone') + expect(page).not_to have_button('Milestone') end context 'when merge requests have awards' do |