|
77 | 77 | describe 'filters' do
|
78 | 78 | describe 'string' do
|
79 | 79 | it 'searches by title' do
|
80 |
| - fill_in 'Search Title', with: 'Brown' |
| 80 | + fill_in 'Title', with: 'Brown' |
81 | 81 | click_on 'Filter'
|
82 | 82 |
|
83 | 83 | within '#index_table_posts' do
|
84 | 84 | page.should have_content('Quick Brown Fox')
|
85 | 85 | end
|
86 | 86 |
|
87 |
| - fill_in 'Search Title', with: 'dog' |
| 87 | + fill_in 'Title', with: 'dog' |
88 | 88 | click_on 'Filter'
|
89 | 89 | page.should_not have_content('Quick Brown Fox')
|
90 | 90 |
|
91 |
| - fill_in 'Search Title', with: '' |
| 91 | + fill_in 'Title', with: '' |
92 | 92 | click_on 'Filter'
|
93 | 93 |
|
94 | 94 | page.should have_content('Displaying 1 Post')
|
|
120 | 120 | describe 'numeric' do
|
121 | 121 | it 'searches by created_at range', js: true do
|
122 | 122 | within '.filter_numeric' do
|
123 |
| - find(:select).find('option[value=view_count_eq]').select_option |
| 123 | + find(:select).find('option[value=view_count_equals]').select_option |
124 | 124 | end
|
125 | 125 | fill_in 'View count', with: '5'
|
126 | 126 | click_on 'Filter'
|
|
134 | 134 | page.should_not have_content('Quick Brown Fox')
|
135 | 135 |
|
136 | 136 | within '.filter_numeric' do
|
137 |
| - find(:select).find('option[value=view_count_lt]').select_option |
| 137 | + find(:select).find('option[value=view_count_less_than]').select_option |
138 | 138 | end
|
139 | 139 | click_on 'Filter'
|
140 | 140 |
|
|
143 | 143 | end
|
144 | 144 |
|
145 | 145 | within '.filter_numeric' do
|
146 |
| - find(:select).find('option[value=view_count_gt]').select_option |
| 146 | + find(:select).find('option[value=view_count_greater_than]').select_option |
147 | 147 | end
|
148 | 148 | click_on 'Filter'
|
149 | 149 | page.should_not have_content('Quick Brown Fox')
|
|
0 commit comments