diff --git a/spec/features/admin_menu_spec.rb b/spec/features/admin_menu_spec.rb index a35ce7a0..8d5d7fd7 100644 --- a/spec/features/admin_menu_spec.rb +++ b/spec/features/admin_menu_spec.rb @@ -14,7 +14,7 @@ visit root_path within '#user-util-collapse' do - expect(page).not_to have_css('li a', text: 'Transform data', visible: :visible) + expect(page).to have_no_css('li a', text: 'Transform data', visible: :visible) click_link curator.email expect(page).to have_css('li a', text: 'Transform data', visible: :visible) end diff --git a/spec/features/boolean_query_spec.rb b/spec/features/boolean_query_spec.rb index 99111583..b6b09b37 100644 --- a/spec/features/boolean_query_spec.rb +++ b/spec/features/boolean_query_spec.rb @@ -40,7 +40,7 @@ def create_resource(exhibit, file_name) q: 'mars AND saturn' ) expect(page).to have_css('.document-title-heading bdi', text: /^Mars Saturn$/) - expect(page).not_to have_css('.document-title-heading bdi', text: /^Saturn$/) + expect(page).to have_no_css('.document-title-heading bdi', text: /^Saturn$/) end it 'Saturn NOT Mars excludes Mars in titles' do @@ -49,6 +49,6 @@ def create_resource(exhibit, file_name) q: 'saturn NOT mars' ) expect(page).to have_css('.document-title-heading bdi', text: /^Saturn$/) - expect(page).not_to have_css('.document-title-heading bdi', text: /^Mars Saturn$/) + expect(page).to have_no_css('.document-title-heading bdi', text: /^Mars Saturn$/) end end diff --git a/spec/features/bulk_resource_delete_spec.rb b/spec/features/bulk_resource_delete_spec.rb index 785513dd..1b3f9dfe 100644 --- a/spec/features/bulk_resource_delete_spec.rb +++ b/spec/features/bulk_resource_delete_spec.rb @@ -118,8 +118,8 @@ it 'does not offer bulk delete' do visit root_path click_button 'Search' - expect(page).not_to have_content 'Bulk actions' - expect(page).not_to have_content 'Delete items' + expect(page).to have_no_content 'Bulk actions' + expect(page).to have_no_content 'Delete items' end end end diff --git a/spec/features/contact_form_override_spec.rb b/spec/features/contact_form_override_spec.rb index ef9a6d6f..adafa116 100644 --- a/spec/features/contact_form_override_spec.rb +++ b/spec/features/contact_form_override_spec.rb @@ -22,7 +22,7 @@ visit spotlight.exhibit_path(exhibit) click_on 'Contact us' expect(page).to have_content 'To contact us about any matter related to DLME' - expect(page).not_to have_css('.alert-primary') # We removed this markup from the spotlight form + expect(page).to have_no_css('.alert-primary') # We removed this markup from the spotlight form fill_in 'Your name', with: 'Some Body' fill_in 'Your email', with: 'test@example.com' fill_in 'Message', with: 'This is my problem report' diff --git a/spec/features/contextual_date_sort_message_spec.rb b/spec/features/contextual_date_sort_message_spec.rb index 12e68841..f5f53484 100644 --- a/spec/features/contextual_date_sort_message_spec.rb +++ b/spec/features/contextual_date_sort_message_spec.rb @@ -27,7 +27,7 @@ click_link('Title') end within '#content' do - expect(page).not_to have_css '.date-sort-message' + expect(page).to have_no_css '.date-sort-message' end end end @@ -63,7 +63,7 @@ within '.date-sort-message' do click_button 'Dismiss' end - expect(page).not_to have_css '.date-sort-message' + expect(page).to have_no_css '.date-sort-message' end click_button 'Search' within '#content' do @@ -83,11 +83,11 @@ within '.date-sort-message' do click_button "Don't show again" end - expect(page).not_to have_css '.date-sort-message' + expect(page).to have_no_css '.date-sort-message' end click_button 'Search' within '#content' do - expect(page).not_to have_css '.date-sort-message' + expect(page).to have_no_css '.date-sort-message' end end # rubocop:enable RSpec/ExampleLength diff --git a/spec/features/contextual_result_message_spec.rb b/spec/features/contextual_result_message_spec.rb index 7dd486a9..e0d9402f 100644 --- a/spec/features/contextual_result_message_spec.rb +++ b/spec/features/contextual_result_message_spec.rb @@ -27,7 +27,7 @@ it 'does not show the contextual pane' do within '#content' do - expect(page).not_to have_css '.alert.alert-info' + expect(page).to have_no_css '.alert.alert-info' end end end @@ -36,7 +36,7 @@ within '#content' do expect(page).to have_css '.alert.alert-info', text: 'You might see more results for your query' click_button 'Don\'t show again' - expect(page).not_to have_css '.alert.alert-info' + expect(page).to have_no_css '.alert.alert-info' end end @@ -44,7 +44,7 @@ within '#content' do expect(page).to have_css '.alert.alert-info', text: 'You might see more results for your query' click_button 'Dismiss' - expect(page).not_to have_css '.alert.alert-info' + expect(page).to have_no_css '.alert.alert-info' end click_button 'Search' within '#content' do @@ -56,11 +56,11 @@ within '#content' do expect(page).to have_css '.alert.alert-info', text: 'You might see more results for your query' click_button 'Don\'t show again' - expect(page).not_to have_css '.alert.alert-info' + expect(page).to have_no_css '.alert.alert-info' end click_button 'Search' within '#content' do - expect(page).not_to have_css '.alert.alert-info', text: 'You might see more results for your query' + expect(page).to have_no_css '.alert.alert-info', text: 'You might see more results for your query' end end end diff --git a/spec/features/custom_range_limit_spec.rb b/spec/features/custom_range_limit_spec.rb index dc1ccd00..3ce25cbc 100644 --- a/spec/features/custom_range_limit_spec.rb +++ b/spec/features/custom_range_limit_spec.rb @@ -22,7 +22,7 @@ it 'has a customized togglable range limit, defaulting to Gregorian' do visit spotlight.search_exhibit_catalog_path(exhibit, q: '*') - expect(page).not_to have_css '.facet-limit.blacklight-cho_date_range_hijri_isim' + expect(page).to have_no_css '.facet-limit.blacklight-cho_date_range_hijri_isim' find('.facet-limit.blacklight-cho_date_range_norm_isim').click expect(page).to have_css '[data-date-range-selector-original-field="cho_date_range_norm_isim"]' expect(page).to have_css '#selected_range_field_cho_date_range_norm_isim[checked="checked"]' @@ -32,7 +32,7 @@ it 'custom data attributes needed are available' do visit spotlight.search_exhibit_catalog_path(exhibit, q: '*') - expect(page).not_to have_css '.facet-limit.blacklight-cho_date_range_hijri_isim' + expect(page).to have_no_css '.facet-limit.blacklight-cho_date_range_hijri_isim' find('.facet-limit.blacklight-cho_date_range_norm_isim').click expect(page).to have_css '[data-date-range-selector-paths*="/catalog/facet/cho_date_range_hijri_isim?q=%2A"]' expect(page).to have_css '[data-date-range-selector-paths*="/catalog/facet/cho_date_range_norm_isim?q=%2A"]' @@ -52,7 +52,7 @@ q: '*', range: { cho_date_range_hijri_isim: { begin: 1384, end: 1387 } } ) - expect(page).not_to have_css '.facet-limit.blacklight-cho_date_range_norm_isim' + expect(page).to have_no_css '.facet-limit.blacklight-cho_date_range_norm_isim' find('.facet-limit.blacklight-cho_date_range_hijri_isim').click expect(page).to have_css '#selected_range_field_cho_date_range_hijri_isim[checked="checked"]' diff --git a/spec/features/things_can_be_indexed_spec.rb b/spec/features/things_can_be_indexed_spec.rb index 00cef856..3fb65656 100644 --- a/spec/features/things_can_be_indexed_spec.rb +++ b/spec/features/things_can_be_indexed_spec.rb @@ -41,8 +41,8 @@ visit root_path click_button 'Search' expect(page).to have_content 'Creator' - expect(page).not_to have_content 'Shown At' - expect(page).not_to have_content 'Indexed At' + expect(page).to have_no_content 'Shown At' + expect(page).to have_no_content 'Indexed At' end end end