Example #1
0
 /**
  * @param FunctionalTester $I
  */
 public function testSelectMenu(FunctionalTester $I)
 {
     $I->wantTo('ensure that select menu works');
     IndexPage::openBy($I);
     $I->see('Menus', 'h1');
     $I->see('Menu Primary', 'h2');
     $I->amGoingTo('submit select menu to Menu Secondary');
     $I->selectOption('#select-menu-list', 'Menu Secondary');
     $I->click('Select', '#select-menu-form');
     $I->expectTo('see Menu Secondary');
     $I->see('Menu Secondary', 'h2');
     $I->click('Save');
     $I->see('Menu successfully saved.', '.alert');
 }
Example #2
0
 /**
  * @param AcceptanceTester $I
  */
 public function testCreateMenuItem(AcceptanceTester $I)
 {
     $I->wantTo('ensure that create menu item works');
     $indexPage = IndexPage::openBy($I);
     $I->see('Menus', 'h1');
     $I->see('Menu Primary', 'h2');
     if (method_exists($I, 'wait')) {
         $I->amGoingTo('submit menu form with correct data');
         $indexPage->submitMenuItem(['label' => 'New Menu Item', 'url' => 'http://writesdown.com']);
         $I->expectTo('see new menu item');
         $I->see('New Menu Item', '.dd-handle');
     }
     MenuItem::deleteAll(['label' => 'Test Menu Item']);
 }