mediawiki-extensions-Popups/tests/browser/features/support/step_definitions/common_steps.rb
Sam Smith 6a2f641cf4 Hygiene: Remove RL-related step
High-level acceptance tests shouldn't expose low-level concepts such as
the Resource Loader ("RL"). Merge the "And the RL module has loaded"
step into the "Given I am on the test page" step as they are only ever
used together.

Changes:
* Use the ArticlePage#wait_until_rl_module_ready helper method provided
  by mediawiki_selenium@1.7.3.
* Update and include the Gemfile.lock.

Change-Id: Ic81eae5dc0caa8ec51c91b21aef544f52d8c49e1
2016-12-13 14:46:03 +00:00

14 lines
395 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 }) do |page|
page.wait_until_rl_module_ready('ext.popups')
end
end