diff --git a/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php b/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php index f762e339e2473ef080971ded83339bb023e1e19a..4652abd6515083fb9c13582b99f015ee282580ab 100644 --- a/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php +++ b/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php @@ -21,7 +21,7 @@ class BookBreadcrumbTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'stark'; /** * A book node. @@ -156,7 +156,7 @@ public function testBreadcrumbTitleUpdates() { $this->drupalGet($nodes[4]->toUrl()); // Fetch each node title in the current breadcrumb. - $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); + $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getText(); @@ -171,7 +171,7 @@ public function testBreadcrumbTitleUpdates() { $this->submitForm($edit, 'Save'); $this->drupalGet($nodes[4]->toUrl()); // Fetch each node title in the current breadcrumb. - $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); + $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getText(); @@ -193,7 +193,7 @@ public function testBreadcrumbAccessUpdates() { $this->drupalGet($nodes[3]->toUrl('edit-form')); $this->submitForm($edit, 'Save'); $this->drupalGet($nodes[4]->toUrl()); - $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); + $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getText(); @@ -203,7 +203,7 @@ public function testBreadcrumbAccessUpdates() { $config = $this->container->get('config.factory')->getEditable('book_breadcrumb_test.settings'); $config->set('hide', TRUE)->save(); $this->drupalGet($nodes[4]->toUrl()); - $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); + $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getText(); diff --git a/core/modules/book/tests/src/Functional/BookContentModerationTest.php b/core/modules/book/tests/src/Functional/BookContentModerationTest.php index 2c491b8618878ace97a9a6758f55e597210b1b7a..14898777d91ea52aa2630f6775a2251dc08b1530 100644 --- a/core/modules/book/tests/src/Functional/BookContentModerationTest.php +++ b/core/modules/book/tests/src/Functional/BookContentModerationTest.php @@ -30,7 +30,7 @@ class BookContentModerationTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'stark'; /** * {@inheritdoc} diff --git a/core/modules/book/tests/src/Functional/BookTest.php b/core/modules/book/tests/src/Functional/BookTest.php index a7f7063ce8928afd5d1d9b4cf26238d22adda022..bd7ddfee5975237d4f50fc84eb5bcd43a4ecc17d 100644 --- a/core/modules/book/tests/src/Functional/BookTest.php +++ b/core/modules/book/tests/src/Functional/BookTest.php @@ -31,7 +31,7 @@ class BookTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'stark'; /** * A user with permission to view a book and access printer-friendly version. diff --git a/core/modules/book/tests/src/Functional/BookTestTrait.php b/core/modules/book/tests/src/Functional/BookTestTrait.php index 2bec801f34676aabb98a0e8ee8ad0f47e26603ab..402ea5949ca2acd0d2afdc024d2800e6462a5601 100644 --- a/core/modules/book/tests/src/Functional/BookTestTrait.php +++ b/core/modules/book/tests/src/Functional/BookTestTrait.php @@ -92,7 +92,6 @@ public function checkBookNode(EntityInterface $node, $nodes, $previous, $up, $ne // since it uniquely identifies each call to checkBookNode(). static $number = 0; $this->drupalGet('node/' . $node->id()); - // Check outline structure. if ($nodes !== NULL) { $this->assertSession()->responseMatches($this->generateOutlinePattern($nodes)); @@ -130,7 +129,7 @@ public function checkBookNode(EntityInterface $node, $nodes, $previous, $up, $ne } // Fetch links in the current breadcrumb. - $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); + $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getAttribute('href'); @@ -161,8 +160,7 @@ public function generateOutlinePattern($nodes) { foreach ($nodes as $node) { $outline .= '(node\/' . $node->id() . ')(.*?)(' . $node->label() . ')(.*?)'; } - - return '/<nav id="book-navigation-' . $this->book->id() . '"(.*?)<ul(.*?)' . $outline . '<\/ul>/s'; + return '/<nav role="navigation" aria-labelledby="book-label-' . $this->book->id() . '"(.*?)<ul(.*?)' . $outline . '<\/ul>/s'; } /**