public function _before(\FunctionalTester $I) { $this->page = 'tests\\codeception\\_pages\\project\\CreatePage'; $this->params = []; $this->project = '\\NewProject'; LoginPage::openBy($I); LoginPage::loginAsManager($I); }
public function testDeleteButtonForManager(\FunctionalTester $I) { $I->wantTo('check that delete button works for managers'); LoginPage::openBy($I); LoginPage::loginAsManager($I); self::testDeleteButton($I); }
public function testDeleteButtonForManager(\FunctionalTester $I) { $I->wantTo('check that delete button works for managers'); LoginPage::openBy($I); LoginPage::loginAsManager($I); IndexPage::openBy($I); $I->see(\Project::$name); $I->seeRecord('app\\models\\Project', ['projectID' => \Project::$id]); // Can't click the link because it needs to be submitted as a POST request. The // test clicker doesn't support handling links like that, but clicking works in // the browser. $I->sendAjaxPostRequest(IndexPage::getDeleteLink(\Project::$id)); IndexPage::openBy($I); $I->dontSee(\Project::$name); $I->dontSeeRecord('app\\models\\Project', ['projectID' => \Project::$id]); }