I've finished Lesson 11 and everything appears to be working as it should be. My only problem is that codecept is throwing errors. It doesn't seem to be able to find my "Sign Up" button on the form (all of which I'm certain is there and works for me physically.). I'm sure it is probably a fairly simple problem but I have spent a while trying to figure it out to no avail.
The following is my out put from doing a functional test. Result is same with t and tf.
vagrant@homestead:~/code/larabook$ tf
Codeception PHP Testing Framework v2.0.5
Powered by PHPUnit 4.3.0 by Sebastian Bergmann.
Functional Tests (1) ---------------------------------------------------------------------------------------------
Trying to sign up for a Larabook account (SignUpCept) Error
Time: 1.46 seconds, Memory: 18.75Mb
There was 1 error:
1) Failed to sign up for a larabook account in SignUpCept (/home/vagrant/code/larabook/tests/functional/SignUpCept.php)
Couldn't click "Sign Up":
Laracasts\Validation\FormValidationException: Validation failed
Scenario Steps:
9. I click "Sign Up"
8. I fill field "Password Confirmation:","demo"
7. I fill field "Password:","demo"
6. I fill field "Email:","john@example.com"
5. I fill field "Username:","JohnDoe"
4. I see current url equals "/register"
3. I click "Sign Up!"
FAILURES!
Tests: 1, Assertions: 1, Errors: 1.
SignUpCert.php
<?php
$I = new FunctionalTester($scenario);
$I->am('a guest');
$I->wantTo('sign up for a Larabook account');
$I->amOnPage('/');
$I->click('Sign Up!');
$I->seeCurrentUrlEquals('/register');
$I->fillField('Username:', 'JohnDoe');
$I->fillField('Email:', 'john@example.com');
$I->fillField('Password:', 'demo');
$I->fillField('Password Confirmation:', 'demo');
$I->click('Sign Up');
// $I->click(['class' => 'btn btn-primary']);
I did try to change the "Sign Up" line in above file to see if this made any difference. It didn't still gave errors of not being able to find it.
The relevant section of create.blade.php
<div class="form-group">
{{ Form::submit('Sign Up', ['class' => 'btn btn-primary']) }}
</div>
{{ Form::close() }}
alternate create.blade.php
<div class="form-group">
<input type="submit" value="Sign Up" id="submit">
</div>
Both same result <input type="submit" value="Sign Up" id="submit" /> same result.
Any ideas?