From 0ca72d329f4c0c71c0a0d30db55887ad96bc321e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Thu, 4 Jan 2024 11:43:27 +0100 Subject: [PATCH] [Behat] Adapted tests after redirect change (#1091) * [Behat] Adapted tests after redirect change * Adapted Page to view mode as well --- features/personas/ChangePassword.feature | 2 +- src/lib/Behat/Page/UserSettingsPage.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/features/personas/ChangePassword.feature b/features/personas/ChangePassword.feature index fedf191337..5d55b957d5 100644 --- a/features/personas/ChangePassword.feature +++ b/features/personas/ChangePassword.feature @@ -10,7 +10,7 @@ Feature: Verify that an User allowed to change password can change his password And I change password from "Passw0rd-42" to "Passw0rd-43" And I perform the "Update" action Then success notification that "Your password has been successfully changed." appears - And I should be on Dashboard page + And I should be on "User settings" page Scenario: I can log in with new password Given I open Login page in admin SiteAccess diff --git a/src/lib/Behat/Page/UserSettingsPage.php b/src/lib/Behat/Page/UserSettingsPage.php index e88c4c43b4..194819c382 100644 --- a/src/lib/Behat/Page/UserSettingsPage.php +++ b/src/lib/Behat/Page/UserSettingsPage.php @@ -34,7 +34,6 @@ public function __construct(Session $session, Router $router, ContentActionsMenu public function verifyIsLoaded(): void { - $this->contentActionsMenu->verifyIsLoaded(); $this->getHTMLPage()->find($this->getLocator('title'))->assert()->textEquals('User settings'); } @@ -55,7 +54,7 @@ protected function specifyLocators(): array { return [ new VisibleCSSLocator('button', '.ibexa-btn'), - new VisibleCSSLocator('title', '.ibexa-edit-header__title'), + new VisibleCSSLocator('title', '.ibexa-edit-header__title,.ibexa-page-title__content'), new VisibleCSSLocator('autosaveDraftValueDropdown', '#user_setting_update_autosave div.ibexa-dropdown__wrapper > ul'), new VisibleCSSLocator('autosaveIntervalEdit', '#user_setting_update_autosave_interval_value'), ];