adding test for disabling mail and in-app notifications

This commit is contained in:
Niraj Acharya
2025-01-01 15:31:30 +05:45
parent 6ac2eb2cb9
commit e1d80664f1
5 changed files with 172 additions and 0 deletions

View File

@@ -555,6 +555,22 @@ class NotificationContext implements Context {
$this->assertEmailContains($user, $expectedEmailBodyContent);
}
/**
* @Then user :user should have :count emails
*
* @param string $user
* @param int $count
*
* @return void
*/
public function userShouldHaveEmail(string $user, int $count): void {
$address = $this->featureContext->getEmailAddressForUser($user);
$this->featureContext->pushEmailRecipientAsMailBox($address);
$mailBox = EmailHelper::getMailBoxFromEmail($address);
$mailboxResponse = EmailHelper::getMailboxInformation($mailBox, $this->featureContext->getStepLineRef());
Assert::assertCount($count, $mailboxResponse);
}
/**
* @Then user :user should have received the following email from user :sender ignoring whitespaces
*