Commit 2575651a authored by webchick's avatar webchick
Browse files

Issue #1893336 by dawehner: Fixed Views Machine name field does not work.

parent f26efbe1
......@@ -139,4 +139,15 @@ function testViewsWizardAndListing() {
$this->assertNoText('tracker', t('Default tracker view does not show on the listing page.'));
}
/**
* Tests the actual wizard form.
*
* @see \Drupal\views_ui\ViewAddFormController::form()
*/
protected function testWizardForm() {
$this->drupalGet('admin/structure/views/add');
$result = $this->xpath('//small[@id = "edit-human-name-machine-name-suffix"]');
$this->assertTrue(count($result), 'Ensure that the machine name is applied to the name field.');
}
}
......@@ -49,7 +49,7 @@ public function form(array $form, array &$form_state, EntityInterface $view) {
'#maxlength' => 128,
'#machine_name' => array(
'exists' => 'views_get_view',
'source' => array('id', 'human_name'),
'source' => array('name', 'human_name'),
),
'#description' => t('A unique machine-readable name for this View. It must only contain lowercase letters, numbers, and underscores.'),
);
......
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