Added tests for password deletion and OTP settings in AddressBookTest and SettingsTest

This commit is contained in:
netkas 2025-03-27 12:52:16 -04:00
parent 3c151bfd99
commit df519ad89b
Signed by: netkas
GPG key ID: 4D8629441B76E4CC
2 changed files with 47 additions and 4 deletions

View file

@ -688,12 +688,14 @@
public function testCaseInsensitiveContactAddress(): void
{
$johnClient = Helper::generateRandomClient(TEAPOT_DOMAIN, prefix: 'johnCaseTest');
$johnClient->settingsAddInformationField(InformationFieldName::DISPLAY_NAME, 'John Doe');
$johnClient->settingsSetPassword('SecretTestingPassword123');
$this->assertTrue($johnClient->settingsAddInformationField(InformationFieldName::DISPLAY_NAME, 'John Doe'));
$this->assertTrue($johnClient->settingsSetPassword('SecretTestingPassword123'));
$this->assertTrue($johnClient->getSessionState()->isAuthenticated());
$aliceClient = Helper::generateRandomClient(COFFEE_DOMAIN, prefix: 'aliceCaseTest');
$aliceClient->settingsAddInformationField(InformationFieldName::DISPLAY_NAME, 'Alice Smith');
$aliceClient->settingsSetPassword('SecretTestingPassword123');
$this->assertTrue($aliceClient->settingsAddInformationField(InformationFieldName::DISPLAY_NAME, 'Alice Smith'));
$this->assertTrue($aliceClient->settingsSetPassword('SecretTestingPassword123'));
$this->assertTrue($aliceClient->getSessionState()->isAuthenticated());
$aliceAddress = $aliceClient->getIdentifiedAs();
$mixedCaseAddress = ucfirst(strtolower($aliceAddress->getUsername())).'@'.strtoupper($aliceAddress->getDomain());