Skip to content
Snippets Groups Projects
Commit 4e889822 authored by cilefen's avatar cilefen
Browse files

Issue #2850554 by scott_euser, Sam152, yoroy: Remain on the workflow edit page when saving

parent 21f8a650
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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'));
}
/**
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment