2018-11-04 00:34:23 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class AddressCest
|
|
|
|
{
|
|
|
|
public function listsExistingRecords(AcceptanceTester $I)
|
|
|
|
{
|
|
|
|
$I->amOnPage('/plugin');
|
|
|
|
$I->see('Codappix GmbH');
|
|
|
|
}
|
|
|
|
|
2019-08-27 08:58:34 +02:00
|
|
|
/**
|
|
|
|
* @depends listsExistingRecords
|
|
|
|
*/
|
2018-11-04 00:34:23 +01:00
|
|
|
public function canEditRecord(AcceptanceTester $I)
|
|
|
|
{
|
|
|
|
$I->amOnPage('/plugin');
|
|
|
|
$I->see('Edit');
|
|
|
|
$I->click('Edit');
|
|
|
|
|
|
|
|
$I->see('Editing: Codappix GmbH');
|
|
|
|
$I->fillField(['id' => 'companyName'], 'TYPO3 Camp Rhein Ruhr');
|
|
|
|
$I->click('Update');
|
|
|
|
|
|
|
|
$I->amOnPage('/plugin');
|
|
|
|
$I->see('TYPO3 Camp Rhein Ruhr');
|
|
|
|
}
|
|
|
|
|
2019-08-27 08:58:34 +02:00
|
|
|
/**
|
|
|
|
* @depends canEditRecord
|
|
|
|
*/
|
|
|
|
public function sendsMailOnUpdate(AcceptanceTester $I)
|
|
|
|
{
|
|
|
|
$I->amOnPage('/plugin');
|
|
|
|
$I->see('Edit');
|
|
|
|
$I->click('Edit');
|
|
|
|
|
|
|
|
$I->see('Editing: Codappix GmbH');
|
|
|
|
$I->fillField(['id' => 'companyName'], 'TYPO3 Camp Rhein Ruhr');
|
|
|
|
$I->click('Update');
|
|
|
|
|
|
|
|
$I->fetchEmails();
|
|
|
|
$I->haveUnreadEmails();
|
|
|
|
$I->openNextUnreadEmail();
|
|
|
|
$I->dontHaveUnreadEmails();
|
|
|
|
|
|
|
|
$I->seeInOpenedEmailSubject('Address TYPO3 Camp Rhein Ruhr was updated');
|
|
|
|
$I->seeInOpenedEmailBody('The address TYPO3 Camp Rhein Ruhr was successfully updated.');
|
|
|
|
$I->seeInOpenedEmailRecipients('coding@daniel-siepmann.de');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @depends listsExistingRecords
|
|
|
|
*/
|
2018-11-04 00:34:23 +01:00
|
|
|
public function zipValidatesAgainst5Digits(AcceptanceTester $I)
|
|
|
|
{
|
|
|
|
$I->amOnPage('/plugin');
|
|
|
|
$I->see('Edit');
|
|
|
|
$I->click('Edit');
|
|
|
|
|
2019-08-21 18:13:00 +02:00
|
|
|
$I->see('Editing: Codappix GmbH');
|
2018-11-04 00:34:23 +01:00
|
|
|
$I->fillField(['id' => 'zip'], '123');
|
|
|
|
$I->click('Update');
|
|
|
|
|
|
|
|
$I->see('Please provide a valid ZIP consisting of 5 digits.');
|
|
|
|
}
|
|
|
|
}
|