mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-18 04:51:29 +00:00
a0b01f86ab
Merge the "Given the test page has been created" and "Given I am on the ... page" as they are only ever used together to mean "Given I am on the test page". Supporting changes: * samples/links.wikitext -> fixtures/test_page.wikitext as it's more obvious what the file is. Change-Id: Ide261a8e8c55133ab2a13a80c48e266252f61f5f
20 lines
522 B
Ruby
20 lines
522 B
Ruby
TEST_PAGE_TITLE = 'Popups test page'
|
|
|
|
Given(/^I have enabled the beta feature$/) do
|
|
visit(SpecialPreferencesPage).enable_page_previews
|
|
end
|
|
|
|
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
|
|
|
|
Given(/^the RL module has loaded$/) do
|
|
on(ArticlePage) do |page|
|
|
page.wait_until do
|
|
browser.execute_script("return mw.loader.getState('ext.popups') === 'ready'")
|
|
end
|
|
end
|
|
end
|