-
Notifications
You must be signed in to change notification settings - Fork 0
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 #106 from DFE-Digital/1724-add-feature-specs
Add feature specs for search
- Loading branch information
Showing
10 changed files
with
244 additions
and
27 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
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
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,24 @@ | ||
require "rails_helper" | ||
|
||
RSpec.feature "Happy path", type: :feature do | ||
before do | ||
LocalAuthority::Importer.new.reload! | ||
Hub::Importer.new.reload! | ||
end | ||
|
||
let(:expected_hubs_names) do | ||
["Chiltern Teaching School Hub", "Chiltern Teaching School Hub", "Alban Teaching School Hub"] | ||
end | ||
|
||
scenario "Performs search" do | ||
VCR.use_cassette("geocoder") do | ||
visit root_path | ||
click_link("Start now") | ||
expect(page).to have_text("Where do you want to find teaching school hubs?") | ||
fill_in "Where do you want to find teaching school hubs?", with: "Luton" | ||
click_button('Continue') | ||
hubs = all('h3 a').map(&:text) | ||
expect(hubs).to eq(expected_hubs_names) | ||
end | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.