Last modified: 2013-08-30 10:57:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52130, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50130 - fix Login method for test2
fix Login method for test2
Status: VERIFIED FIXED
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
wmf-deployment
All All
: Unprioritized major (vote)
: ---
Assigned To: Željko Filipin
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-24 21:23 UTC by Chris McMahon
Modified: 2013-08-30 10:57 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Chris McMahon 2013-06-24 21:23:26 UTC
Selenium_user is now a Global account. 

Because of that, login at test2.wikipedia.org redirects to login.wikipedia.org before returning to test2. This is "SUL" I believe.

This breaks our idea of what visit() and on() mean in term of pages for logged-in users, and all of the tests that require @login for test2wiki now fail. 

I have disabled the test2 builds until we can resolve how to login both with SUL and without.
Comment 1 Gerrit Notification Bot 2013-06-26 14:41:18 UTC
Related URL: https://gerrit.wikimedia.org/r/70639 (Gerrit Change I6467cd14ce6a193c45a803c6798c176dcc7a444a)
Comment 2 Gerrit Notification Bot 2013-06-26 16:39:03 UTC
Related URL: https://gerrit.wikimedia.org/r/70651 (Gerrit Change I69d102ad2d70d272e4a33eb5481f707162b7b2c3)
Comment 3 Chris McMahon 2013-06-26 21:18:00 UTC
Still need to fix all @login tests for test2, e.g. math.feature
Comment 4 Željko Filipin 2013-06-27 14:11:24 UTC
Chris said: "upload_wizard.feature, math.feature, visual_editor.feature never navigate to a testable page after logging in"
Comment 5 Željko Filipin 2013-06-27 14:11:46 UTC
Failed tests on my machine:

$ bundle exec cucumber --tags @test2.wikipedia.org
Using the default profile...
---.......F............................................F-----........................................F----............F.F-----------------------------------...F-------

(::) failed steps (::)

expected "No file by this name exists.\nFile usage\nThere are no pages that link to this file." to match "No\\ file\\ by\\ this\\ name\\ exists,\\ but\\ you\\ can\\ upload\\ it\\." (RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/page_steps.rb:28:in `/^page text should contain (.+)$/'
features/file.feature:12:in `Then page text should contain No file by this name exists, but you can upload it.'

unable to locate element, using {:text=>"Create source", :tag_name=>"a"} (Watir::Exception::UnknownObjectException)
(eval):1:in `process_watir_call'
./features/step_definitions/page_steps.rb:6:in `/^I click link Create$/'
./features/step_definitions/math_steps.rb:4:in `/^I am editing page that does not exist$/'
features/math_readonly.feature:7:in `And I am editing page that does not exist'

unable to locate element, using {:text=>"Date and time", :tag_name=>"a"} (Watir::Exception::UnknownObjectException)
(eval):1:in `process_watir_call'
./features/step_definitions/preferences_datetime_steps.rb:2:in `/^I click Date and time$/'
features/preferences_datetime_readonly.feature:8:in `And I click Date and time'

unable to locate element, using {:id=>"mwe-upwiz-tutorial", :tag_name=>"div"} (Watir::Exception::UnknownObjectException)
(eval):1:in `process_watir_call'
./features/step_definitions/upload_wizard_steps.rb:32:in `/^I navigate to Upload Wizard$/'
features/upload_wizard.feature:6:in `When I navigate to Upload Wizard'

unable to locate element, using {:text=>"Edit", :tag_name=>"a"} (Watir::Exception::UnknownObjectException)
(eval):1:in `process_watir_call'
./features/step_definitions/visual_editor_steps.rb:36:in `block (2 levels) in <top (required)>'
./features/step_definitions/visual_editor_steps.rb:35:in `/^I edit the page with a string$/'
features/visual_editor.feature:9:in `When I edit the page with a string'

Failing Scenarios:
cucumber features/file.feature:9 # Scenario: Logged-in user goes to file that does not exist
cucumber features/math_readonly.feature:5 # Scenario: Display simple math
cucumber features/preferences_datetime_readonly.feature:5 # Scenario: Preferences Date Time
cucumber features/upload_wizard.feature:8 # Scenario: Navigate to Learn page
cucumber features/visual_editor.feature:7 # Scenario: Basic edit

33 scenarios (5 failed, 4 skipped, 24 passed)
164 steps (5 failed, 51 skipped, 108 passed)
5m30.297s
Comment 7 Željko Filipin 2013-06-27 14:59:30 UTC
Looks like the problem is that when the login form is submitted at http://test2.wikipedia.org/wiki/Special:UserLogin user is redirected to a secure page https://test2.wikipedia.org/wiki/Special:CentralLogin/complete

The tests then try to access http://test2.wikipedia.org/wiki/Special:UploadWizard but the user is not logged in via http but via https so "Not logged in" error page appears.
Comment 8 Željko Filipin 2013-06-27 15:02:29 UTC
The fix is to set https MEDIAWIKI_URL:

export MEDIAWIKI_URL=https://test2.wikipedia.org/wiki/
Comment 9 Gerrit Notification Bot 2013-06-27 15:03:37 UTC
Related URL: https://gerrit.wikimedia.org/r/70824 (Gerrit Change I9ca509a2ee549549540abe53e833a4367bf2a27d)
Comment 10 Gerrit Notification Bot 2013-06-27 15:03:39 UTC
Change 70824 had a related patch set uploaded by Zfilipin:
Fix logging in for upload wizard tests

https://gerrit.wikimedia.org/r/70824
Comment 11 Gerrit Notification Bot 2013-06-27 23:22:52 UTC
Change 70824 merged by Cmcmahon:
Fix logging in for upload wizard tests

https://gerrit.wikimedia.org/r/70824
Comment 12 Chris McMahon 2013-06-27 23:23:57 UTC
I think we still need to fix this in the test2 Jenkins builds though.
Comment 13 Željko Filipin 2013-06-28 03:19:00 UTC
Current status:

$ export MEDIAWIKI_URL=http://test2.wikipedia.org/wiki/
$ bundle exec cucumber --tags @test2.wikipedia.org
...
33 scenarios (14 failed, 19 passed)
164 steps (14 failed, 48 skipped, 102 passed)
10m27.891s
Comment 14 Željko Filipin 2013-06-28 04:09:51 UTC
$ export MEDIAWIKI_URL=https://test2.wikipedia.org/wiki/
$ bundle exec cucumber --tags @test2.wikipedia.org
...
33 scenarios (7 failed, 26 passed)
164 steps (7 failed, 19 skipped, 138 passed)
11m20.188s
Comment 15 Željko Filipin 2013-06-28 04:10:25 UTC
moving to https reduced the number of failed tests significantly
Comment 16 Gerrit Notification Bot 2013-06-28 04:13:44 UTC
Change 70986 had a related patch set uploaded by Zfilipin:
Fix logging in at test2.wikipedia.org

https://gerrit.wikimedia.org/r/70986
Comment 17 Gerrit Notification Bot 2013-06-28 15:56:09 UTC
Change 70986 merged by Cmcmahon:
Fix logging in at test2.wikipedia.org

https://gerrit.wikimedia.org/r/70986
Comment 18 Andre Klapper 2013-07-01 09:25:46 UTC
Also see bug 49708, bug 47843
Comment 19 Chris McMahon 2013-07-01 15:03:51 UTC
this is a result of bug 50334

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links