Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
All action entities (including non-configurable) have a Label, but by some reason Actions module allows to change it only for configurable actions. Furthermore the is no way to remove non-configurable entities through Actions module UI.
Comment | File | Size | Author |
---|---|---|---|
#28 | interdiff-14-28.txt | 1.8 KB | DanielVeza |
#28 | 2815297-28.patch | 2.31 KB | DanielVeza |
| |||
#14 | actions_module-2815297-14.patch | 1.77 KB | Chi |
#11 | actions_module-2815297-11.patch | 1.86 KB | Chi |
Comments
Comment #2
Chi CreditAttribution: Chi commentedComment #3
Chi CreditAttribution: Chi commentedComment #6
Chi CreditAttribution: Chi commentedComment #7
Chi CreditAttribution: Chi commentedComment #10
Chi CreditAttribution: Chi commentedComment #11
Chi CreditAttribution: Chi commentedComment #13
joachim CreditAttribution: joachim as a volunteer commentedBear in mind that the whole of the actions system says that it's not complete and likely to be rewritten...
What's the reason for these changes in the tests? It seems to me that going straight to the URL is removing the checking that the link is visible.
Comment #14
Chi CreditAttribution: Chi commentedclickLink()
finds the link by its label. Since more actions became configurable the test failed. Though it is possible to specify link index through second parameter it won't help in this case because actions are shown alphabetically and the link position depends on the action label which is random. I've added a prefix to the label to make sure it always appears on the top of the list.Comment #16
andypostComment #17
andypostStill not clear why you need this prefix, random name should be really unique
Comment #18
Chi CreditAttribution: Chi commented@andypost, that's explained in #14.
Comment #19
andypostComment #28
DanielVezaThis totally makes sense! I've kept the patch mostly the same, just made some small test changes.
The main change being that I removed the action label prefixs in favor of checking the link exists with
$this->assertSession()->linkByHrefExists
so we don't need to rely on it being at the top of the list.Comment #29
smustgrave CreditAttribution: smustgrave at Mobomo commentedReviewing #28 seems like a good code cleanup
Wasn't sure how to make sure nothing broke so I ran locally the tests without the fix and got
OK (1 test, 27 assertions)
So I believe this does not break anything.
Comment #31
catchCommitted 5b8bef8 and pushed to 10.1.x. Thanks!
Comment #32
andypostThanks you! Last brick is #2815301: Allow to create any kind of actions through UI