Commit ab2a9119 authored by alexpott's avatar alexpott

Issue #2199875 by andypost: No link to add view|form mode for entity types...

Issue #2199875 by andypost: No link to add view|form mode for entity types that have no shipped modes.
parent 8608fed6
entity.view_mode_add:
route_name: entity.view_mode_add
title: 'Add new view mode'
weight: 1
appears_on:
- entity.view_mode_list
entity.form_mode_add:
route_name: entity.form_mode_add
title: 'Add new form mode'
weight: 1
appears_on:
- entity.form_mode_list
......@@ -39,6 +39,8 @@ public function testEntityViewModeUI() {
$this->drupalLogin($this->drupalCreateUser(array('administer display modes')));
$this->drupalGet('admin/structure/display-modes/view');
$this->assertResponse(200);
$this->assertText(t('Add new view mode'));
$this->assertLinkByHref('admin/structure/display-modes/view/add');
$this->drupalGet('admin/structure/display-modes/view/add/entity_test_mulrev');
$this->assertResponse(404);
......@@ -75,6 +77,8 @@ public function testEntityFormModeUI() {
$this->drupalLogin($this->drupalCreateUser(array('administer display modes')));
$this->drupalGet('admin/structure/display-modes/form');
$this->assertResponse(200);
$this->assertText(t('Add new form mode'));
$this->assertLinkByHref('admin/structure/display-modes/form/add');
$this->drupalGet('admin/structure/display-modes/form/add/entity_test_no_label');
$this->assertResponse(404);
......
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