It heavily relies on our DOM structure, so it will most likely break when we change something. We should have it deployed on beta (and test) to be able to test it with new code.
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | • Jonas | T88541 [DO NOT USE] Wikidata Browsertests (tracking) [superseded by #Browser-Tests] | |||
Open | None | T95290 [Story] Browsertests for primary source tool | |||
Invalid | None | T108946 [Epic] Improve the development infrastructure | |||
Open | None | T95289 [Task] Deploy primary sources tool to beta and test.wikidata |
Event Timeline
We picked this up and it is on the board but it was never added to the sprint in phabricator...
Added https://test.wikidata.org/wiki/MediaWiki:Gadget-PrimarySources.js which loads it in the same way as the user-common.js snippet, but from www.wikidata.org. (And included it in https://test.wikidata.org/wiki/MediaWiki:Gadgets-definition ).
But that fails currently as there are relative URLs used in the script, filed a bug for that: https://github.com/google/primarysources/issues/19
Currently can't get the necessary permissions on beta to also add it there, will try later.
I fixed this with commit https://github.com/google/primarysources/commit/cc2da3c08b7663a24343d7dd94b34410e7d84d68, the user script should be testable now on test.wikidata.org and beta.
I still needed to change some URLs to point to the current site (making them relative should work), see https://test.wikidata.org/w/index.php?title=MediaWiki%3AGadget-PrimarySources.js&type=revision&diff=13800&oldid=13799 .
Then it works, but will probably never give any statements as the the low item IDs will probably not have any suggested statements in the backend. Not sure what to do about that. Perhaps add a test modus to the backend? Or run another instance of it with test data? Add a test mode to the gadget which displays random suggested statements on the current item?
Adding a mode to feed the gadget with dummy data seems simplest to me. What do you think @Tomayac?