Page MenuHomePhabricator

Upgrade GettingStarted browser tests to use mediawiki_selenium 1.x
Closed, ResolvedPublic

Details

Related Gerrit Patches:
mediawiki/extensions/GettingStarted : masterUpgrade browser tests to use mediawiki_selenium 1.6 Ruby gem

Event Timeline

dduvall created this task.May 19 2015, 8:31 AM
dduvall raised the priority of this task from to Medium.
dduvall updated the task description. (Show Details)
zeljkofilipin set Security to None.
zeljkofilipin moved this task from Next to In Progress on the Browser-Tests-Infrastructure board.
zeljkofilipin added a subscriber: hashar.EditedSep 26 2015, 9:33 AM

@Mattflaschen Could not find value of MEDIAWIKI_CAPTCHA_BYPASS_PASSWORD. I do not see it at https://office.wikimedia.org/wiki/Selenium_passwords. I can see it at https://integration.wikimedia.org/ci/credential-store/domain/browsertests/credential/mediawiki_captcha_password/ but I do not know how to get the value from there.

Change 241293 had a related patch set uploaded (by Zfilipin):
WIP Upgrade browser tests to use mediawiki_selenium 1.x Ruby gem

https://gerrit.wikimedia.org/r/241293

Found the password by adding echo $MEDIAWIKI_CAPTCHA_BYPASS_PASSWORD to the jenkins job. (I have deleted the job that outputted the password and removed the echo from the job.)

https://integration.wikimedia.org/ci/job/browsertests-GettingStarted-en.wikipedia.beta.wmflabs.org-linux-firefox-sauce-T99655/2/console

00:00:43.381       undefined method `last_session_ids=' for MediawikiSelenium::BrowserFactory::Firefox:Class (NoMethodError)

The tests run fine on my machine, but they break on Jenkins.

Looks like this is not the only occurence of undefined method last_session_ids=. See T114368.

The jobs is now green.

https://integration.wikimedia.org/ci/job/browsertests-GettingStarted-en.wikipedia.beta.wmflabs.org-linux-firefox-sauce-T99655/2/console

I need help with translating if ENV.key?('MEDIAWIKI_CAPTCHA_BYPASS_PASSWORD') to mediawiki_selenium 1.x. The only way I could find is to just use it with env[:mediawiki_captcha_bypass_password] and then rescue MediawikiSelenium::ConfigurationError. I do not like the solution.

https://gerrit.wikimedia.org/r/#/c/241293/6/tests/browser/features/support/pages/registration_page.rb,cm

Also, rubocop complains. :(

00:00:08.089 tests/browser/features/support/pages/registration_page.rb:26:5: W: Do not suppress exceptions.
00:00:08.089     rescue MediawikiSelenium::ConfigurationError

https://integration.wikimedia.org/ci/job/bundle-rubocop/1305/console

<marxarelli> zeljkof: you can provide a default value when looking up configuration
<marxarelli> e.g. lookup(:foo, default: nil)
<marxarelli> https://doc.wikimedia.org/rubygems/mediawiki-selenium/MediawikiSelenium/Environment.html

This is ready to be merged.

https://gerrit.wikimedia.org/r/#/c/241293/

The job with the new code fails with the same error message as the job with the old code, so nothing is broken in the upgrade. :/

expected visible? to return true, got false (RSpec::Expectations::ExpectationNotMetError)

The failure is tracked at T94154: Delete or fix failed GettingStarted browsertests Jenkins job.

Found the password by adding echo $MEDIAWIKI_CAPTCHA_BYPASS_PASSWORD to the jenkins job. (I have deleted the job that outputted the password and removed the echo from the job.)

For future reference, you can get it by:

grep -i wmgCaptchaPassword /srv/mediawiki/wmf-config/PrivateSettings.php

on deployment-bastion.

Change 241293 merged by jenkins-bot:
Upgrade browser tests to use mediawiki_selenium 1.6 Ruby gem

https://gerrit.wikimedia.org/r/241293