// Save a path.
$this->
drupalGet('admin/structure/views/nojs/display/test_view/page_1/path'
);
$this->
submitForm(['path' =>
$random_string], 'Apply'
);
$this->
drupalGet('admin/structure/views/view/test_view'
);
$this->
drupalGet('admin/structure/views/nojs/display/test_view/page_1/menu'
);
$this->
submitForm([ 'menu[type]' => 'default tab',
'menu[title]' => 'Test tab title',
], 'Apply'
);
$this->
assertSession()->
statusCodeEquals(200
);
$this->
assertSession()->
addressEquals('admin/structure/views/nojs/display/test_view/page_1/tab_options'
);
$this->
submitForm(['tab_options[type]' => 'tab', 'tab_options[title]' =>
$this->
randomString()], 'Apply'
);
$this->
assertSession()->
statusCodeEquals(200
);
$this->
assertSession()->
addressEquals('admin/structure/views/view/test_view/edit/page_1'
);
$this->
drupalGet('admin/structure/views/view/test_view'
);
$this->
assertSession()->
linkExists('Tab: Test tab title'
);
// If it's a default tab, it should also have an additional settings link.
$this->
assertSession()->
linkByHrefExists('admin/structure/views/nojs/display/test_view/page_1/tab_options'
);