Improve slow tests in ./spec/features/admin/admin_settings_spec.rb:992
Summary
The total running time of ./spec/features/admin/admin_settings_spec.rb:992 is 76.95 seconds and it executes 2453 queries. It is likely this can be improved. Please review this suite or example for opportunities to fix slow tests.
Description
This issue was generated from the
rspec profiling project
which profiles rspec tests in pipelines run against the default branch on
gitlab-org/gitlab
.
The test
context 'when service data cached', :use_clean_rails_memory_store_caching do
before do
visit usage_data_admin_application_settings_path
visit service_usage_data_admin_application_settings_path
end
it 'loads usage ping payload on click', :js do
expected_payload_content = /(?=.*"uuid")(?=.*"hostname")/m
expect(page).not_to have_content expected_payload_content
click_button('Preview payload')
expect(page).to have_button 'Hide payload'
expect(page).to have_content expected_payload_content
end
end