diff options
Diffstat (limited to 'spec/support/shared_examples/features/runners_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/features/runners_shared_examples.rb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/spec/support/shared_examples/features/runners_shared_examples.rb b/spec/support/shared_examples/features/runners_shared_examples.rb index 1d4af944187..a7bc19da45f 100644 --- a/spec/support/shared_examples/features/runners_shared_examples.rb +++ b/spec/support/shared_examples/features/runners_shared_examples.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true RSpec.shared_examples 'shows and resets runner registration token' do - include Spec::Support::Helpers::ModalHelpers include Spec::Support::Helpers::Features::RunnersHelpers + include Spec::Support::Helpers::ModalHelpers before do click_on dropdown_text @@ -146,6 +146,23 @@ RSpec.shared_examples 'pauses, resumes and deletes a runner' do end end +RSpec.shared_examples 'deletes runners in bulk' do + describe 'when selecting all for deletion', :js do + before do + check s_('Runners|Select all') + click_button s_('Runners|Delete selected') + + within_modal do + click_on "Permanently delete #{runner_count} runners" + end + + wait_for_requests + end + + it_behaves_like 'shows no runners registered' + end +end + RSpec.shared_examples 'filters by tag' do it 'shows correct runner when tag matches' do expect(page).to have_content found_runner |