magnusmanske / quickstatements

The official repo for the QuickStatements PHP/HTML/JS interface
https://quickstatements.toolforge.org/
GNU General Public License v3.0
41 stars 16 forks source link

improvements for creating and editing properties, removal of aliases #19

Closed frog23 closed 3 years ago

frog23 commented 3 years ago

this combines three commits which increase capabilities of quickstatements:

toban commented 3 years ago

Hello!

I can confirm that this fixes issues with label, description and properties for the wikibase-docker images.

I've spent most of today writing tests for quickstatements that is included in the wikibase bundle and have a pull request up here with the newly added tests.

I've we compare this is a run on master of this repository https://github.com/wmde/wikibase-release-pipeline/runs/2411450022?check_suite_focus=true

line 4621 of test_wikibase (mysql:5.6, quickstatements)

 [Chrome Headless 86.0.4240.111 linux #0-1] Spec: /usr/src/app/specs/quickstatements/quickstatements.js
[Chrome Headless 86.0.4240.111 linux #0-1] Running: Chrome Headless (v86.0.4240.111) on linux
[Chrome Headless 86.0.4240.111 linux #0-1] Session ID: 168dd90b-a123-4e44-8fd3-5655423f9bd3
[Chrome Headless 86.0.4240.111 linux #0-1]
[Chrome Headless 86.0.4240.111 linux #0-1] QuickStatements Service
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to load the start page
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to create a property in wikibase
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to log in
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to create a two items
[Chrome Headless 86.0.4240.111 linux #0-1]    ✖ Should be able to add a alias to an item
[Chrome Headless 86.0.4240.111 linux #0-1]    ✖ Should be able to add a label to an item
[Chrome Headless 86.0.4240.111 linux #0-1]    ✖ Should be able to add a description to an item
[Chrome Headless 86.0.4240.111 linux #0-1]    - Should be able to add a sitelink to an item
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to add a property to a item
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to add statement with qualifiers
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to add a property with references
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to create another item and add a property
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to add and remove a property on an item
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to merge two items
[Chrome Headless 86.0.4240.111 linux #0-1]
[Chrome Headless 86.0.4240.111 linux #0-1] 10 passing (2m 32s)
[Chrome Headless 86.0.4240.111 linux #0-1] 3 failing
[Chrome Headless 86.0.4240.111 linux #0-1] 1 skipped
[Chrome Headless 86.0.4240.111 linux #0-1]
[Chrome Headless 86.0.4240.111 linux #0-1] 1) QuickStatements Service Should be able to add a alias to an item
[Chrome Headless 86.0.4240.111 linux #0-1] The expression evaluated to a falsy value:

When applying the patch and run the tests the expected things now work. https://github.com/wmde/wikibase-release-pipeline/pull/147/checks?check_run_id=2411536566

line 4602

[Chrome Headless 86.0.4240.111 linux #0-1] Spec: /usr/src/app/specs/quickstatements/quickstatements.js
[Chrome Headless 86.0.4240.111 linux #0-1] Running: Chrome Headless (v86.0.4240.111) on linux
[Chrome Headless 86.0.4240.111 linux #0-1] Session ID: e749b5b3-e6fd-4780-b93f-ef715cf00a1d
[Chrome Headless 86.0.4240.111 linux #0-1]
[Chrome Headless 86.0.4240.111 linux #0-1] QuickStatements Service
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to load the start page
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to create a property in wikibase
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to log in
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to create a two items
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to add a alias to an item
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to add a label to an item
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to add a description to an item
[Chrome Headless 86.0.4240.111 linux #0-1]    - Should be able to add a sitelink to an item
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to add a property to a item
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to add statement with qualifiers
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to add a property with references
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to create another item and add a property
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to add and remove a property on an item
[Chrome Headless 86.0.4240.111 linux #0-1]    ✓ Should be able to merge two items

However I haven't tested the additional functionality, maybe the fix and the added feature should go in separate pull-requests?