Problem/Motivation

The module is deprecated but

- permission administer actions defined by action module but used by Action entity in system module
- rest and jsonapi tests for the config entity are marked as @legacy but should be in respective modules

It's a blocker for #3432134: Remove Action UI module

Proposed resolution

- move permission definition to system module (as the entity defined there)
- move REST tests to system module
- move JSONAPI tests to jsonapi module

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3437589

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andypost created an issue. See original summary.

andypost’s picture

Title: Move permission, jsonapi and rest tests out action module » Move permission, jsonapi and rest tests out of the action module

andypost’s picture

Status: Active » Needs work

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'
     )
catch’s picture

@andypost I think you could remove url.site from the expected cache contexts in the assertion?

andypost’s picture

@catch sadly I can't figure out how to do that in child tests

catch’s picture

hmm it will probably need changes to the base class so the child tests can then alter the expected cache tags.

andypost’s picture

Fixed by overriding method as BaseFieldOverrideResourceTestBase doing

Rest tests should be moved to System module nearby Menu entity, it was done in #2910883: Move all entity type REST tests to the providing modules

The only question is about ActionTest which still looks slow

OK, but incomplete, skipped, or risky tests!
Tests: 8, Assertions: 211, Skipped: 6.
andypost’s picture

Issue summary: View changes
Issue tags: +blocker
smustgrave’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

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.

  • catch committed e4cb224d on 10.3.x
    Issue #3437589 by andypost: Move permission, jsonapi and rest tests out...

  • catch committed c1209497 on 11.x
    Issue #3437589 by andypost: Move permission, jsonapi and rest tests out...
catch’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

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!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.