Rules automated testing runs cleanly at core versions 8.1, 8.2 and 8.3, as shown on https://travis-ci.org/fago/rules
However, at core 8.4 there is one failure. From my own local test run:
1) Drupal\Tests\rules\Kernel\Engine\AutocompleteTest::testNodeAutocomplete
Failed asserting that Array &0 (
'value' => 'node.revision_timestamp'
'label' => 'node.revision_timestamp (Revision create time)'
) is identical to Array &0 (
'value' => 'node.revision_timestamp'
'label' => 'node.revision_timestamp (Revision timestamp)'
).
/modules/rules/tests/src/Kernel/Engine/AutocompleteTest.php:253
FAILURES!
Tests: 45, Assertions: 178, Failures: 1.
This is echoed on https://www.drupal.org/pift-ci-job/653385
I have not yet investigated this. If anyone knows what has changed in the autocomplete functionality between core 8.3 and 8.4 please share it here. I will do some investigations too.
Maybe on github testing we should also use core 8.4 to highlight problems earlier in the development cycle.
Comments
Comment #2
jonathan1055 commentedOK, the expected values have changed. In 8.3 we have
but in 8.4 this needs to be
This occurs twice. Likewise
'node.revision_uid (Revision user ID)'now has to change to'node.revision_uid (Revision user)'twice. With these alterations the tess pass cleanly at 8.4How do we want to resolve this, given we want tests to pass at 8.3 and 8.4? Is there a recognised way to cater for this kind of change, i.e. test for the core version being run and use alternative expected data?
Comment #3
jonathan1055 commentedHere's a patch which solves the problem. Similar technique to what has already been used in that file.
Comment #5
fagothx, not very nice, but makes sense. Committed.