mediawiki-extensions-Revisi.../tests/browser/features/support/step_definitions/help.rb
Tobias Gritschacher c2f4b64a3a Refactor help browsertest
- Applied the Given-When-Then rule
- Created alias of "close-help-dialog" step for readability

Bug: T146276
Change-Id: Icc8aeb8720025bd3c6d6bc811713fac48a9919dd
2016-10-10 14:52:24 +00:00

32 lines
987 B
Ruby

When(/^I have dismissed the help dialog$/) do
step 'I have closed the help dialog at the start'
step 'I wait until help dialog is hidden'
end
When(/^I have closed the help dialog at the start$/) do
on(DiffPage).revisionslider_help_close_start_element.when_visible.click
end
When(/^I have closed the help dialog at the end/) do
on(DiffPage).revisionslider_help_close_end_element.when_visible.click
end
When(/^I have moved to the next step$/) do
on(DiffPage).revisionslider_help_next_element.when_visible.click
end
When (/^I wait until help dialog is hidden$/) do
step 'The help dialog is hidden'
end
Given(/^The help dialog is hidden$/) do
on(DiffPage).wait_for_help_dialog_to_hide
end
Then(/^The help dialog should be visible/) do
expect(on(DiffPage).revisionslider_help_dialog_element.when_visible).to be_visible
end
Then(/^The help dialog should not be present/) do
expect(on(DiffPage).revisionslider_help_dialog_element.when_not_visible).not_to be_visible
end