2016-12-13 14:13:22 +00:00
|
|
|
Given(/^the test page has been created$/) do
|
2016-04-13 21:21:38 +00:00
|
|
|
api.create_page 'Popups test page', File.read('samples/links.wikitext')
|
|
|
|
end
|
|
|
|
|
|
|
|
Given(/^I am on the "(.*?)" page$/) do |page|
|
|
|
|
visit(ArticlePage, using_params: { article_name: page })
|
|
|
|
end
|
|
|
|
|
2016-12-13 14:13:22 +00:00
|
|
|
Given(/^I have enabled the beta feature$/) do
|
|
|
|
visit(SpecialPreferencesPage).enable_page_previews
|
2016-04-13 21:21:38 +00:00
|
|
|
end
|
2016-04-20 12:33:34 +00:00
|
|
|
|
2016-12-13 14:13:22 +00:00
|
|
|
Given(/^the RL module has loaded$/) do
|
2016-04-20 12:33:34 +00:00
|
|
|
on(ArticlePage) do |page|
|
|
|
|
page.wait_until do
|
2016-12-13 14:13:22 +00:00
|
|
|
browser.execute_script("return mw.loader.getState('ext.popups') === 'ready'")
|
2016-04-20 12:33:34 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|