- Issue created by @andypost
- Merge request !7292Move permission, jsonapi and rest tests out of the action module #3437589 β (Closed) created by andypost
- Status changed to Needs work
9 months ago 8:32pm 2 April 2024 - π«π·France andypost
As without Actions UI module the Action entity has no canonical link cache contexts are broken
Can't figure out why, looking for help
There was 1 failure: 1) Drupal\Tests\system\Functional\Rest\ActionJsonAnonTest::testGet Failed asserting that two arrays are equal. --- Expected +++ Actual @@ @@ Array ( - 0 => 'url.site' - 1 => 'user.permissions' + 0 => 'user.permissions' )
- π¬π§United Kingdom catch
@andypost I think you could remove url.site from the expected cache contexts in the assertion?
- π«π·France andypost
@catch sadly I can't figure out how to do that in child tests
- π¬π§United Kingdom catch
hmm it will probably need changes to the base class so the child tests can then alter the expected cache tags.
- Status changed to Needs review
9 months ago 5:48pm 4 April 2024 - π«π·France andypost
Fixed by overriding method as
BaseFieldOverrideResourceTestBase
doingRest tests should be moved to System module nearby Menu entity, it was done in π Move all entity type REST tests to the providing modules Fixed
The only question is about
ActionTest
which still looks slowOK, but incomplete, skipped, or risky tests! Tests: 8, Assertions: 211, Skipped: 6.
- Status changed to RTBC
9 months ago 12:35am 6 April 2024 - πΊπΈUnited States smustgrave
I elevated this to major since it's needed for action removal and that date is getting close.
Reviewed the change and moving of permission and tests seems fine, didn't break anything. Nothing stood out as a problem to me.
- Status changed to Fixed
9 months ago 8:06am 6 April 2024 - π¬π§United Kingdom catch
Initially wondered about the permissions move, but we need it for jsonapi and rest even if there's no UI, so really no choice there.
Committed/pushed to 11.x and cherry-picked to 10.3.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.