diff --git a/core/modules/workflows/src/Form/WorkflowTransitionAddForm.php b/core/modules/workflows/src/Form/WorkflowTransitionAddForm.php index 3a582816db8a897c5320085e09b416d4fc63f87a..84522929892a0278ac89bdd53ea5cb49d441a55b 100644 --- a/core/modules/workflows/src/Form/WorkflowTransitionAddForm.php +++ b/core/modules/workflows/src/Form/WorkflowTransitionAddForm.php @@ -89,7 +89,6 @@ public function form(array $form, FormStateInterface $form_state) { '#type' => 'radios', '#title' => $this->t('To'), '#required' => TRUE, - '#default_value' => [], '#options' => $states, ]; diff --git a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php index b924f48b5684c1e22ad717a07f59b6f3722e6656..fcbcbd0448c0f99618ff2ef169720087dbe52ebd 100644 --- a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php +++ b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php @@ -137,6 +137,8 @@ public function testWorkflowCreation() { $this->assertTrue($workflow->getTypePlugin()->getState('draft')->canTransitionTo('published'), 'Can transition from draft to published'); $this->clickLink('Add a new transition'); + $this->assertCount(2, $this->cssSelect('input[name="to"][type="radio"]')); + $this->assertCount(0, $this->cssSelect('input[name="to"][checked="checked"][type="radio"]')); $this->submitForm(['id' => 'create_new_draft', 'label' => 'Create new draft', 'from[draft]' => 'draft', 'to' => 'draft'], 'Save'); $this->assertSession()->pageTextContains('Created Create new draft transition.'); $workflow = $workflow_storage->loadUnchanged('test');