Example #1
0
 /**
  * @param AcceptanceTester $I
  */
 public function testView(AcceptanceTester $I)
 {
     $I->wantTo('ensure that view user works');
     $I->amOnPage(Url::to(['/user/view', 'id' => 1]));
     $I->see('View User: superadmin', 'h1');
     $I->dontSeeLink('Update');
     $I->dontSeeLink('Delete');
     $I->amOnPage(Url::to(['/user/view', 'id' => 5]));
     $I->see('View User: contributor', 'h1');
     $I->seeLink('Update');
     $I->seeLink('Delete');
 }
Example #2
0
 /**
  * @param AcceptanceTester $I
  */
 public function testUpload(AcceptanceTester $I)
 {
     $I->wantTo('ensure that upload theme works');
     $I->amOnPage(Url::to(['/theme/upload']));
     $I->see('Upload New Theme', 'h1');
     $I->seeLink('Available Themes');
     $I->seeLink('Add New Theme');
     $I->see('Upload');
     $I->amGoingTo('submit theme form without theme file');
     $I->click('Upload');
     if (method_exists($I, 'wait')) {
         $I->wait(3);
     }
     $I->expectTo('see validation errors');
     $I->see('Theme cannot be blank.', '.help-block');
 }
Example #3
0
 /**
  * @param AcceptanceTester $I
  */
 public function testUpload(AcceptanceTester $I)
 {
     $I->wantTo('ensure that upload theme works');
     $I->amOnPage(Url::to(['/theme/upload']));
     $I->see('Upload New Theme', 'h1');
     $I->seeLink('Available Themes');
     $I->seeLink('Add New Theme');
     $I->see('Upload');
     $I->amGoingTo('submit theme form without theme file');
     $I->click('Upload');
     if (method_exists($I, 'wait')) {
         $I->wait(3);
     }
     $I->expect('the theme not successfully uploaded');
     $I->dontSee('Themes', 'h1');
 }
Example #4
0
 /**
  * @param AcceptanceTester $I
  */
 public function testIndex(AcceptanceTester $I)
 {
     $I->wantTo('ensure that widget works');
     $I->amOnPage(Url::to(['/widget/index']));
     $I->see('Widgets', 'h1');
     $I->see('Available Widgets', 'h4');
     $I->see('Sidebar', 'h3');
     $I->seeLink('Add New Widget');
 }