diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php index 89f4822..7e653b5 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php @@ -55,4 +55,27 @@ public function testDeleteWithNoPath() { $this->assertRaw(t('The view %view has been saved.', array('%view' => 'Test view'))); } + /** + * Tests the menu and tab option form. + */ + public function testMenuOptions() { + $this->container->get('module_handler')->enable(array('menu')); + $this->drupalGet('admin/structure/views/view/test_view'); + + // Add a new page display. + $this->drupalPost(NULL, array(), 'Add Page'); + // Save a path. + $this->drupalPost("admin/structure/views/nojs/display/test_view/page_1/path", array('path' => $this->randomString()), t('Apply')); + $this->drupalGet('admin/structure/views/view/test_view'); + + $tab_title = $this->randomString(); + $this->drupalPost('admin/structure/views/nojs/display/test_view/page_1/menu', array('menu[type]' => 'default tab', 'menu[title]' => $tab_title), t('Apply')); + $this->drupalGet('admin/structure/views/view/test_view'); + $this->drupalPost('admin/structure/views/nojs/display/test_view/page_1/tab_options', array('tab_options[type]' => 'tab', 'tab_options[title]' => $this->randomString()), t('Apply')); + + $this->assertLink(t('Tab: @title', array('@title' => $tab_title))); + // If it's a default tab, it should also have an additional settings link. + $this->assertLink(t('Parent menu item')); + } + }