Skip to content

Commit 8a8c06e

Browse files
committed
changed test to accommodate view changes
1 parent 312eccf commit 8a8c06e

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

app/views/searchcase/display.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<%= will_paginate @return %>
1313
<table id='table'>
14-
<caption>Search results for immigration records</caption>
14+
<caption>Search results for immigration records</caption>
1515
<thead>
1616
<tr>
1717
<th class="record_col" scope="col">Last Name</th>

spec/controllers/application_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
describe '#index' do
88
it 'renders the index template' do
99
get :index
10-
expect(response.body).to match(/Early Arrivals Search/)
10+
expect(response.body).to match(/Early Arrivals Records Search/)
1111
end
1212
end
1313
end

spec/search_spec.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ def generate_test_object
3939
visit '/'
4040
click_button 'Search'
4141
expect(page).to have_content(
42-
'Last Name First Name Middle Name Age Gender ' \
43-
'Port Date Ship Destination LASTNAME FIRSTNAME'
42+
'Search results for immigration records Last Name First Name Middle Name Age Gender Port Date Ship Destination'
4443
)
44+
expect(page).to have_css('table#table tbody tr')
4545
end
4646

4747
scenario 'Search query yields intended results' do
4848
visit '/'
49-
find('#q').set('DOG')
49+
find('#q').set('ZZZQUNOMATCH12345')
5050
click_button 'Search'
5151
expect(page).to have_content('query returned 0 results')
5252
end
@@ -55,13 +55,15 @@ def generate_test_object
5555
context 'when viewing record display', type: :feature do
5656
scenario 'Display Shows intended view' do
5757
visit '/'
58+
find('#q').set('LASTNAME')
5859
click_button 'Search'
5960
first(:link, 'LASTNAME').click
6061
expect(page).to have_content('Record details below')
6162
end
6263

6364
scenario 'Display Shows intended footer' do
6465
visit '/'
66+
find('#q').set('LASTNAME')
6567
click_button 'Search'
6668
first(:link, 'LASTNAME').click
6769
expect(page).to have_content('© University of California Regents. All rights reserved')

0 commit comments

Comments
 (0)