Commit 228fdcbc authored by alexpott's avatar alexpott

Issue #2193609 by andypost: No page title on manage display & form for non-default view mode.

parent f6161fad
......@@ -101,6 +101,7 @@ protected function alterRoutes(RouteCollection $collection, $provider) {
"$path/form-display/{form_mode_name}",
array(
'_form' => '\Drupal\field_ui\FormDisplayOverview',
'_title' => 'Manage form display',
) + $defaults,
array('_field_ui_form_mode_access' => 'administer ' . $entity_type_id . ' form display')
);
......@@ -120,7 +121,7 @@ protected function alterRoutes(RouteCollection $collection, $provider) {
"$path/display/{view_mode_name}",
array(
'_form' => '\Drupal\field_ui\DisplayOverview',
'view_mode_name' => NULL,
'_title' => 'Manage display',
) + $defaults,
array('_field_ui_view_mode_access' => 'administer ' . $entity_type_id . ' display')
);
......
......@@ -17,7 +17,7 @@ class FieldUIRouteTest extends WebTestBase {
/**
* Modules to enable.
*/
public static $modules = array('field_ui_test', 'node');
public static $modules = array('field_ui_test');
/**
* {@inheritdoc}
......@@ -36,8 +36,6 @@ public static function getInfo() {
public function setUp() {
parent::setUp();
$this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
$this->drupalLogin($this->root_user);
}
......@@ -50,17 +48,36 @@ public function testFieldUIRoutes() {
// @see \Drupal\field_ui\FieldOverview::getRegions()
//$this->assertText('No fields are present yet.');
$this->drupalGet('admin/structure/types/manage/article/fields');
$this->drupalGet('admin/config/people/accounts/fields');
$this->assertTitle('Manage fields | Drupal');
$this->assertLocalTasks();
$this->drupalGet('admin/structure/types/manage/article');
// Test manage display tabs and titles.
$this->drupalGet('admin/config/people/accounts/display/compact');
$this->assertResponse(403);
$this->drupalGet('admin/config/people/accounts/display');
$this->assertTitle('Manage display | Drupal');
$this->assertLocalTasks();
$this->drupalGet('admin/structure/types/manage/article/form-display');
$edit = array('display_modes_custom[compact]' => TRUE);
$this->drupalPostForm(NULL, $edit, t('Save'));
$this->drupalGet('admin/config/people/accounts/display/compact');
$this->assertTitle('Manage display | Drupal');
$this->assertLocalTasks();
// Test manage form display tabs and titles.
$this->drupalGet('admin/config/people/accounts/form-display/register');
$this->assertResponse(403);
$this->drupalGet('admin/config/people/accounts/form-display');
$this->assertTitle('Manage form display | Drupal');
$this->assertLocalTasks();
$this->drupalGet('admin/structure/types/manage/article/display');
$edit = array('display_modes_custom[register]' => TRUE);
$this->drupalPostForm(NULL, $edit, t('Save'));
$this->drupalGet('admin/config/people/accounts/form-display/register');
$this->assertTitle('Manage form display | Drupal');
$this->assertLocalTasks();
}
......@@ -68,7 +85,7 @@ public function testFieldUIRoutes() {
* Asserts that local tasks exists.
*/
public function assertLocalTasks() {
$this->assertLink('Edit');
$this->assertLink('Settings');
$this->assertLink('Manage fields');
$this->assertLink('Manage display');
$this->assertLink('Manage form display');
......
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