/** * @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']); }