Commit 5b8bef8a authored by catch's avatar catch
Browse files

Issue #2815297 by Chi, DanielVeza, andypost, smustgrave, joachim: Actions...

Issue #2815297 by Chi, DanielVeza, andypost, smustgrave, joachim: Actions module should allow to edit and remove non-configurable actions
parent 475a3c73
Loading
Loading
Loading
Loading
+1 −1
Changes for core/modules/action/src/ActionListBuilder.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ public function buildHeader() {
   * {@inheritdoc}
   */
  public function getDefaultOperations(EntityInterface $entity) {
    $operations = $entity->isConfigurable() ? parent::getDefaultOperations($entity) : [];
    $operations = parent::getDefaultOperations($entity);
    if (isset($operations['edit'])) {
      $operations['edit']['title'] = t('Configure');
    }
+6 −2
Changes for core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php: 6 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ public function testAssignOwnerNodeActionConfiguration() {
    $this->assertSession()->statusCodeEquals(200);

    $action_id = $edit['id'];
    $action_configure = sprintf('/admin/config/system/actions/configure/%s', $action_id);
    $action_delete = sprintf('/admin/config/system/actions/configure/%s/delete', $action_id);

    // Make sure that the new action was saved properly.
    $this->assertSession()->pageTextContains('The action has been successfully saved.');
@@ -60,7 +62,8 @@ public function testAssignOwnerNodeActionConfiguration() {
    $this->assertSession()->pageTextContains($action_label);

    // Make another POST request to the action edit page.
    $this->clickLink('Configure');
    $this->assertSession()->linkByHrefExists($action_configure);
    $this->drupalGet($action_configure);
    $edit = [];
    $new_action_label = $this->randomMachineName();
    $edit['label'] = $new_action_label;
@@ -79,7 +82,8 @@ public function testAssignOwnerNodeActionConfiguration() {

    // Make sure that deletions work properly.
    $this->drupalGet('admin/config/system/actions');
    $this->clickLink('Delete');
    $this->assertSession()->linkByHrefExists($action_delete);
    $this->drupalGet($action_delete);
    $this->assertSession()->statusCodeEquals(200);
    $edit = [];
    $this->submitForm($edit, 'Delete');