Skip to content

Commit

Permalink
🧹 Narrow specificity of CSS selector
Browse files Browse the repository at this point in the history
The selector was *very* specific, and with the HTML class changes for
Bootstrap 3 to 4, this almost certainly broke.

Note, there are still underlying issues with two other specs; there
errors are listed below:

```
1) Admin can select home page theme when a search results theme is
selected updates the search results page with the selected layout view

Failure/Error: super

     ActionView::Template::Error:
       undefined method `with_collection' for nil:NilClass
```
  • Loading branch information
jeremyf committed Dec 21, 2023
1 parent 0444cf5 commit 69533b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/features/appearance_theme_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
allow_any_instance_of(ApplicationController).to receive(:current_account).and_return(account)
visit '/'
expect(page).to have_css('body.cultural_repository')
expect(page).to have_css('nav.navbar.navbar-inverse.navbar-static-top.cultural-repository-nav')
expect(page).to have_css('nav.navbar.cultural-repository-nav')
end

it 'updates the home theme when the theme is changed' do # rubocop:disable RSpec/ExampleLength
Expand All @@ -154,7 +154,7 @@
allow_any_instance_of(ApplicationController).to receive(:current_account).and_return(account)
visit '/'
expect(page).to have_css('body.cultural_repository')
expect(page).to have_css('nav.navbar.navbar-inverse.navbar-static-top.cultural-repository-nav')
expect(page).to have_css('nav.navbar.cultural-repository-nav')
visit '/admin/appearance'
click_link('Themes')
select('Default home', from: 'Home Page Theme')
Expand All @@ -174,7 +174,7 @@
visit '/'
expect(page).to have_css('body.missing_theme')
expect(page).not_to have_css('nav.cultural-repsitory-nav')
expect(page).to have_css('nav.navbar.navbar-inverse.navbar-static-top')
expect(page).to have_css('nav.navbar.navbar-expand-lg')
end
end
end

0 comments on commit 69533b5

Please sign in to comment.