75a273eb40
* directory _support should exists before build with ignore inside * added test for contact page availability * added test for empty contact form submit * added test for submit contact form * remove test contact page * delete old contact page test * test index-test instead index * change stage description
34 lines
965 B
PHP
34 lines
965 B
PHP
<?php
|
|
|
|
/**
|
|
* Class ContactCest
|
|
*/
|
|
class ContactCest
|
|
{
|
|
public function _before(\AcceptanceTester $I)
|
|
{
|
|
$I->amOnPage('index-test.php?r=site%2Fcontact');
|
|
}
|
|
|
|
public function contactPageWorks(AcceptanceTester $I)
|
|
{
|
|
$I->wantTo('ensure that contact page works');
|
|
$I->see('Contact', 'h1');
|
|
}
|
|
|
|
public function contactFormCanBeSubmitted(AcceptanceTester $I)
|
|
{
|
|
$I->amGoingTo('submit contact form with correct data');
|
|
$I->fillField('#contactform-name', 'tester');
|
|
$I->fillField('#contactform-email', 'tester@example.com');
|
|
$I->fillField('#contactform-subject', 'test subject');
|
|
$I->fillField('#contactform-body', 'test content');
|
|
$I->fillField('#contactform-verifycode', 'testme');
|
|
|
|
$I->click('contact-button');
|
|
|
|
$I->dontSeeElement('#contact-form');
|
|
$I->see('Thank you for contacting us. We will respond to you as soon as possible.');
|
|
}
|
|
}
|