2016-06-27 12:38:23 +00:00
|
|
|
class DiffPage
|
|
|
|
include PageObject
|
|
|
|
|
2016-07-01 10:13:53 +00:00
|
|
|
p(:revisionslider_placeholder, id: 'mw-revslider-placeholder')
|
|
|
|
div(:revisionslider_container, id: 'mw-revslider-container')
|
2016-07-04 18:22:22 +00:00
|
|
|
div(:revisionslider_darkness, id: 'mw-revslider-darkness')
|
2016-06-27 12:38:23 +00:00
|
|
|
|
2016-06-29 10:52:05 +00:00
|
|
|
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')
|
|
|
|
|
2016-07-04 14:43:47 +00:00
|
|
|
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')
|
|
|
|
|
2016-07-04 18:22:22 +00:00
|
|
|
div(:revisionslider_pointer_lower, css: '.mw-revslider-pointer-lower')
|
|
|
|
div(:revisionslider_pointer_upper, css: '.mw-revslider-pointer-upper')
|
|
|
|
|
|
|
|
div(:revisionslider_left_summary, id: 'mw-diff-otitle3')
|
|
|
|
div(:revisionslider_right_summary, id: 'mw-diff-ntitle3')
|
|
|
|
|
2016-07-04 16:26:13 +00:00
|
|
|
def revisionslider_rev(index = 1)
|
|
|
|
element('div', css: '.mw-revslider-revision[data-pos="' + index.to_s + '"]')
|
|
|
|
end
|
|
|
|
|
|
|
|
def revisionslider_tooltip(index = 1)
|
|
|
|
element('div', css: '.mw-revslider-revision-tooltip-' + index.to_s)
|
2016-07-04 18:22:22 +00:00
|
|
|
|
2016-07-04 16:26:13 +00:00
|
|
|
end
|
|
|
|
|
2016-06-27 12:38:23 +00:00
|
|
|
def wait_for_slider_to_load
|
|
|
|
wait_until do
|
2016-07-05 11:23:16 +00:00
|
|
|
!revisionslider_placeholder?
|
2016-06-27 12:38:23 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-07-04 18:22:22 +00:00
|
|
|
def wait_for_darkness_to_leave
|
|
|
|
wait_until do
|
|
|
|
!revisionslider_darkness?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-07-04 16:26:13 +00:00
|
|
|
def wait_for_tooltip(index = 1)
|
|
|
|
wait_until do
|
|
|
|
revisionslider_tooltip(index).visible?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def wait_for_no_tooltip(index = 1)
|
|
|
|
wait_until do
|
|
|
|
!revisionslider_tooltip(index).visible?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-07-04 14:43:47 +00:00
|
|
|
def wait_for_help_dialog_to_hide
|
|
|
|
wait_until do
|
2016-07-05 11:23:16 +00:00
|
|
|
!revisionslider_help_dialog_element.visible?
|
2016-07-04 14:43:47 +00:00
|
|
|
end
|
|
|
|
end
|
2016-07-04 18:22:22 +00:00
|
|
|
end
|