2016-12-13 14:25:37 +00:00
|
|
|
TEST_PAGE_TITLE = 'Popups test page'
|
2016-04-13 21:21:38 +00:00
|
|
|
|
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:25:37 +00:00
|
|
|
Given(/^I am on the test page$/) do
|
|
|
|
api.create_page TEST_PAGE_TITLE, File.read('fixtures/test_page.wikitext')
|
|
|
|
|
|
|
|
visit(ArticlePage, using_params: { article_name: TEST_PAGE_TITLE })
|
|
|
|
end
|
|
|
|
|
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
|