Skip to content

Instantly share code, notes, and snippets.

@yupe
Created September 9, 2013 19:07
Show Gist options
  • Save yupe/6500048 to your computer and use it in GitHub Desktop.
Save yupe/6500048 to your computer and use it in GitHub Desktop.
<?php
$I = new WebGuy($scenario);
$I->wantTo('Test "contact" page of amyLabs site!');
$I->amOnPage('/contact');
// check title
$I->see('Наши контакты','h2');
// check contact information
foreach ($contacts as $contact){
$I->see($contact,'p');
}
// chect title
$I->see('Есть причины написать нам!','h3');
// check button
$I->see('Отправить сообщение','button');
// fill feedback form
$I->fillField('#FeedBackForm_theme','Тема');
$I->fillField('#FeedBackForm_name','Клиент');
$I->fillField('#FeedBackForm_email','client@client.ru');
$I->fillField('#FeedBackForm_text','Сообщение');
$I->click('Отправить сообщение');
// check form submittion is success
$I->see('Ваше сообщение отправлено! Спасибо!','.alert-success');
// check mail to
$I->seeLink('hello@amylabs.ru','mailto:hello@amylabs.ru');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment