diff --git a/core/modules/workflows/src/Form/WorkflowEditForm.php b/core/modules/workflows/src/Form/WorkflowEditForm.php index 6b01920ada967828f4d5cb133dc41b8f91a83eeb..c0ea5a4d39e4eae8761643f3d28982b2ed8269a5 100644 --- a/core/modules/workflows/src/Form/WorkflowEditForm.php +++ b/core/modules/workflows/src/Form/WorkflowEditForm.php @@ -191,7 +191,6 @@ public function save(array $form, FormStateInterface $form_state) { $workflow = $this->entity; $workflow->save(); drupal_set_message($this->t('Saved the %label Workflow.', ['%label' => $workflow->label()])); - $form_state->setRedirectUrl($workflow->toUrl('collection')); } /** diff --git a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php index 91c69b73f7fe0b502a2a4d92b225eae2c7343ad9..3014dd739750be5181ba6657e3bf86253798fe9f 100644 --- a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php +++ b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php @@ -176,9 +176,8 @@ public function testWorkflowCreation() { $workflow = $workflow_storage->loadUnchanged('test'); $this->assertEquals('draft', $workflow->getInitialState()->id()); - // This will take us to the list of workflows, so we need to edit the - // workflow again. - $this->clickLink('Edit'); + // Verify that we are still on the workflow edit page. + $this->assertSession()->addressEquals('admin/config/workflow/workflows/manage/test'); // Ensure that weight changes the transition ordering. $this->assertEquals(['publish', 'create_new_draft'], array_keys($workflow->getTransitions())); @@ -187,9 +186,8 @@ public function testWorkflowCreation() { $workflow = $workflow_storage->loadUnchanged('test'); $this->assertEquals(['create_new_draft', 'publish'], array_keys($workflow->getTransitions())); - // This will take us to the list of workflows, so we need to edit the - // workflow again. - $this->clickLink('Edit'); + // Verify that we are still on the workflow edit page. + $this->assertSession()->addressEquals('admin/config/workflow/workflows/manage/test'); // Ensure that a delete link for the published state exists before deleting // the draft state.