Skip to content
This repository was archived by the owner on Mar 17, 2020. It is now read-only.

Commit ab557db

Browse files
committed
Verify in backend that user is created
1 parent 11ca310 commit ab557db

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

tests/codeception/_support/Page/Acceptance/Administrator/AdminPage.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,13 @@ public function doAdministratorLogout()
298298
* Function to Verify the Tabs on a Joomla! screen
299299
*
300300
* @param array $expectedTabs Expected Tabs on the Page
301+
* @param array $tabsLocator Locator for the Tabs in Edit View
301302
*
302303
* @since __DEPLOY_VERSION__
303304
*
304305
* @return void
305306
*/
306-
public function verifyAvailableTabs($expectedTabs)
307+
public function verifyAvailableTabs($expectedTabs, $tabsLocator = NULL)
307308
{
308309
$I = $this;
309310

tests/codeception/_support/Step/Acceptance/Site/UsersFrontend.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,24 @@ public function iShouldSeeMessage($message)
191191
/**
192192
* Method to declare user is created
193193
*
194-
* @Then user is created
194+
* @param string $username The username to look for.
195+
*
196+
* @Then user :username is created
195197
*
196198
* @since __DEPLOY_VERSION__
197199
*
198200
* @return void
199201
*/
200-
public function userIsCreated()
202+
public function userIsCreated($username)
201203
{
202204
$I = $this;
205+
206+
$I->amOnPage(UserManagerPage::$url);
207+
208+
// Looking for username
209+
$I->adminPage->search($username);
210+
$I->see($username, UserManagerPage::$seeName);
211+
203212
$I->comment('User is created');
204213
}
205214

tests/codeception/acceptance/users_frontend.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Feature: Users Frontend
1414
And I create a user with fields Name "User Two", Username "user2", Password "pass2" and Email "[email protected]"
1515
And I press the "Register" button
1616
Then I should see "Could not instantiate mail function." message
17-
And user is created
17+
And user "User Two" is created
1818

1919
Scenario: check the created user in the backend
2020
Given I am on the User Manager page
@@ -49,4 +49,4 @@ Feature: Users Frontend
4949
Given I am on the User Manager page
5050
When I Needs to user "User Two" logged in at least once
5151
And I login as a super admin from backend
52-
Then I should see last login date for "User Three"
52+
Then I should see last login date for "User Three"

0 commit comments

Comments
 (0)