EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/325435
Change subject: Report failing url for more browser assertions ...................................................................... Report failing url for more browser assertions The with_browser function wraps our calls to report whatever url the browser is at when it fails to help in debugging. Add a few more to debug why a particular patch is failing on smoke.feature:30 Change-Id: Ibce2cfffc55699f0ff80a8dca74c8a492697bc58 --- M tests/browser/features/step_definitions/simple_search_steps.rb 1 file changed, 14 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/35/325435/1 diff --git a/tests/browser/features/step_definitions/simple_search_steps.rb b/tests/browser/features/step_definitions/simple_search_steps.rb index ca2698a..8210513 100644 --- a/tests/browser/features/step_definitions/simple_search_steps.rb +++ b/tests/browser/features/step_definitions/simple_search_steps.rb @@ -10,20 +10,28 @@ # https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FCirrusSearch/HEAD/CREDITS # When(/^I search for: (.+)$/) do |search_term| - on(SearchPage).search_input_element.when_present.send_keys(search_term) + on(SearchPage).search_input_element.when_present.send_keys(search_term) end Then(/^a list of suggested pages should appear$/) do - on(SearchPage).search_results_element.when_present.should exist + with_browser do + on(SearchPage).search_results_element.when_present.should exist + end end Then(/^I should land on Search Results page$/) do - on(SearchResultsPage).search_element.when_present - browser.url.should match Regexp.escape("&title=Special%3ASearch") + with_browser do + on(SearchResultsPage).search_element.when_present + browser.url.should match Regexp.escape("&title=Special%3ASearch") + end end Then(/^(.+) should be the first result$/) do |page_name| - on(SearchPage).first_result.should == page_name + with_browser do + on(SearchPage).first_result.should == page_name + end end Then(/^the page I arrive on has title (.+)$/) do |title| - browser.title.should match Regexp.escape(title) + with_browser do + browser.title.should match Regexp.escape(title) + end end -- To view, visit https://gerrit.wikimedia.org/r/325435 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibce2cfffc55699f0ff80a8dca74c8a492697bc58 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits