-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #210 from SwedbankPay/feature/dx-1288_tweaks
DX-1288: Always hide search from the sidebar, even from itself
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
--- | ||
title: Search | ||
layout: search | ||
hide_from_sidebar: true | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'sidebar' | ||
|
||
describe SwedbankPay::Sidebar do | ||
include_context 'shared' | ||
search_path = File.join(@dest_dir, 'search.html') | ||
|
||
describe search_path do | ||
subject { File.read(search_path) } | ||
|
||
it { | ||
expect(File).to exist(search_path) | ||
} | ||
|
||
it 'does not have search item' do | ||
is_expected.not_to have_tag('.main-nav-ul span', text: 'Search') | ||
is_expected.not_to have_tag('.main-nav-ul a[href="/search"]') | ||
end | ||
end | ||
end |