Page MenuHomePhabricator

Wikibase keyboard-based editing browser test fails on Beta
Closed, ResolvedPublic

Description

In Ice7ac84b10, I added a browser test for adding a statement to a Wikibase item using the keyboard. On Beta, this fails, e. g. in this job:

16:17:43 [chrome #0-0] item
16:17:43 [chrome #0-0]   1) can add a statement using the keyboard
16:17:43 [chrome #0-0]
16:17:43 [chrome #0-0]
16:17:43 [chrome #0-0] 2 failing (7s)
16:17:43 [chrome #0-0]
16:17:43 [chrome #0-0] 1) item can add a statement using the keyboard:
16:17:43 [chrome #0-0] failed-save: The save has failed.
16:17:43 [chrome #0-0] Error: failed-save: The save has failed.
16:17:43 [chrome #0-0]     at rawRequest.then (/src/node_modules/mwbot/src/index.js:257:31)
16:17:43 [chrome #0-0]     at tryCatcher (/src/node_modules/bluebird/js/release/util.js:16:23)
16:17:43 [chrome #0-0]     at Promise._settlePromiseFromHandler (/src/node_modules/bluebird/js/release/promise.js:512:31)
16:17:43 [chrome #0-0]     at Promise._settlePromise (/src/node_modules/bluebird/js/release/promise.js:569:18)
16:17:43 [chrome #0-0]     at Promise._settlePromise0 (/src/node_modules/bluebird/js/release/promise.js:614:10)
16:17:43 [chrome #0-0]     at Promise._settlePromises (/src/node_modules/bluebird/js/release/promise.js:694:18)
16:17:43 [chrome #0-0]     at _drainQueueStep (/src/node_modules/bluebird/js/release/async.js:138:12)
16:17:43 [chrome #0-0]     at _drainQueue (/src/node_modules/bluebird/js/release/async.js:131:9)
16:17:43 [chrome #0-0]     at Async._drainQueues (/src/node_modules/bluebird/js/release/async.js:147:5)
16:17:43 [chrome #0-0]     at Immediate.Async.drainQueues (/src/node_modules/bluebird/js/release/async.js:17:14)
16:17:43 [chrome #0-0]     at runCallback (timers.js:672:20)
16:17:43 [chrome #0-0]     at tryOnImmediate (timers.js:645:5)
16:17:43 [chrome #0-0]     at processImmediate [as _immediateCallback] (timers.js:617:5)
16:17:43 [chrome #0-0]

The reason is that anonymous users aren’t allowed to create properties on Beta, which the test attempts to do. Specifically, the test creates a new item to add the statement to, as well as a new property to use for the statement and its qualifiers and references. Neither of these is strictly necessary: the test works on existing items (even if they already have statements), and it could also use the ID of an existing property, provided that it has the 'string' datatype. ('external-id' should also work, and some others like 'url' could also be supported with minor changes to the test, but let’s keep it simple.)

It’s probably not a good idea to have an automatic test continuously add statements to an item – eventually, the item will exceed the maximum MediaWiki page size. But we should be able to change the test to optionally read a property ID from its environment, and only create a new property if that’s missing.

Event Timeline

Lucas_Werkmeister_WMDE triaged this task as Low priority.Nov 8 2018, 4:43 PM
Lucas_Werkmeister_WMDE created this task.

Change 472639 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Create properties only when necessary in browser tests

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

Change 472639 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Create properties only when necessary in browser tests

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

Change 472965 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[integration/config@master] Configure Wikibase 'string' property

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

Change 473008 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Configure 'string' property for daily tests

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

Change 473012 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] Configure 'string' property for daily tests

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

Change 472965 abandoned by Lucas Werkmeister (WMDE):
Configure Wikibase 'string' property

Reason:
See I3cf269e221 instead.

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

Change 473008 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Configure 'string' property for daily tests

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

Change 473012 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Configure 'string' property for daily tests

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

Lucas_Werkmeister_WMDE closed this task as Resolved.Nov 14 2018, 12:40 PM
Lucas_Werkmeister_WMDE claimed this task.

Build #84 succeeded \o/