mediawiki-extensions-Revisi.../tests/browser/features/support/step_definitions/timeline.rb
addshore 50fdb7b1c9 Timeline browser tests
This adds tests for navigating the timeline using the back
and forward buttons.
It also makes sure that the buttons are disabled / enabled
at the correct times.

Bug: T133278
Change-Id: I9834dd3d3bf107557b15fdd105a946902d53b8f2
2016-07-05 11:44:23 +02:00

23 lines
904 B
Ruby

Then(/^The forward arrow should be disabled/) do
expect(on(DiffPage).revisionslider_timeline_forwards_element.class_name).to match 'mw-revslider-arrow-disabled'
end
Then(/^The backward arrow should be disabled/) do
expect(on(DiffPage).revisionslider_timeline_backwards_element.class_name).to match 'mw-revslider-arrow-disabled'
end
Then(/^The forward arrow should be enabled/) do
expect(on(DiffPage).revisionslider_timeline_forwards_element.class_name).not_to match 'mw-revslider-arrow-disabled'
end
Then(/^The backward arrow should be enabled/) do
expect(on(DiffPage).revisionslider_timeline_backwards_element.class_name).not_to match 'mw-revslider-arrow-disabled'
end
Given(/^I click on the forward arrow$/) do
on(DiffPage).revisionslider_timeline_forwards_element.click
end
Given(/^I click on the backward arrow$/) do
on(DiffPage).revisionslider_timeline_backwards_element.click
end