Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/172947
Change subject: satisfy ruby lint ...................................................................... satisfy ruby lint Change-Id: Ia97212bc5f3e1bba43c43a0da095c607f957ebb7 --- M tests/browser/features/step_definitions/banner_steps.rb M tests/browser/features/support/hooks.rb M tests/browser/features/support/pages/article_page.rb 3 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/47/172947/1 diff --git a/tests/browser/features/step_definitions/banner_steps.rb b/tests/browser/features/step_definitions/banner_steps.rb index 86a736f..4cf57fe 100644 --- a/tests/browser/features/step_definitions/banner_steps.rb +++ b/tests/browser/features/step_definitions/banner_steps.rb @@ -3,7 +3,7 @@ end When(/^I view an article$/) do - params = { article_name: "Special:Random" } + params = { article_name: 'Special:Random' } params[:query] = "random=#{@override_random}" if @override_random visit(ArticlePage, using_params: params) diff --git a/tests/browser/features/support/hooks.rb b/tests/browser/features/support/hooks.rb index 6bc910b..cd3d343 100644 --- a/tests/browser/features/support/hooks.rb +++ b/tests/browser/features/support/hooks.rb @@ -1,2 +1,2 @@ # Needed for cucumber --dry-run -f stepdefs -require_relative "env" +require_relative 'env' diff --git a/tests/browser/features/support/pages/article_page.rb b/tests/browser/features/support/pages/article_page.rb index 78931c2..64a4791 100644 --- a/tests/browser/features/support/pages/article_page.rb +++ b/tests/browser/features/support/pages/article_page.rb @@ -1,7 +1,13 @@ +# Article page, potentially has a CentralNotice overlay +# +# Supports query parameters, which are used to override default +# banner controller behaviors. class ArticlePage include PageObject - page_url URL.url('<%= params[:article_name] %><%= "?#{params[:query]}" if params[:query] %>') + url_template = '<%= params[:article_name] %>' \ + '<%= "?#{params[:query]}" if params[:query] %>' + page_url URL.url(url_template) - div(:banner_name, id: "centralnotice_testbanner_name") + div(:banner_name, id: 'centralnotice_testbanner_name') end -- To view, visit https://gerrit.wikimedia.org/r/172947 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia97212bc5f3e1bba43c43a0da095c607f957ebb7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: Awight <awi...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits