Example #1
0
 /**
  * @param AcceptanceTester $I
  */
 public function testCreate(AcceptanceTester $I)
 {
     $I->wantTo('ensure that create widget works');
     $I->amOnPage(Url::to(['/widget/create']));
     $I->see('Add New Widget', 'h1');
     $I->see('Upload New Widget');
     $I->see('Upload');
     $I->amGoingTo('submit widget form without zip file');
     $I->click('Upload', '#widget-create-form');
     if (method_exists($I, 'wait')) {
         $I->wait(3);
     }
     $I->expect('the widget not successfully uploaded');
     $I->dontSee('Widgets', 'h1');
 }
Example #2
0
 /**
  * @param AcceptanceTester $I
  */
 public function testCreate(AcceptanceTester $I)
 {
     $I->wantTo('ensure that create widget works');
     $I->amOnPage(Url::to(['/widget/create']));
     $I->see('Add New Widget', 'h1');
     $I->see('Upload New Widget');
     $I->see('Upload');
     $I->amGoingTo('submit widget form without zip file');
     $I->click('Upload', '#widget-create-form');
     if (method_exists($I, 'wait')) {
         $I->wait(3);
     }
     $I->expectTo('see validation errors');
     $I->see('Widget (ZIP) cannot be blank.', '.help-block');
 }
Example #3
0
 /**
  * @param AcceptanceTester $I
  */
 public function testCreate(AcceptanceTester $I)
 {
     $I->wantTo('ensure that create module works');
     $I->amOnPage(Url::to(['/module/create']));
     $I->see('Add New Module', 'h1');
     $I->see('Upload New Module');
     $I->see('Upload');
     $I->amGoingTo('submit module form without file');
     $I->click('Upload', '#module-create-form');
     if (method_exists($I, 'wait')) {
         $I->wait(3);
     }
     $I->expectTo('see validation errors');
     $I->see('Module (ZIP) cannot be blank.', '.help-block');
 }
Example #4
0
 /**
  * @param AcceptanceTester $I
  */
 public function testCreate(AcceptanceTester $I)
 {
     $I->wantTo('ensure that create module works');
     $I->amOnPage(Url::to(['/module/create']));
     $I->see('Add New Module', 'h1');
     $I->see('Upload New Module');
     $I->see('Upload');
     $I->amGoingTo('submit module form without file');
     $I->click('Upload', '#module-create-form');
     if (method_exists($I, 'wait')) {
         $I->wait(3);
     }
     $I->expect('module not successfully installed');
     $I->dontSee('Modules', 'h1');
 }
Example #5
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 #6
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 #7
0
 public function testGroup(AcceptanceTester $I)
 {
     $I->wantTo('ensure that setting works');
     $I->amOnPage(Url::to(['/setting/group', 'id' => 'general']));
     $I->see('General Settings', 'h1');
     $I->amGoingTo('update site title and tag line');
     $I->fillField('input[name="Option[sitetitle][value]"]', 'My New Website');
     $I->fillField('input[name="Option[tagline][value]"]', 'My New Website Tagline');
     $I->click('Save');
     if (method_exists($I, 'wait')) {
         $I->wait(3);
     }
     $I->expectTo('see success message');
     $I->see('Settings successfully saved.');
     Option::up('sitetitle', 'WritesDown');
     Option::up('tagline', 'CMS Built with Yii Framework');
 }