diff -u b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php --- b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php @@ -92,9 +92,9 @@ // Disable a View and see if it moves to the disabled listing. $enabled_view = $page->find('css', 'tr.views-ui-list-enabled'); + $view_description = $enabled_view->find('css', '.views-ui-view-name h3')->getText(); // Open the dropdown with additional actions. $enabled_view->find('css', 'li.dropbutton-toggle button')->click(); - $enabled_view_id = $enabled_view->getAttribute('data-drupal-view-id'); $disable_button = $enabled_view->find('css', 'li.disable.dropbutton-action a'); // Check that the disable button is visible now. $this->assertTrue($disable_button->isVisible()); @@ -114,7 +114,7 @@ // 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.enable.dropbutton-action')")); - $this->assertTrue($this->getSession()->evaluateScript("jQuery(document.activeElement).data('data-drupal-selector') == 'views-listing-$enabled_view_id'")); + $this->assertEquals($view_description, $this->getSession()->evaluateScript("jQuery(document.activeElement).parents('tr').find('h3').text()")); } /**