Page MenuHomePhabricator

Couple errors with Wikibase\Lexeme\Tests\MediaWiki\Diff\LexemeDiffVisualizerIntegrationTest
Closed, ResolvedPublic

Description

Doing a check experimental on WikibaseLexeme triggers quibble-composer-mysql-php70-docker which fails a couple PHPUnit tests.

Debug logs: P7271 and P7272

1) Wikibase\Lexeme\Tests\MediaWiki\Diff\LexemeDiffVisualizerIntegrationTest::testAddedStatementsWithLexmesAsTargetDisplayLemma
Hamcrest\AssertionError: Expected: is valid html piece having child (with tag name "ins" and having child (with tag name "a" and having text contents "foo"))
     but: valid html piece having no children (with tag name "ins" and having child (with tag name "a" and having text contents "foo")) 
Actual html:
<tr><td colspan="2" class="diff-lineno"></td><td colspan="2" class="diff-lineno">property / <a title="Property:P1" href="/index.php/Property:P1">P1</a></td></tr><tr><td colspan="2">&nbsp;</td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange diffchange-inline"><span><a title="Lexeme:L1" href="/index.php/Lexeme:L1">L1</a> <span class="error wb-format-error">The value's type "wikibase-entityid" does not match property's type "string".</span></span></ins></div></td></tr><tr><td colspan="2" class="diff-lineno"></td><td colspan="2" class="diff-lineno">property / <a title="Property:P1" href="/index.php/Property:P1">P1</a>: <a title="Lexeme:L1" href="/index.php/Lexeme:L1">L1</a> <span class="error wb-format-error">The value's type "wikibase-entityid" does not match property's type "string".</span> / rank</td></tr><tr><td colspan="2">&nbsp;</td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange diffchange-inline"><span>Normal rank</span></ins></div></td></tr>

gvendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php:115
gvendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php:52
gvendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php:28
gtests/phpunit/HamcrestPHPUnitIntegration.php:31
gextensions/WikibaseLexeme/tests/phpunit/mediawiki/Diff/LexemeDiffVisualizerIntegrationTest.php:109
gtests/phpunit/MediaWikiTestCase.php:469
gmaintenance/doMaintenance.php:94
2) Wikibase\Lexeme\Tests\MediaWiki\Diff\LexemeDiffVisualizerIntegrationTest::testAddedStatementsOnFormsTargettingFormsAreDisplayedAsLinks
Hamcrest\AssertionError: Expected: is valid html piece having child (with tag name "ins" and having child (with tag name "a" and having text contents "baz"))
     but: valid html piece having no children (with tag name "ins" and having child (with tag name "a" and having text contents "baz")) 
Actual html:
<tr><td colspan="2" class="diff-lineno"></td><td colspan="2" class="diff-lineno">Form / property / <a title="Property:P1" href="/index.php/Property:P1">P1</a></td></tr><tr><td colspan="2">&nbsp;</td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange diffchange-inline"><span><a title="Lexeme:L1" href="/index.php/Lexeme:L1">L1-F1</a> <span class="error wb-format-error">The value's type "wikibase-entityid" does not match property's type "string".</span></span></ins></div></td></tr><tr><td colspan="2" class="diff-lineno"></td><td colspan="2" class="diff-lineno">Form / property / <a title="Property:P1" href="/index.php/Property:P1">P1</a>: <a title="Lexeme:L1" href="/index.php/Lexeme:L1">L1-F1</a> <span class="error wb-format-error">The value's type "wikibase-entityid" does not match property's type "string".</span> / rank</td></tr><tr><td colspan="2">&nbsp;</td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange diffchange-inline"><span>Normal rank</span></ins></div></td></tr>

gvendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php:115
gvendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php:52
gvendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php:28
gtests/phpunit/HamcrestPHPUnitIntegration.php:31
gextensions/WikibaseLexeme/tests/phpunit/mediawiki/Diff/LexemeDiffVisualizerIntegrationTest.php:440
gtests/phpunit/MediaWikiTestCase.php:469
gmaintenance/doMaintenance.php:94

Dummy change: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseLexeme/+/435980
Failed build: https://integration.wikimedia.org/ci/job/quibble-composer-mysql-php70-docker/2297/

Note in both case they show: The value's type "wikibase-entityid" does not match property's type "string".

Event Timeline

hashar created this task.Jun 20 2018, 9:38 AM
hashar updated the task description. (Show Details)Jun 20 2018, 9:45 AM
Vvjjkkii renamed this task from Couple errors with Wikibase\Lexeme\Tests\MediaWiki\Diff\LexemeDiffVisualizerIntegrationTest to olaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
CommunityTechBot renamed this task from olaaaaaaaa to Couple errors with Wikibase\Lexeme\Tests\MediaWiki\Diff\LexemeDiffVisualizerIntegrationTest.Jul 2 2018, 9:55 AM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)

Change 450054 had a related patch set uploaded (by Addshore; owner: Jakob):
[mediawiki/extensions/WikibaseLexeme@master] Get rid of Reflection hack used to override factory member

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

Change 450054 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Get rid of Reflection hack used to override factory member

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

So the merged patch should fix the issue.

Needs to be verified with quibble.

Addshore claimed this task.Aug 8 2018, 8:54 AM
Restricted Application added a project: User-Addshore. · View Herald TranscriptAug 8 2018, 8:54 AM