From 5b2195cea777f34ed6b8f4af3aa3a1f92f316f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Thu, 14 Dec 2023 11:12:52 +0100 Subject: [PATCH] [Behat] Adapted tests --- src/lib/Behat/Component/UpperMenu.php | 4 ++-- src/lib/Behat/Page/ContentViewPage.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/Behat/Component/UpperMenu.php b/src/lib/Behat/Component/UpperMenu.php index b49a4d988c..ac12b64c33 100644 --- a/src/lib/Behat/Component/UpperMenu.php +++ b/src/lib/Behat/Component/UpperMenu.php @@ -51,7 +51,7 @@ public function setFocusMode(bool $expectedModeStatus): void $isEnabled = $this->getHTMLPage()->setTimeout(3)->findAll($this->getLocator('userFocusEnabled'))->any(); if ($expectedModeStatus != $isEnabled) { - $this->getHTMLPage()->find($this->getLocator('focusMode'))->click(); + $this->getHTMLPage()->find($this->getLocator('userFocusMode'))->click(); return; } @@ -75,7 +75,7 @@ protected function specifyLocators(): array new VisibleCSSLocator('userSettingsPopup', '.ibexa-header-user-menu .ibexa-header-user-menu__popup-menu'), new VisibleCSSLocator('searchInput', '.ibexa-main-header #search_query'), new VisibleCSSLocator('searchButton', '.ibexa-main-header .ibexa-input-text-wrapper__action-btn--search'), - new VisibleCSSLocator('userFocusEnabled', '#focus_mode_change_enabled'), + new VisibleCSSLocator('userFocusEnabled', '[name="focus_mode_change"] .ibexa-toggle__label--on'), new VisibleCSSLocator('userFocusMode', '[name="focus_mode_change"] .ibexa-toggle__switcher'), ]; } diff --git a/src/lib/Behat/Page/ContentViewPage.php b/src/lib/Behat/Page/ContentViewPage.php index 8a901b827c..201b06e197 100644 --- a/src/lib/Behat/Page/ContentViewPage.php +++ b/src/lib/Behat/Page/ContentViewPage.php @@ -186,7 +186,8 @@ public function setFocusMode(bool $expectedModeStatus): void { $this->upperMenu->setFocusMode($expectedModeStatus); - $focusModeExcludedTab = 'Versions'; + // TODO: Rework this after Focus mode label is visible next to Ibexa's logo + $focusModeExcludedTab = 'Technical Details'; if ($expectedModeStatus) { $this->getHTMLPage()