|
|
|
@ -17,13 +17,13 @@ RSpec.describe "Log Features" do
|
|
|
|
|
|
|
|
|
|
context "when I search for a specific log" do |
|
|
|
|
it "there is a search bar with a message and search button for logs" do |
|
|
|
|
expect(page).to have_field("search-field") |
|
|
|
|
expect(page).to have_field("search") |
|
|
|
|
expect(page).to have_content("Search by log ID, tenant code, property reference or postcode") |
|
|
|
|
expect(page).to have_button("Search") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "displays log matching the log ID" do |
|
|
|
|
fill_in("search-field", with: log_to_search.id) |
|
|
|
|
fill_in("search", with: log_to_search.id) |
|
|
|
|
click_button("Search") |
|
|
|
|
expect(page).to have_content(log_to_search.id) |
|
|
|
|
expect(page).not_to have_content(same_organisation_log.id) |
|
|
|
|