-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'b-7.3.x-fix-duplicate-email-error-OXDEV-8351' into b-8.…
…0.x-fix-duplicate-email-error-OXDEV-8351 # Conflicts: # CHANGELOG-7.3.md # composer.json
- Loading branch information
Showing
14 changed files
with
161 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
use OxidEsales\Codeception\Admin\DataObject\AdminUser; | ||
use OxidEsales\Codeception\Admin\DataObject\AdminUserAddresses; | ||
use OxidEsales\Codeception\Admin\DataObject\AdminUserExtendedInfo; | ||
use OxidEsales\Codeception\Module\Translation\Translator; | ||
use OxidEsales\EshopCommunity\Tests\Codeception\Support\AcceptanceTester; | ||
|
||
#[Group('admin')] | ||
|
@@ -197,6 +198,39 @@ public function updatePassword(AcceptanceTester $I): void | |
->login($userData['userLoginName'], $newPass); | ||
} | ||
|
||
public function testChangeUserEmail(AcceptanceTester $I): void | ||
{ | ||
$I->wantToTest('changing user email addresses with validation in admin'); | ||
|
||
$userData = Fixtures::get('existingUser'); | ||
$guestUserData = Fixtures::get('existingGuestUser'); | ||
$adminUserData = Fixtures::get('adminUser'); | ||
$newEmail = '[email protected]'; | ||
|
||
$I->amGoingTo('login as admin and find the test user'); | ||
$adminUsersPage = $I->loginAdmin() | ||
->openUsers() | ||
->findByUserName($userData['userLoginName']); | ||
|
||
$I->amGoingTo('try to change email to an existing guest user email'); | ||
$adminUsersPage->updateUsername($guestUserData['userLoginName']); | ||
$I->expect('to see an error message about existing user'); | ||
$I->see(Translator::translate('EXCEPTION_USER_USEREXISTS')); | ||
|
||
$I->amGoingTo('try to change email to an existing admin email'); | ||
$adminUsersPage->updateUsername($adminUserData['userLoginName']); | ||
$I->expect('to see an error message about existing user'); | ||
$I->see(Translator::translate('EXCEPTION_USER_USEREXISTS')); | ||
|
||
$I->amGoingTo('change user email to a new valid email address'); | ||
$adminUsersPage->updateUsername($newEmail); | ||
$I->expect('not to see any error message'); | ||
$I->dontSee(Translator::translate('EXCEPTION_USER_USEREXISTS')); | ||
|
||
$I->amGoingTo('change the email back to the original one'); | ||
$adminUsersPage->updateUsername($userData['userLoginName']); | ||
} | ||
|
||
private function createAdminTestUser( | ||
AcceptanceTester $I, | ||
AdminUser $user, | ||
|
Oops, something went wrong.