Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧹 Narrow specificity of CSS selector #2100

Merged
merged 2 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading