diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-17 00:12:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-17 00:12:05 +0300 |
commit | f9e0126cad562c7199e26e84a1540df3bc849e55 (patch) | |
tree | 5390ccbadaa4f1f49eeb44c45b805f26bd12ceef /spec/features | |
parent | c1436508fa677bbe850e1e13761d2e6b791c698c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/admin/admin_runners_spec.rb | 36 | ||||
-rw-r--r-- | spec/features/merge_request/user_posts_diff_notes_spec.rb | 6 |
2 files changed, 27 insertions, 15 deletions
diff --git a/spec/features/admin/admin_runners_spec.rb b/spec/features/admin/admin_runners_spec.rb index 1b056aefa0f..7e2751daefa 100644 --- a/spec/features/admin/admin_runners_spec.rb +++ b/spec/features/admin/admin_runners_spec.rb @@ -66,11 +66,11 @@ RSpec.describe "Admin Runners" do visit admin_runners_path end - it 'runner type can be selected' do - expect(page).to have_link('All') - expect(page).to have_link('Instance') - expect(page).to have_link('Group') - expect(page).to have_link('Project') + it 'runner types tabs have total counts and can be selected' do + expect(page).to have_link('All 2') + expect(page).to have_link('Instance 2') + expect(page).to have_link('Group 0') + expect(page).to have_link('Project 0') end it 'shows runners' do @@ -162,10 +162,12 @@ RSpec.describe "Admin Runners" do create(:ci_runner, :group, description: 'runner-group', groups: [group]) end - it 'shows correct runner when type matches' do + it '"All" tab is selected by default' do visit admin_runners_path - expect(page).to have_link('All', class: 'active') + page.within('[data-testid="runner-type-tabs"]') do + expect(page).to have_link('All', class: 'active') + end end it 'shows correct runner when type matches' do @@ -174,9 +176,11 @@ RSpec.describe "Admin Runners" do expect(page).to have_content 'runner-project' expect(page).to have_content 'runner-group' - click_on 'Project' + page.within('[data-testid="runner-type-tabs"]') do + click_on('Project') - expect(page).to have_link('Project', class: 'active') + expect(page).to have_link('Project', class: 'active') + end expect(page).to have_content 'runner-project' expect(page).not_to have_content 'runner-group' @@ -185,9 +189,11 @@ RSpec.describe "Admin Runners" do it 'shows no runner when type does not match' do visit admin_runners_path - click_on 'Instance' + page.within('[data-testid="runner-type-tabs"]') do + click_on 'Instance' - expect(page).to have_link('Instance', class: 'active') + expect(page).to have_link('Instance', class: 'active') + end expect(page).not_to have_content 'runner-project' expect(page).not_to have_content 'runner-group' @@ -200,7 +206,9 @@ RSpec.describe "Admin Runners" do visit admin_runners_path - click_on 'Project' + page.within('[data-testid="runner-type-tabs"]') do + click_on 'Project' + end expect(page).to have_content 'runner-project' expect(page).to have_content 'runner-2-project' @@ -224,7 +232,9 @@ RSpec.describe "Admin Runners" do expect(page).to have_content 'runner-group' expect(page).not_to have_content 'runner-paused-project' - click_on 'Project' + page.within('[data-testid="runner-type-tabs"]') do + click_on 'Project' + end expect(page).to have_content 'runner-project' expect(page).not_to have_content 'runner-group' diff --git a/spec/features/merge_request/user_posts_diff_notes_spec.rb b/spec/features/merge_request/user_posts_diff_notes_spec.rb index dcd289c7627..79e46e69157 100644 --- a/spec/features/merge_request/user_posts_diff_notes_spec.rb +++ b/spec/features/merge_request/user_posts_diff_notes_spec.rb @@ -238,8 +238,10 @@ RSpec.describe 'Merge request > User posts diff notes', :js do def should_allow_dismissing_a_comment(line_holder, diff_side = nil) write_comment_on_line(line_holder, diff_side) - accept_confirm do - find('.js-close-discussion-note-form').click + find('.js-close-discussion-note-form').click + + page.within('.modal') do + click_button 'OK' end assert_comment_dismissal(line_holder) |