public function testValidDetails(\FunctionalTester $I) { $I->wantTo('test logging in with the correct details'); LoginPage::openBy($I); LoginPage::loginAsUser($I); $I->seeCurrentUrlEquals(IndexPage::$url); }
public function testVolunteerFormLinkAsUser(\FunctionalTester $I) { LoginPage::openBy($I); LoginPage::loginAsUser($I); $I->seeCurrentUrlEquals(IndexPage::$url); $I->seeLink(IndexPage::$logoutLinkText); $I->click(IndexPage::$volunteerFormButtonText, IndexPage::$contentSelector); $I->seeCurrentUrlEquals(VolunteerPage::$url); }
public function testFollowActivity(\FunctionalTester $I) { $I->wantTo('check that Follow button works'); LoginPage::openBy($I); LoginPage::loginAsUser($I); IndexPage::openBy($I); $I->seeLink(IndexPage::$followButtonText, IndexPage::getFollowLink(\Project::$id)); $I->dontSeeLink(IndexPage::$unfollowButtonText, IndexPage::getUnfollowLink(\Project::$id)); $I->sendAjaxPostRequest(IndexPage::getFollowLink(\Project::$id)); IndexPage::openBy($I); $I->seeRecord('app\\models\\ProjectActivityFollowers', ['activityID' => \ProjectActivity::$id, 'usersFollowing' => \Yii::$app->getUser()->getId()]); $I->seeLink(IndexPage::$unfollowButtonText, IndexPage::getUnfollowLink(\Project::$id)); $I->dontSeeLink(IndexPage::$followButtonText, IndexPage::getFollowLink(\Project::$id)); }
public function _before(\FunctionalTester $I) { $I->wantTo('log in so I can test the volunteer page'); LoginPage::openBy($I); LoginPage::loginAsUser($I); }