I just spoke to Chris about this, too. I run with KEEP_BROWSER_OPEN almost all the time, so I didn't notice the failure.
Maybe just changing the particular needed preferences is the right thing to do. -- Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי http://aharoni.wordpress.com “We're living in pieces, I want to live in peace.” – T. Moore 2013/10/21 Chris McMahon <[email protected]> > > The problem has to do with abusing "After" clauses. > > Read this over: https://github.com/cucumber/cucumber/wiki/Hooks > > Look at the @reset-preferences-after in ULS > https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FUniversalLanguageSelector/ec532d63471a2285341d05d85c488ccadf645376/tests%2Fbrowser%2Ffeatures%2Fsupport%2Fhooks.rb > > then look at the After clause the shared code in > https://git.wikimedia.org/blob/mediawiki%2Fselenium/b39c18dae17791558ca77461b435d52bc1b0540b/lib%2Fmediawiki%2Fselenium%2Fhooks.rb > > What's happening is that we try to execute the @reset-preferences-after > hook once before we close the browser and then again after the browser is > closed. This is why the failure has no error message. > > If you run 'bundle exec cucumber features/font_selection.feature:17' with > either KEEP_BROWSER_OPEN or REUSE_BROWSER set to 'true', you can see the > test do a global reset of preferences two times. > > If neither of these is set, then the test attempts to reset preferences a > second time but with no browser open. > > > > > > On Mon, Oct 21, 2013 at 5:20 AM, Željko Filipin <[email protected]>wrote: > >> Niklas and I have been pairing on this today, but we did not find the >> cause of the problem. >> >> If you run font_selection.feature file[1], all scenarios pass >> if KEEP_BROWSER_OPEN is set to true: >> >> >> >> $ export KEEP_BROWSER_OPEN=true >> $ bundle exec cucumber features/font_selection.feature >> Using the default profile... >> ................................ >> >> 4 scenarios (4 passed) >> 29 steps (29 passed) >> 3m44.560s >> >> >> >> If the environment variable is not set to true, all tests fail: >> >> >> >> $ export KEEP_BROWSER_OPEN=nein >> $ bundle exec cucumber features/font_selection.feature >> Using the default profile... >> .........F........F........F.......F >> >> Failing Scenarios: >> cucumber features/font_selection.feature:17 # Scenario: Font selector >> appears >> cucumber features/font_selection.feature:22 # Scenario: Discarding live >> preview of content font >> cucumber features/font_selection.feature:30 # Scenario: Discarding live >> preview of interface font >> cucumber features/font_selection.feature:38 # Scenario: Applying the live >> preview of interface font >> >> 4 scenarios (4 failed) >> 29 steps (29 passed) >> 3m13.416s >> >> >> If a scenario is executed with more verbose output: >> >> >> >> $ bundle exec cucumber --verbose --format pretty >> features/font_selection.feature:17 >> (...) >> (...)/UniversalLanguageSelector/tests/browser/features/support/hooks.rb:19:in >> `After' >> >> Failing Scenarios: >> cucumber features/font_selection.feature:17 # Scenario: Font selector >> appears >> >> 1 scenario (1 failed) >> 6 steps (6 passed) >> 1m3.306s >> >> >> >> It fails at hooks.rb, line 19[2], but that makes no sense, since the page >> opens just fine, and everything works fine if the browser stays open. >> >> I will further investigate the problem this week, but help is >> appreciated. >> >> Željko >> -- >> 1: >> https://github.com/wikimedia/mediawiki-extensions-UniversalLanguageSelector/blob/master/tests/browser/features/font_selection.feature >> 2: >> https://github.com/wikimedia/mediawiki-extensions-UniversalLanguageSelector/blob/master/tests/browser/features/support/hooks.rb#L19 >> >> _______________________________________________ >> QA mailing list >> [email protected] >> https://lists.wikimedia.org/mailman/listinfo/qa >> >> > > _______________________________________________ > QA mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/qa > >
_______________________________________________ QA mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/qa
