// Verify that the disabled display css class does not appears once the
// display is enabled again.
$this->
submitForm([], 'Enable Page'
);
$this->
assertSession()->
elementNotExists('xpath', "//div[contains(@class, 'views-display-disabled')]"
);
} /**
* Tests views_ui_views_plugins_display_alter is altering plugin definitions.
*/
public function testDisplayPluginsAlter() { $definitions = Views::
pluginManager('display'
)->
getDefinitions();
$expected =
[ 'route_name' => 'entity.view.edit_form',
'route_parameters_names' =>
['view' => 'id'
],
];
// Test the expected views_ui array exists on each definition.
foreach ($definitions as $definition) { $this->
assertSame($expected,
$definition['contextual links'
]['entity.view.edit_form'
], 'Expected views_ui array found in plugin definition.'
);
} }