mediawiki-extensions-Revisi.../tests/browser/features/support/pages/diff_page.rb
addshore 6101897460 Add browser tests for tutorial / help dialog
Testing the visibility / presence of things around
the dialog appears to be hard and the DOM for the dialog
remains unchanged when shown / hidden as far as I can see.

These tests test that the dialog is only shown once per
user.
And that the sequence of the dialog works in regards to the correct
buttons being present at the correct times.

Bug: T133278
Change-Id: Ia86cb69573da3e888c2897b8b50f1d2e5c61d8d4
2016-07-04 13:39:19 +00:00

21 lines
732 B
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')
def wait_for_slider_to_load
wait_until do
revisionslider_placeholder? == false
end
end
end