Page MenuHomePhabricator

[MEX] Develop test case for formatted statement
Closed, ResolvedPublic

Description

T394885 introduces a simple statement for the mobile editing interface. The implementation is in Vue and currently has no tests.

Introduce very basic tests to ensure that the Vue interface loads successfully. The tests should run as part of CI, and the choice of testing framework should be appropriate for the perspective that we add many more Vue components and interactive elements.

Acceptance criteria

  • Basic testing functionality is implemented and runs as part of CI
  • The tests fail if the Vue UI (resources/wikibase.mobileUi/wikibase.mobileUi.statementView.vue) is invalid or fails to load / mount

Event Timeline

Change #1153303 had a related patch set uploaded (by Hasan Akgün (WMDE); author: Audrey Penven):

[mediawiki/extensions/Wikibase@master] [WIP] bring real statement data into the Vue template

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

Change #1153303 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Bring real data into the mobile statement template

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

The above change adds some Vue tests; that said, it’s possible that we don’t have any tests covering server-side rendering yet, and if that’s true, we should add them. The currently merged template from that change includes an attribute :href="'/wiki/Property:' + statement.mainsnak.property" which works in php-vuejs-templating 2.1.0, but not in 2.2.0-beta.1 or beta.2, yet CI in this change, which pulls in the new php-vuejs-templating version, seems to be green (as of this writing one build hasn’t quite finished yet). There should be some test that shows the RuntimeException which occurs when loading an item with MEX enabled and using php-vuejs-templating 2.2.0-beta.2. (It’s possible that shouldn’t be part of this change but done somewhere else, but I thought I’d leave a comment here for now.)

Change #1160129 had a related patch set uploaded (by Hasan Akgün (WMDE); author: Hasan Akgün (WMDE)):

[mediawiki/extensions/Wikibase@master] Add statements to ItemViewTest

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

Change #1160129 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Add statements to ItemViewTest

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