Skip to content

Commit

Permalink
[Behat] Adapted tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon authored and lucasOsti committed Dec 14, 2023
1 parent 56d3321 commit f7b5f27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib/Behat/Component/UpperMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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'),
];
}
Expand Down
3 changes: 2 additions & 1 deletion src/lib/Behat/Page/ContentViewPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit f7b5f27

Please sign in to comment.