diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
commit | 983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch) | |
tree | b153cd387c14ba23bd5a07514c7c01fddf6a78a0 /spec/features/admin | |
parent | a2bddee2cdb38673df0e004d5b32d9f77797de64 (diff) |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/features/admin')
-rw-r--r-- | spec/features/admin/admin_mode/workers_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/admin/admin_settings_spec.rb | 15 |
2 files changed, 11 insertions, 12 deletions
diff --git a/spec/features/admin/admin_mode/workers_spec.rb b/spec/features/admin/admin_mode/workers_spec.rb index e33c9d7e64c..0ca61e6c193 100644 --- a/spec/features/admin/admin_mode/workers_spec.rb +++ b/spec/features/admin/admin_mode/workers_spec.rb @@ -8,8 +8,6 @@ describe 'Admin mode for workers', :do_not_mock_admin_mode, :request_store, :cle let(:user_to_delete) { create(:user) } before do - add_sidekiq_middleware - sign_in(user) end @@ -60,12 +58,6 @@ describe 'Admin mode for workers', :do_not_mock_admin_mode, :request_store, :cle end end - def add_sidekiq_middleware - Sidekiq::Testing.server_middleware do |chain| - chain.add Gitlab::SidekiqMiddleware::AdminMode::Server - end - end - def execute_jobs_signed_out(user) gitlab_sign_out diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb index 8eb15bb6bf5..1a3da8cb373 100644 --- a/spec/features/admin/admin_settings_spec.rb +++ b/spec/features/admin/admin_settings_spec.rb @@ -348,12 +348,19 @@ describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_not_moc it 'loads usage ping payload on click', :js do allow(ActiveRecord::Base.connection).to receive(:transaction_open?).and_return(false) - expect(page).to have_button 'Preview payload' + page.within('#js-usage-settings') do + expected_payload_content = /(?=.*"uuid")(?=.*"hostname")/m - find('.js-usage-ping-payload-trigger').click + expect(page).not_to have_content expected_payload_content - expect(page).to have_selector '.js-usage-ping-payload' - expect(page).to have_button 'Hide payload' + click_button('Preview payload') + + wait_for_requests + + expect(page).to have_selector '.js-usage-ping-payload' + expect(page).to have_button 'Hide payload' + expect(page).to have_content expected_payload_content + end end end |