Skip to content

Commit c77619c

Browse files
committed
Expand specs to include a simple string filter
1 parent cae5b22 commit c77619c

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

spec/features/smoke_spec.rb

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
# New
2424
click_on 'Posts'
2525
click_on 'New Post'
26-
2726
fill_in 'Title', with: 'dhh screencast'
2827
fill_in 'Body', with: 'is still the best intro to rails'
2928

@@ -49,12 +48,26 @@
4948

5049
# List
5150
within('.breadcrumb') { click_on 'Posts' }
52-
5351
within '#index_table_posts' do
5452
page.should have_content('DHH original screencast')
5553
page.should have_content('is still the best intro to rails')
5654
end
5755

56+
# Filter
57+
fill_in 'Search Title', with: 'original'
58+
click_on 'Filter'
59+
60+
within '#index_table_posts' do
61+
page.should have_content('DHH original screencast')
62+
end
63+
64+
fill_in 'Search Title', with: 'orizinal'
65+
click_on 'Filter'
66+
page.should_not have_content('DHH original screencast')
67+
68+
fill_in 'Search Title', with: ''
69+
click_on 'Filter'
70+
5871
page.should have_content('Displaying 1 Post')
5972
end
6073
end

0 commit comments

Comments
 (0)