diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php index c39db77..23769d8 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php @@ -88,6 +88,7 @@ public function testFilterViewsListing() { // Disable a View and see if it moves to the disabled listing. $enabled_view = $page->find('css', 'tr.views-ui-list-enabled'); + $enabled_view_id = $enabled_view->getAttribute('data-drupal-view-id'); // Open the dropdown with additional actions. $enabled_view->find('css', 'li.dropbutton-toggle button')->click(); $disable_button = $enabled_view->find('css', 'li.disable.dropbutton-action a'); @@ -105,6 +106,11 @@ public function testFilterViewsListing() { // Test that one enabled View has been moved to the disabled list. $this->assertCount(5, $enabled_rows); $this->assertCount(3, $disabled_rows); + + // Test that the keyboard focus is on the dropdown button of the View we + // just disabled. + $this->assertTrue($this->getSession()->evaluateScript("jQuery(document.activeElement).parent().is('li.disable.dropbutton-action')")); + $this->assertTrue($this->getSession()->evaluateScript("jQuery(document.activeElement).parents('tr.views-ui-list-disabled').data('drupal-view-id') == '$enabled_view_id'")); } /**