Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/57837
Change subject: Escaped all regular expressions ...................................................................... Escaped all regular expressions Not fixing any problem, just trying to make sure something does not go wrong. Change-Id: Id79290bca7e5d401f246fd21cd0187dfd9aa8364 --- M features/step_definitions/login_steps.rb M features/step_definitions/page_steps.rb M features/step_definitions/search_steps.rb 3 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/37/57837/1 diff --git a/features/step_definitions/login_steps.rb b/features/step_definitions/login_steps.rb index b3c3514..22820e0 100644 --- a/features/step_definitions/login_steps.rb +++ b/features/step_definitions/login_steps.rb @@ -26,10 +26,10 @@ on(LoginPage).login_element.should exist end Then /^Log in page should open$/ do - @browser.url.should match /Special:UserLogin/ + @browser.url.should match Regexp.escape(/Special:UserLogin/) end Then(/^main page should have text (.+)$/) do |text| - @browser.text.should match text + @browser.text.should match Regexp.escape(text) end Then(/^main page should open$/) do @browser.url.should == on(MainPage).class.url diff --git a/features/step_definitions/page_steps.rb b/features/step_definitions/page_steps.rb index 8530f47..0011b4e 100644 --- a/features/step_definitions/page_steps.rb +++ b/features/step_definitions/page_steps.rb @@ -53,8 +53,8 @@ end Then(/^I should be on a page that says Move newly created page$/) do - @browser.url.should match /Special:MovePage/ - @browser.text.should match /Move page: #{@does_not_exist_page_name}/ + @browser.url.should match Regexp.escape(/Special:MovePage/) + @browser.text.should match Regexp.escape(/Move page: #{@does_not_exist_page_name}/) end Then(/^I should see a Namespace selectbox$/) do @@ -97,7 +97,7 @@ end Then(/^I should be on a page that says Move succeeded$/) do - @browser.text.should match /Move succeeded/ + @browser.text.should match Regexp.escape(/Move succeeded/) end Then(/^I should have a link to the old page title and a link to the new page title$/) do @@ -106,7 +106,7 @@ end Then(/^I should see the text A redirect has been created$/) do - @browser.text.should match /A redirect has been created/ + @browser.text.should match Regexp.escape(/A redirect has been created/) end diff --git a/features/step_definitions/search_steps.rb b/features/step_definitions/search_steps.rb index d0f393b..193cfb4 100644 --- a/features/step_definitions/search_steps.rb +++ b/features/step_definitions/search_steps.rb @@ -14,7 +14,7 @@ end Then /^I should land on Search Results page$/ do on(SearchResultsPage).search_element.when_present - @browser.url.should match '&title=Special%3ASearch$' + @browser.url.should match Regexp.escape('&title=Special%3ASearch$') end Then /^(.+) should be the first result$/ do |page_name| on(SearchPage).one_result.should == page_name -- To view, visit https://gerrit.wikimedia.org/r/57837 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id79290bca7e5d401f246fd21cd0187dfd9aa8364 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin <zfili...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits