mediawiki-extensions-Revisi.../tests/browser/features/support/pages/diff_page.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

29 lines
1.1 KiB
Ruby

class DiffPage
include PageObject
p(:revisionslider_placeholder, id: 'mw-revslider-placeholder')
div(:revisionslider_container, id: 'mw-revslider-container')
div(:revisionslider_help_dialog, id: 'revisionslider-help-dialog')
button(:revisionslider_help, css: '#mw-revision-slider-container > button')
a(:revisionslider_help_next, css: '#revisionslider-help-next > a')
a(:revisionslider_help_previous, css: '#revisionslider-help-previous > a')
a(:revisionslider_help_close_start, css: '#revisionslider-help-close-start > a')
a(:revisionslider_help_close_end, css: '#revisionslider-help-close-end > a')
a(:revisionslider_timeline_backwards, css: '#mw-revslider-container > div > a.mw-revslider-arrow.mw-revslider-arrow-backwards')
a(:revisionslider_timeline_forwards, css: '#mw-revslider-container > div > a.mw-revslider-arrow.mw-revslider-arrow-forwards')
def wait_for_slider_to_load
wait_until do
revisionslider_placeholder? == false
end
end
def wait_for_help_dialog_to_hide
wait_until do
revisionslider_help_dialog_element.visible? == false
end
end
end