2017-07-11 08:17:24 +00:00
|
|
|
When(/^I click on revision (\d+) to move the older pointer$/) do |index|
|
|
|
|
on(DiffPage).click_revision_older(index.to_i)
|
2016-10-07 15:06:59 +00:00
|
|
|
end
|
|
|
|
|
2017-07-11 08:17:24 +00:00
|
|
|
When(/^I click on revision (\d+) to move the newer pointer$/) do |index|
|
|
|
|
on(DiffPage).click_revision_newer(index.to_i)
|
2016-07-04 18:22:22 +00:00
|
|
|
end
|
|
|
|
|
2017-02-02 17:24:51 +00:00
|
|
|
When(/^I click on the older edit link$/) do
|
|
|
|
on(DiffPage).click_older_edit_link
|
|
|
|
end
|
|
|
|
|
|
|
|
When(/^I click on the newer edit link$/) do
|
|
|
|
on(DiffPage).click_newer_edit_link
|
|
|
|
end
|
|
|
|
|
2017-07-11 08:17:24 +00:00
|
|
|
Given(/^I drag the older pointer to revision (\d+)$/) do |index|
|
2016-10-07 15:06:59 +00:00
|
|
|
on(DiffPage) do |page|
|
2017-07-11 08:17:24 +00:00
|
|
|
page.revisionslider_pointer_older_element.element.drag_and_drop_on page.revisionslider_rev(index.to_i).element
|
2016-10-07 15:06:59 +00:00
|
|
|
end
|
2016-07-04 18:22:22 +00:00
|
|
|
end
|
|
|
|
|
2017-07-11 08:17:24 +00:00
|
|
|
Given(/^I drag the newer pointer to revision (\d+)$/) do |index|
|
2016-10-07 15:06:59 +00:00
|
|
|
on(DiffPage) do |page|
|
2017-07-11 08:17:24 +00:00
|
|
|
page.revisionslider_pointer_newer_element.element.drag_and_drop_on page.revisionslider_rev(index.to_i).element
|
2016-10-07 15:06:59 +00:00
|
|
|
end
|
2016-07-04 18:22:22 +00:00
|
|
|
end
|
|
|
|
|
2016-07-02 20:17:40 +00:00
|
|
|
Given(/^the diff has loaded$/) do
|
|
|
|
on(DiffPage).wait_for_diff_to_load
|
2016-07-04 18:22:22 +00:00
|
|
|
end
|
|
|
|
|
2016-10-07 15:06:59 +00:00
|
|
|
When(/^I wait until the diff has loaded$/) do
|
|
|
|
step 'the diff has loaded'
|
|
|
|
end
|
|
|
|
|
2016-10-13 14:41:19 +00:00
|
|
|
When(/^I wait until the pointers stopped moving$/) do
|
|
|
|
on(DiffPage).wait_for_animations
|
|
|
|
end
|
|
|
|
|
2016-07-04 18:22:22 +00:00
|
|
|
Then(/^revision (\d+) should be loaded on the left of the diff$/) do |index|
|
2017-03-08 11:24:05 +00:00
|
|
|
expect(on(DiffPage).revisionslider_left_summary_element.text).to include 'RS-Summary-' + index.to_s
|
2016-07-04 18:22:22 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
Then(/^revision (\d+) should be loaded on the right of the diff$/) do |index|
|
2017-03-08 11:24:05 +00:00
|
|
|
expect(on(DiffPage).revisionslider_right_summary_element.text).to include 'RS-Summary-' + index.to_s
|
2016-07-04 18:22:22 +00:00
|
|
|
end
|
|
|
|
|
2017-07-11 08:17:24 +00:00
|
|
|
Then(/^the newer pointer should be on revision (\d+)$/) do |index|
|
|
|
|
expect(on(DiffPage).revisionslider_pointer_newer_element.attribute('data-pos')).to eq index
|
2016-07-04 18:22:22 +00:00
|
|
|
end
|
|
|
|
|
2017-07-11 08:17:24 +00:00
|
|
|
Then(/^the older pointer should be on revision (\d+)$/) do |index|
|
|
|
|
expect(on(DiffPage).revisionslider_pointer_older_element.attribute('data-pos')).to eq index
|
2017-03-08 11:24:05 +00:00
|
|
|
end
|