Skip to content

Commit

Permalink
Merge pull request #2100 from samvera/hyrax-5-upgrade-fix-a-few-specs
Browse files Browse the repository at this point in the history
🧹 Narrow specificity of CSS selector
  • Loading branch information
jeremyf authored Dec 21, 2023
2 parents f44ed0f + 9c3c46a commit 47648f1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% # OVERRIDE: Hyrax v5.0.0rc2 - added the search bar and removed the /login and locale nav menu and moved to the /controls partial for theming %>
<header aria-label="header" class="top-header">
<nav id="masthead" class="navbar navbar-expand-lg navbar-dark bg-dark justify-content-between cultural-repository-nav <%= placement_class %>" role="navigation" aria-label="masthead">
<nav id="masthead" class="navbar navbar-expand-lg navbar-dark bg-dark justify-content-between institutional-repository-nav <%= placement_class %>" role="navigation" aria-label="masthead">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
Expand Down
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
4 changes: 2 additions & 2 deletions spec/features/cultural_repository_theme_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
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')
expect(page).to have_css('form#search-form-header.cultural-repository.form-horizontal.search-form')
expect(page).to have_css('ul#user_utility_links.cultural-repository.nav.navbar-nav.navbar-right')
expect(page).to have_css('ul#user_utility_links.cultural-repository.nav.navbar-nav')
expect(page).to have_css('div.cultural-repository.facets')
expect(page).to have_css('div.cultural-repository.featured-works-container')
expect(page).to have_css('div.cultural-repository.recent-works-container')
Expand Down
6 changes: 3 additions & 3 deletions spec/features/institutional_repository_theme_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
allow_any_instance_of(ApplicationController).to receive(:current_account).and_return(account)
visit '/'
expect(page).to have_css('body.institutional_repository')
expect(page).to have_css('nav.navbar.navbar-inverse.navbar-static-top.institutional-repsitory-nav')
expect(page).to have_css('nav#masthead.navbar.institutional-repository-nav')
expect(page).to have_css('div.ir-stats')
expect(page).to have_css('div.institutional-repository-featured-researcher')
expect(page).to have_css('div.institutional-repository-recent-uploads')
expect(page).to have_css('div.col-xs-12.col-md-8.institutional-repository.collections-container')
expect(page).to have_css('div.col-12.col-md-8.institutional-repository.collections-container')
expect(page).not_to have_css('ul#homeTabs')
expect(page).not_to have_css('ul.nav.nav-pills')
expect(page).not_to have_css('nav.navbar.navbar-inverse.navbar-static-top.cultural-repository-nav')
expect(page).not_to have_css('nav.navbar.cultural-repository-nav')
expect(page).not_to have_css('background-container-gradient')
end

Expand Down

0 comments on commit 47648f1

Please sign in to comment.