makes more tests green

This commit is contained in:
kikito
2015-12-16 16:21:40 +01:00
parent f43248b174
commit 9ebcebb2ab

View File

@@ -26,16 +26,12 @@ feature 'Legislation' do
fill_in 'annotator-field-0', with: 'this is my annotation' fill_in 'annotator-field-0', with: 'this is my annotation'
page.find(:css, ".annotator-controls a[href='#save']").click page.find(:css, ".annotator-controls a[href='#save']").click
within ".annotate" do
expect(page).to have_css ".annotator-hl[data-annotation-id]" expect(page).to have_css ".annotator-hl[data-annotation-id]"
end
visit legislation_path(legislation) visit legislation_path(legislation)
within ".annotate" do
expect(page).to have_css ".annotator-hl[data-annotation-id]" expect(page).to have_css ".annotator-hl[data-annotation-id]"
end end
end
scenario 'Update' do scenario 'Update' do
legislation = create(:legislation, body: "In order to achieve...") legislation = create(:legislation, body: "In order to achieve...")
@@ -79,11 +75,9 @@ feature 'Legislation' do
visit legislation_path(legislation) visit legislation_path(legislation)
within ".annotate" do
expect(page).to have_css ".annotator-hl[data-annotation-id='#{annotation1.id}']" expect(page).to have_css ".annotator-hl[data-annotation-id='#{annotation1.id}']"
expect(page).to have_css ".annotator-hl[data-annotation-id='#{annotation2.id}']" expect(page).to have_css ".annotator-hl[data-annotation-id='#{annotation2.id}']"
end end
end
end end