diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/HandlerTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/HandlerTest.php index 5fcb017..f7dd381 100644 --- a/core/modules/views/lib/Drupal/views/Tests/UI/HandlerTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/UI/HandlerTest.php @@ -55,11 +55,14 @@ public function testUICRUD() { } $this->assertUrl($edit_handler_url, array(), 'The user got redirected to the handler edit form.'); - $this->drupalPost(NULL, array(), t('Apply')); + $random_label = $this->randomName(); + $this->drupalPost(NULL, array('options[admin_label]' => $random_label), t('Apply')); $this->assertUrl('admin/structure/views/view/test_view/edit', array(), 'The user got redirected to the views edit form.'); $this->assertLinkByHref($edit_handler_url, 0, 'The handler edit link appears in the UI.'); + $links = $this->xpath('//a[starts-with(normalize-space(text()), :label)]', array(':label' => $random_label)); + $this->assertTrue(isset($links[0]), 'The handler edit link has the right label'); $this->drupalPost($edit_handler_url, array(), t('Remove')); $this->assertNoLinkByHref($edit_handler_url, 0, 'The handler edit link does not appears in the UI after removing.');