Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Franco Sellitto committed Jun 29, 2016
1 parent 5896065 commit dada4f3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions engines/procurement/spec/steps/categories_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@
end

step 'I delete the picture of the main category' do
# to expand the panel
el = find("input[name*='[name]'][value='#{@main_category.name}']")
el.click # to expand the panel
el.find(:xpath, ".//ancestor::div[contains(@class, 'panel-info')]") \
.find('.collapsed').click

accept_alert do
find('a.delete').click
Expand Down Expand Up @@ -186,8 +188,12 @@

step 'I modify the name' do
@new_name = Faker::Lorem.word

# to expand the panel
el = find("input[name*='[name]'][value='#{@main_category.name}']")
el.click # to expand the panel
el.find(:xpath, ".//ancestor::div[contains(@class, 'panel-info')]") \
.find('.collapsed').click

el.set @new_name
end

Expand Down

0 comments on commit dada4f3

Please sign in to comment.