Commit 63579a72 authored by catch's avatar catch
Browse files

Issue #1899440 by tim.plunkett: Fixed Views contextual links are gone.

parent 9d276ca5
......@@ -19,6 +19,13 @@ class DisplayTest extends UITestBase {
*/
public static $testViews = array('test_display');
/**
* Modules to enable
*
* @var array
*/
public static $modules = array('contextual');
public static function getInfo() {
return array(
'name' => 'Display tests',
......@@ -209,7 +216,7 @@ public function testDisplayPluginsAlter() {
$expected = array(
'parent path' => 'admin/structure/views/view',
'argument properties' => array('name'),
'argument properties' => array('id'),
);
// Test the expected views_ui array exists on each definition.
......@@ -268,4 +275,15 @@ public function testLinkDisplay() {
$this->assertLink(t('Custom URL'), 0, 'The link option has custom url as summary.');
}
/**
* Tests contextual links on Views page displays.
*/
public function testPageContextualLinks() {
$this->drupalLogin($this->drupalCreateUser(array('administer views', 'access contextual links')));
$view = entity_load('view', 'test_display');
$view->enable();
$this->drupalGet('test-display');
$this->assertLinkByHref("admin/structure/views/view/{$view->id()}/edit/page_1");
}
}
......@@ -495,7 +495,7 @@ function views_ui_views_plugins_display_alter(&$plugins) {
foreach ($plugins as &$display) {
$display['contextual links']['views_ui'] = array(
'parent path' => 'admin/structure/views/view',
'argument properties' => array('name'),
'argument properties' => array('id'),
);
}
}
......
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