Commit 7cac6fa8 authored by alexpott's avatar alexpott

Issue #2452691 by prics, valthebald: Missing button type property on "Add language" button

parent 3d017474
......@@ -54,6 +54,7 @@ public function form(array $form, FormStateInterface $form_state) {
),
'#validate' => array('::validatePredefined'),
'#submit' => array('::submitForm', '::save'),
'#button_type' => 'primary',
);
$custom_language_states_conditions = array(
......
......@@ -41,11 +41,15 @@ function testLanguageConfiguration() {
$this->drupalGet('admin/config/regional/language/detection/url');
$this->assertFieldByXPath('//input[@name="prefix[en]"]', '', 'Default English has no path prefix.');
// Check that Add language is a primary button.
$this->drupalGet('admin/config/regional/language/add');
$this->assertFieldByXPath('//input[contains(@class, "button--primary")]', 'Add language', 'Add language is a primary button');
// Add predefined language.
$edit = array(
'predefined_langcode' => 'fr',
);
$this->drupalPostForm('admin/config/regional/language/add', $edit, 'Add language');
$this->drupalPostForm(NULL, $edit, 'Add language');
$this->assertText('French');
$this->assertUrl(\Drupal::url('entity.configurable_language.collection', [], ['absolute' => TRUE]), [], 'Correct page redirection.');
// Langcode for Languages is always 'en'.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment