示例#1
0
 /**
  * @param FunctionalTester $I
  */
 public function testCreate(FunctionalTester $I)
 {
     $I->wantTo('ensure that create media works');
     $I->amOnPage(['/media/create']);
     $I->see('Add New Media', 'h1');
     $I->see('Add files...');
 }
示例#2
0
 /**
  * @param FunctionalTester $I
  */
 public function testDetail(FunctionalTester $I)
 {
     $I->wantTo('ensure that detail theme works');
     $I->amOnPage(Url::to(['/theme/detail', 'theme' => 'writesdown']));
     $I->see('Detail Theme', 'h1');
     $I->see('Name');
     $I->see('Author');
 }
示例#3
0
 /**
  * @param FunctionalTester $I
  */
 public function testCreate(FunctionalTester $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', '#widget-create-form');
 }
示例#4
0
 /**
  * @param FunctionalTester $I
  */
 public function testCreate(FunctionalTester $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', '#module-create-form');
 }
示例#5
0
 /**
  * @param FunctionalTester $I
  */
 public function testView(FunctionalTester $I)
 {
     $I->wantTo('ensure that view post-type works');
     $I->amOnPage(Url::to(['/post-type/view', 'id' => 1]));
     $I->see('View Post Type: Post', 'h1');
     $I->see('Taxonomies', 'h3');
     $I->amOnPage(Url::to(['/post-type/view', 'id' => 2]));
     $I->see('View Post Type: Page', 'h1');
     $I->dontSee('Taxonomies', 'h3');
 }
示例#6
0
 /**
  * @param FunctionalTester $I
  */
 public function testView(FunctionalTester $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');
 }
示例#7
0
 public function testGroup(FunctionalTester $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][option_value]"]', 'My New Website');
     $I->fillField('input[name="Option[tagline][option_value]"]', 'My New Website Tagline');
     $I->click('Save');
     $I->expectTo('see success message');
     $I->see('Settings successfully saved.');
     Option::up('sitetitle', 'WritesDown');
     Option::up('tagline', 'CMS Built with Yii Framework');
 }