Commit fe2f4b2
committed
minor #7589 Fix CrudTestSelectors::getActionSelector() not matching grouped actions (lacatoire)
This PR was submitted for the 5.x branch but it was merged into the 4.x branch instead.
Discussion
----------
Fix CrudTestSelectors::getActionSelector() not matching grouped actions
``CrudTestSelectors::getActionSelector()`` looked for the ``.action-<name>`` CSS class. That class is set only on top-level actions by ``ActionFactory::transformActions()``; actions nested inside an ``ActionGroup`` go through ``processActionGroup()`` and never receive it, so test helpers like ``assertIndexEntityActionExists()`` silently failed on grouped actions.
Switch the selector to ``[data-action-name="<name>"]``, which ``ActionFactory::processAction()`` sets unconditionally on every action (top-level or nested). A single attribute selector also avoids the comma-OR composition pitfall in ``getGlobalActionSelector()`` / ``getIndexEntityActionSelector()``, which otherwise let the right-hand branch escape the scope.
Fixes #7518
Commits
-------
0977a23 Make getActionSelector() match grouped actions via data-action-name1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
0 commit comments