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

19 lines
593 B
Ruby

Given(/^I have closed the help dialog at the start$/) do
on(DiffPage).revisionslider_help_close_start_element.click
end
Given(/^I have closed the help dialog at the end/) do
on(DiffPage).revisionslider_help_close_end_element.click
end
Given(/^I have moved to the next step$/) do
on(DiffPage).revisionslider_help_next_element.click
end
Then(/^The help dialog should be visible/) do
on(DiffPage).revisionslider_help_dialog_element.visible?.should be_truthy
end
Then(/^The help dialog should not be present/) do
expect{ on(DiffPage).revisionslider_help_dialog }.to raise_error
end