Page MenuHomePhabricator

QuickSurveys not dismissable and QuickSurveys browser tests are failing
Closed, ResolvedPublic

Description

The last 8 builds against the beta cluster have failed:
https://integration.wikimedia.org/ci/view/Reading-Web/job/selenium-QuickSurveys/
I don't think it's broken but i think it is trying to use a survey that does not run on the beta cluster (internal-example-survey).

Rather than enable these surveys on the beta cluster use the example-survey in the browser tests that run on the beta cluster. We don't need both internal and external running daily. Just one should be fine.

Developer notes

It seems existing @integration tests are also failing these will need to be fixed beforehand.

Looking into this there is indeed a JS failure in these browser tests:

utils.js?bcbd1:54 Uncaught TypeError: Cannot read property 'get' of undefined
    at Object.getCountryCode (utils.js?bcbd1:54)
    at ExternalSurvey.log (QuickSurvey.js?ee91d:154)
    at ExternalSurvey.onChoose (QuickSurvey.js?ee91d:165)
    at HTMLSpanElement.<anonymous> (ExternalSurvey.js?a1598:51)
    at HTMLSpanElement.dispatch (load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=minerva&version=1ousyph:5206)
    at HTMLSpanElement.elemData.handle (load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=minerva&version=1ousyph:5014)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 10 2017, 6:39 AM
Jdlrobson triaged this task as High priority.May 10 2017, 6:42 AM
Jdlrobson updated the task description. (Show Details)

Change 353276 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/QuickSurveys@master] Do not run internal or external survey browser tests on BC

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

Jdlrobson updated the task description. (Show Details)May 11 2017, 1:38 PM
Jdlrobson renamed this task from QuickSurveys browser tests are failing to QuickSurveys browser tests are failing and survey buttons throw JS error.May 11 2017, 2:20 PM
Jdlrobson updated the task description. (Show Details)

Change 353294 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/QuickSurveys@master] Explicitly add mediawiki.cookie dependency

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

Change 353294 merged by jenkins-bot:
[mediawiki/extensions/QuickSurveys@master] Explicitly add mediawiki.cookie dependency

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

ovasileva renamed this task from QuickSurveys browser tests are failing and survey buttons throw JS error to QuickSurveys not dismissable and QuickSurveys browser tests are failing.May 16 2017, 11:13 AM

Change 353978 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/QuickSurveys@wmf/1.30.0-wmf.1] Explicitly add mediawiki.cookie dependency

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

Change 353276 merged by jenkins-bot:
[mediawiki/extensions/QuickSurveys@master] Do not run internal or external survey browser tests on BC

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

I'll SWAT the bug fix to production today and then verify the BC tests are passing.

@Jdlrobson - how can we test this?

Change 353978 merged by jenkins-bot:
[mediawiki/extensions/QuickSurveys@wmf/1.30.0-wmf.1] Explicitly add mediawiki.cookie dependency

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

Jdlrobson closed this task as Resolved.May 16 2017, 1:54 PM
Jdlrobson claimed this task.

This one's not easy to test as we currently don't have any enabled surveys running.

I have verified that clicking "no thanks" on the survey on https://en.m.wikipedia.beta.wmflabs.org/wiki/Quick_survey_test_page_stub?quicksurvey=true does not result in a JavaScript error.

Browser tests are passing https://integration.wikimedia.org/ci/view/Reading-Web/job/selenium-QuickSurveys/

I've also SWATed the change to production.
I've added a note to T151835 to check in production when we deploy that survey but am confident all is working well again.

leila added a subscriber: leila.May 16 2017, 6:10 PM