Commit 59cfbf0d020fa3055b91528178b2732b97574075
Committed by
Rafael Manzo
1 parent
12d1384b
Exists in
colab
and in
4 other branches
Fixed reading delete acceptance test
Signed off by: Diego Araújo <diegoamc90@gmail.com>
Showing
2 changed files
with
7 additions
and
2 deletions
Show diff stats
features/reading/delete.feature
... | ... | @@ -10,7 +10,7 @@ Feature: Reading Deletion |
10 | 10 | And I own a sample reading group |
11 | 11 | And I have a sample reading within the sample reading group |
12 | 12 | When I visit the Sample Reading Group page |
13 | - And I click the Destroy link | |
13 | + And I choose the destroy reading link | |
14 | 14 | Then I should see "There are no Readings yet!" |
15 | 15 | |
16 | 16 | @kalibro_configuration_restart |
... | ... | @@ -20,4 +20,4 @@ Feature: Reading Deletion |
20 | 20 | And I have a sample reading group |
21 | 21 | And I have a sample reading within the sample reading group |
22 | 22 | When I visit the Sample Reading Group page |
23 | - Then I should not see "Destroy" | |
24 | 23 | \ No newline at end of file |
24 | + Then I should not see "Destroy" | ... | ... |
features/step_definitions/reading_steps.rb
... | ... | @@ -29,3 +29,8 @@ end |
29 | 29 | Then(/^I should see a color picker Canvas$/) do |
30 | 30 | page.find('div.colorpicker') |
31 | 31 | end |
32 | + | |
33 | +When(/^I choose the destroy reading link$/) do | |
34 | + url = "/reading_groups/#{@reading_group.id}/readings/#{@reading.id}" | |
35 | + find("//a[@href='#{url}']").click | |
36 | +end | ... | ... |