Skip to content

Commit

Permalink
Add spec: display wrapped matches in matching order
Browse files Browse the repository at this point in the history
There's no special rendering to note that the match wraps. Perhaps we
should consider that?

See contradb#553
  • Loading branch information
chetgray committed Jan 14, 2019
1 parent 9078ec3 commit 6d55962
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions spec/features/welcome/index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -949,15 +949,26 @@ def setup_and_filter
end
end

it 'figures column' do
dances
visit '/'
expect(page).to_not have_content('whole dance')
click_button 'Figures'
expect(page).to have_content('whole dance', count: 3)
select('circle')
expect(page).to have_css('tr', text: /The Rendevouz.*circle left 4 places\ncircle left 3 places/)
expect(page).to have_css('tr', text: /Call Me.*circle left 3 places/)
describe 'figures column' do
it 'works' do
dances
visit '/'
expect(page).to_not have_content('whole dance')
click_button 'Figures'
expect(page).to have_content('whole dance', count: 3)
select('circle')
expect(page).to have_css('tr', text: /The Rendevouz.*circle left 4 places\ncircle left 3 places/)
expect(page).to have_css('tr', text: /Call Me.*circle left 3 places/)
end

it 'displays wrapped matches in matching order' do
dance = FactoryGirl.create(:box_the_gnat_contra)
visit '/'
click_button 'Figures'
select('then')
select('chain', match: :first)
expect(page).to have_css('tr', text: /Box the Gnat Contra.*chain ⁋\nneighbors balance & box the gnat/)
end
end
end
end
Expand Down

0 comments on commit 6d55962

Please sign in to comment.