From f0a062e58a365778360a9e65d0bfc7ff2a2f66b5 Mon Sep 17 00:00:00 2001 From: Rajeshreeputra Date: Fri, 13 Oct 2023 12:50:05 +0530 Subject: [PATCH] ACMS-1989: Fix failing tests. --- .../tests/src/Functional/PureHeadlessModeMenuTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/acquia_cms_headless/tests/src/Functional/PureHeadlessModeMenuTest.php b/modules/acquia_cms_headless/tests/src/Functional/PureHeadlessModeMenuTest.php index ccf54eb4e..b9ba3b297 100644 --- a/modules/acquia_cms_headless/tests/src/Functional/PureHeadlessModeMenuTest.php +++ b/modules/acquia_cms_headless/tests/src/Functional/PureHeadlessModeMenuTest.php @@ -56,6 +56,7 @@ protected function setUp(): void { $this->markTestSkipped('This test cannot run in an Acquia Cloud IDE.'); } parent::setUp(); + $this->moduleInstaller = $this->container->get('module_installer'); $this->moduleList = $this->container->get('extension.list.module'); $account = $this->drupalCreateUser(); @@ -92,9 +93,9 @@ public function testChildMenu(string $selector, string $parentMenuName, array $c /** @var \Drupal\FunctionalJavascriptTests\JSWebAssert $assertSession */ $assertSession = $this->assertSession(); // Wait for menu items to visible. - $menuItem = $assertSession->waitForElementVisible('css', '.hover-intent.menu-item'); + $menuItem = $assertSession->waitForElementVisible('css', '.menu-item.hover-intent'); $this->assertInstanceOf(NodeElement::class, $menuItem); - $childrenMenuItems = $page->findAll("css", ".claro-toolbar-menu > .hover-intent.menu-item > ul.toolbar-menu:first-of-type > li"); + $childrenMenuItems = $page->findAll("css", ".toolbar-menu-administration > .toolbar-menu > .menu-item.hover-intent > ul.toolbar-menu > li.menu-item"); $this->assertCount(count($children), $childrenMenuItems); foreach ($childrenMenuItems as $key => $child) { $this->assertEquals($children[$key], $child->find("css", "a:first-child")->getText()); @@ -144,6 +145,7 @@ public function providerMenu(): array { '.toolbar-icon-system-admin-content', 'Content', [ + 'Overview', 'Scheduled Content', 'Add content', 'Files', @@ -156,6 +158,7 @@ public function providerMenu(): array { '.toolbar-icon-admin-access-control', 'API', [ + 'Overview', 'Dashboard', 'OAuth clients', 'OAuth settings', @@ -168,6 +171,7 @@ public function providerMenu(): array { '.toolbar-icon-admin-content-models', 'Data model', [ + 'Overview', 'Block types', 'Content types', 'Media types', @@ -179,6 +183,7 @@ public function providerMenu(): array { '.toolbar-icon-admin-cms', 'System administration', [ + 'Overview', 'Structure', 'Extend', 'Configuration',