Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Chi created an issue. See original summary.

Chi’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 3: actions_module-2815297-2.patch, failed testing.

The last submitted patch, 3: actions_module-2815297-2.patch, failed testing.

Chi’s picture

Chi’s picture

Status: Needs work » Needs review

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Chi’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joachim’s picture

Status: Needs review » Needs work

Bear in mind that the whole of the actions system says that it's not complete and likely to be rewritten...

+++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
@@ -49,7 +49,7 @@ public function testAssignOwnerNodeActionConfiguration() {
-    $this->clickLink(t('Configure'));
+    $this->drupalGet('admin/config/system/actions/configure/' . $action_id);
     $edit = [];
     $new_action_label = $this->randomMachineName();
     $edit['label'] = $new_action_label;
@@ -64,7 +64,7 @@ public function testAssignOwnerNodeActionConfiguration() {

@@ -64,7 +64,7 @@ public function testAssignOwnerNodeActionConfiguration() {
 
     // Make sure that deletions work properly.
     $this->drupalGet('admin/config/system/actions');
-    $this->clickLink(t('Delete'));
+    $this->drupalGet('admin/config/system/actions/configure/' . $action_id . '/delete');

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.

Chi’s picture

What's the reason for these changes in the tests?

clickLink() 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.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andypost’s picture

andypost’s picture

+++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
@@ -35,7 +35,7 @@ public function testAssignOwnerNodeActionConfiguration() {
-    $action_label = $this->randomMachineName();
+    $action_label = 'a_' . $this->randomMachineName();

@@ -51,7 +51,7 @@ public function testAssignOwnerNodeActionConfiguration() {
-    $new_action_label = $this->randomMachineName();
+    $new_action_label = 'a_' . $this->randomMachineName();

Still not clear why you need this prefix, random name should be really unique

Chi’s picture

@andypost, that's explained in #14.

andypost’s picture

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

DanielVeza’s picture

This 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.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Reviewing #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.

  • catch committed 5b8bef8a on 10.1.x
    Issue #2815297 by Chi, DanielVeza, andypost, smustgrave, joachim:...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed 5b8bef8 and pushed to 10.1.x. Thanks!

andypost’s picture

Status: Fixed » Closed (fixed)

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