-
Notifications
You must be signed in to change notification settings - Fork 65
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 #612 from sul-dlss/widget-restrict
Restrict search results widget on home page and to a single instance elsewhere
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
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
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,18 @@ | ||
require "spec_helper" | ||
|
||
feature "Editing the Home Page", js: true do | ||
let(:exhibit) { FactoryGirl.create(:exhibit) } | ||
let(:admin) { FactoryGirl.create(:exhibit_admin, exhibit: exhibit) } | ||
|
||
before { login_as admin } | ||
|
||
it "should not have a search results widget" do | ||
pending("Passing locally but Travis is throwing intermittent errors") if ENV["CI"] | ||
visit spotlight.edit_exhibit_home_page_path(exhibit) | ||
find("[data-icon='add']").click | ||
within("[data-icon='add']") do | ||
expect(page).to have_css("[data-type='text']") | ||
expect(page).not_to have_css("[data-type='search_results']", visible: true) | ||
end | ||
end | ||
end |