Skip to content

Commit

Permalink
ACCEPTANCE TESTS (CAPYBARA) : Browse items while moving in a physical…
Browse files Browse the repository at this point in the history
… space
  • Loading branch information
qhainos committed Jun 24, 2021
1 parent 82fd5b3 commit 9c98873
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions features/step_definitions/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,32 @@
end
end

Alors("l'item {string} est au dessus du plan") do |item|
within('.Spatial') do
find(:xpath, "//div[@class='item' and contains(., '#{item}')]/../following-sibling::div/div[@id='plan']")
end
end

Alors("l'item {string} est au dessus de l'item {string}") do |itemHaut, itemBas|
within('.Spatial') do
find(:xpath, "//div[@class='item' and contains(., '#{itemHaut}')]/../following-sibling::div/div[contains(.,'#{itemBas}')]")
end
end

Alors("l'item {string} est à droite du plan") do |item|
within('.Spatial') do
find(:xpath, "//div[@id='plan']/following-sibling::div[@class='item' and contains(., '#{item}')]")
end
end

Alors("l'item {string} est à droite de l'item {string}") do |itemDroite, itemGauche|
within('.Spatial') do
find(:xpath, "//div[@class='item' and contains(., '#{itemGauche}')]/following-sibling::div[@class='item' and contains(., '#{itemDroite}')]")
end
end

Alors("l'item {string} est à gauche du plan") do |item|
within('.Spatial') do
find(:xpath, "//div[@id='plan']/preceding-sibling::div[@class='item' and contains(., '#{item}')]")
end
end

0 comments on commit 9c98873

Please sign in to comment.