/** * @test */ public function createGroup() { $groupName = 'Group ' . time(); $this->visit('/group/create')->see('New Group')->press('Save')->see('The name field is required')->see('Only the Head Coach may create this group')->type($groupName, 'name')->check('amHeadCoach')->press('Save'); $group = Group::orderBy('id', 'DESC')->first(); $this->see("Now that you've created your group")->seePageIs('/group/' . $group->id . '/settings/email?justCreated=1')->see($groupName . ' has been created'); }