-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IBX-1854: Updated Change Password scenario for 4.0 #357
Conversation
} | ||
|
||
/** | ||
* @Given I switch to :tabName tab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here imo step should be more precise, maybe something like: I switch to :tabName tab in User Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User Settings
is better than the User Preferences
I came up with 😄 👍
$this->getHTMLPage()->find($this->getLocator('title'))->assert()->textEquals('User Settings'); | ||
} | ||
|
||
public function switchTab(string $tabName): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As in UserPreferencesContext, maybe function here can be more precise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO it's fine as it is currently: the usage is $this->userSettingsPage->switchTab(...)
, which provides enough context about the action that's happening
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just two small things to consider.
} | ||
|
||
/** | ||
* @Given I switch to :tabName tab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @Given I switch to :tabName tab | |
* @Given I switch to :tabName tab in User Preferences |
I'd add this so that we don't have to worry about clashing step definitions in the future (there can be only one Step with this definition).
We already have similar Steps:
I switch to :tab field group
I switch to :tab tab in Content structure
|
||
public function switchTab(string $tabName): void | ||
{ | ||
$this->getHTMLPage()->find($this->getLocator($tabName))->click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use https://github.com/ibexa/admin-ui/blob/main/src/lib/Behat/Component/TableNavigationTab.php here, example:
admin-ui/src/lib/Behat/Page/SystemInfoPage.php
Lines 41 to 44 in 6715a65
public function goToTab(string $tabName) | |
{ | |
$this->tableNavigationTab->goToTab($tabName); | |
} |
Change password scenario was originally introduced in https://issues.ibexa.co/browse/IBX-405. Here https://issues.ibexa.co/browse/IBX-1776 the entry was removed from the menu. It was quick-fixed for v4 in 4f9810e.
This PR changes the scenario to use the User Settings page.
Next step is to cover the rest of the User Settings page. I would prefer to treat it with a separate ticket.
Checklist:
$ composer fix-cs
)