diff --git a/modules/order/src/Element/ProfileSelect.php b/modules/order/src/Element/ProfileSelect.php index 5d87376..3704ad3 100644 --- a/modules/order/src/Element/ProfileSelect.php +++ b/modules/order/src/Element/ProfileSelect.php @@ -276,7 +276,6 @@ public static function processElement(array $element, FormStateInterface $form_s '#name' => implode('_', $element['#parents']) . '_submit', '#element_mode' => 'view', '#save_profile' => TRUE, - '#access' => !empty($profiles), '#button_type' => 'primary', ]; $element['cancel_button'] = [ diff --git a/modules/order/tests/src/FunctionalJavascript/ProfileSelectTest.php b/modules/order/tests/src/FunctionalJavascript/ProfileSelectTest.php index 56fd173..1cae168 100644 --- a/modules/order/tests/src/FunctionalJavascript/ProfileSelectTest.php +++ b/modules/order/tests/src/FunctionalJavascript/ProfileSelectTest.php @@ -94,10 +94,11 @@ public function testAnonymous() { } $edit['profile[form][address][0][address][' . $key . ']'] = $value; } - $this->submitForm($edit, 'Submit'); + $this->submitForm($edit, 'Save'); /** @var \Drupal\profile\Entity\ProfileInterface $profile */ $profile = $this->profileStorage->load(1); + $this->submitForm($edit, 'Submit'); $this->assertSession()->responseContains(new FormattableMarkup('Profile selected: :label', [':label' => $profile->label()])); /** @var \Drupal\address\Plugin\Field\FieldType\AddressItem $address */