Esempio n. 1
0
 public function testValidDetails(\FunctionalTester $I)
 {
     $I->wantTo('test logging in with the correct details');
     LoginPage::openBy($I);
     LoginPage::loginAsUser($I);
     $I->seeCurrentUrlEquals(IndexPage::$url);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 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));
 }
Esempio n. 4
0
 public function _before(\FunctionalTester $I)
 {
     $I->wantTo('log in so I can test the volunteer page');
     LoginPage::openBy($I);
     LoginPage::loginAsUser($I);
 }