2018-06-29 07:49:09 +00:00
|
|
|
When(/^I am on the diff page and disabled the help dialog$/) do
|
2018-08-14 07:04:02 +00:00
|
|
|
step 'I am on the diff page'
|
|
|
|
browser.execute_script('document.cookie = "mw-revslider-hide-help-dialogue=1; path=/";')
|
|
|
|
browser.execute_script('localStorage.setItem( "mw-revslider-hide-help-dialogue", "1" );')
|
2016-10-07 14:28:43 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
When(/^I have closed the help dialog at the start$/) do
|
2017-02-28 12:03:53 +00:00
|
|
|
on(DiffPage).revisionslider_help_close_start_element.when_present.click
|
2018-06-29 07:49:09 +00:00
|
|
|
step 'I wait until help dialog is hidden'
|
2016-10-07 14:28:43 +00:00
|
|
|
end
|
2016-06-29 10:52:05 +00:00
|
|
|
|
2016-10-07 14:28:43 +00:00
|
|
|
When(/^I have closed the help dialog at the end/) do
|
2017-02-28 12:03:53 +00:00
|
|
|
on(DiffPage).revisionslider_help_close_end_element.when_present.click
|
2016-06-29 10:52:05 +00:00
|
|
|
end
|
|
|
|
|
2016-10-07 14:28:43 +00:00
|
|
|
When(/^I have moved to the next step$/) do
|
2017-02-28 12:03:53 +00:00
|
|
|
on(DiffPage).revisionslider_help_next_element.when_present.click
|
2016-06-29 10:52:05 +00:00
|
|
|
end
|
|
|
|
|
2017-03-08 11:24:05 +00:00
|
|
|
When(/^I wait until help dialog is hidden$/) do
|
2016-10-07 14:28:43 +00:00
|
|
|
step 'The help dialog is hidden'
|
|
|
|
end
|
|
|
|
|
2016-07-04 14:43:47 +00:00
|
|
|
Given(/^The help dialog is hidden$/) do
|
|
|
|
on(DiffPage).wait_for_help_dialog_to_hide
|
|
|
|
end
|
|
|
|
|
2016-06-29 10:52:05 +00:00
|
|
|
Then(/^The help dialog should be visible/) do
|
2018-08-14 07:04:02 +00:00
|
|
|
expect(on(DiffPage).revisionslider_help_dialog_element.when_present).to be_present
|
2016-06-29 10:52:05 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
Then(/^The help dialog should not be present/) do
|
2017-02-28 12:03:53 +00:00
|
|
|
expect(on(DiffPage).revisionslider_help_dialog_element.when_not_present).not_to be_present
|
2017-03-08 11:24:05 +00:00
|
|
|
end
|