Ejemplo n.º 1
0
 public function _submitEmptyModuleForm(TestGuy $I)
 {
     $I->wantTo('submit empty module form test');
     $I->amOnPage('/sections/create-empty-module/0/');
     // remove root element
     $data['form'] = array('name' => 'notification', 'namespace' => 'urn:ietf:params:xml:ns:netconf:notification:1.0');
     $I->submitForm('form.create-empty-module', $data);
     // check what is in answer
     $I->see('block--state');
     $I->dontSee('500 Internal Server Error');
 }
Ejemplo n.º 2
0
<?php

$I = new TestGuy($scenario);
$I->wantTo('ensure that contact works');
$I->amOnPage('?r=site/contact');
$I->see('Contact', 'h1');
$I->submitForm('#contact-form', []);
$I->see('Contact', 'h1');
$I->see('Name cannot be blank');
$I->see('Email cannot be blank');
$I->see('Subject cannot be blank');
$I->see('Body cannot be blank');
$I->see('The verification code is incorrect');
$I->submitForm('#contact-form', ['ContactForm[name]' => 'tester', 'ContactForm[email]' => 'tester.email', 'ContactForm[subject]' => 'test subject', 'ContactForm[body]' => 'test content', 'ContactForm[verifyCode]' => 'testme']);
$I->dontSee('Name cannot be blank', '.help-inline');
$I->see('Email is not a valid email address.');
$I->dontSee('Subject cannot be blank', '.help-inline');
$I->dontSee('Body cannot be blank', '.help-inline');
$I->dontSee('The verification code is incorrect', '.help-inline');
$I->submitForm('#contact-form', ['ContactForm[name]' => 'tester', 'ContactForm[email]' => '*****@*****.**', 'ContactForm[subject]' => 'test subject', 'ContactForm[body]' => 'test content', 'ContactForm[verifyCode]' => 'testme']);
$I->dontSeeElement('#contact-form');
$I->see('Thank you for contacting us. We will respond to you as soon as possible.');