Create Selenium test for loading VE using JS
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | zeljkofilipin | T139740 Port Selenium tests from Ruby to Node.js | |||
Declined | Ryasmeen | T150435 Selenium tests for VisualEditor in Node.js |
Event Timeline
Change 320829 had a related patch set uploaded (by Ryasmeen):
Selenium JS load test for VE
Change 334136 had a related patch set uploaded (by Zfilipin):
Run mediawiki-core-selenium-jessie in experimental pipeline for VisualEditor
Change 334136 merged by jenkins-bot:
Run mediawiki-core-selenium-jessie in experimental pipeline for VisualEditor
I have proposed a skill share session for Vienna hackathon T159945: Selenium/WebdriverIO tests in JavaScript/Node.js if you would like to pair in person.
Change 345146 had a related patch set uploaded (by Zfilipin):
[mediawiki/extensions/VisualEditor@master] WIP WebdriverIO tests
Change 320829 abandoned by Zfilipin:
WIP Selenium test for loading VisualEditor
Reason:
We have decided to use webdriverio, this patch uses webdriverjs. Moved the tests to https://gerrit.wikimedia.org/r/#/c/345146/
@Ryasmeen I am assigning the task back to you.
I have abandoned the webdriverjs patch (320829) since we have decided to use webdriverio instead.
I have done my best to implement the a from the webdriverjs patch in the webdriverio patch (345146) but I do not know how to assert that VisualEditor is loaded. :(
We will probably need help from @Esanders.
mediawiki-core-qunit-selenium-jessie fails with Timeout of 20000ms exceeded
https://integration.wikimedia.org/ci/job/mediawiki-core-qunit-selenium-jessie/3472/
The screenshot says VisualEditor is not configured correctly
@hashar do you know what is the problem?
(Re-triggered the job since the screenshot artefact expired).
I can still reproduce the same error at https://integration.wikimedia.org/ci/job/mediawiki-core-qunit-selenium-jessie/4569/.
Screenshot:
This basically just means that the Jenkins job has set up MediaWiki core and installed the VisualEditor extension, but it has no RESTBase or Parsoid (Node.js service) running. Without Parsoid to convert between wikitext to HTML, VisualEditor can't load or save anything.
I haven't tested the script locally, but test is presumably written fine and would work locally in MediaWiki-Vagrant. The Ruby test presumably worked fine because it ran against Beta Cluster, which already has all these services set-up.
To make it explicit, we did not invest time in updating CI so the example test runs fine there because the repository owner(s) do not have time and/or interest in writing Selenium tests (as far as we can see).
@zeljkofilipin As far as I know, we've never had a Jenkins job that installs both a local MediaWiki wiki and the Parsoid service.
The reason the tests worked under Ruby and fail under Node.js now is because part of the Node.js-switch was also to move from testing Beta Cluster to testing Jenkins build localhost as triggered from Gerrit.
As such, for the specific case of VisualEditor, the tests fail on Jenkins because it also requires the Parsoid service to be installed.
The tests do pass on MediaWiki-Vagrant, assuming you have the visualeditor role enabled, which also installs Parsoid.
Change 345146 abandoned by Zfilipin:
WIP WebdriverIO tests
Reason:
No interest from team working on VisualEditor.
Change 345146 restored by Zfilipin:
[mediawiki/extensions/VisualEditor@master] WIP WebdriverIO tests