Example #1
0
 public function testEmailActivityFollowers(\FunctionalTester $I)
 {
     $I->wantTo('check that email notifications are sent when an activity is updated');
     // first follow project
     IndexPage::openBy($I);
     $I->sendAjaxPostRequest(IndexPage::getFollowLink(\ProjectActivity::$id));
     // update project
     $I->cleanDir($I->getEmailDir());
     self::testValidDetails($I);
     $I->seeFileFound('*.eml', $I->getEmailDir());
     $I->openFile($I->getFirstEmailPath());
     $I->seeInThisFile(\Email::$followActivitySubject);
     $I->seeInThisFile(\Email::$followActivityText);
     $I->seeInThisFile(\Email::$followActivityLink);
 }
Example #2
0
 public function testUnfollowActivity(\FunctionalTester $I)
 {
     $I->wantTo('check that Unfollow button works');
     self::testFollowActivity($I);
     $I->sendAjaxPostRequest(IndexPage::getUnfollowLink(\Project::$id));
     IndexPage::openBy($I);
     $I->dontSeeRecord('app\\models\\ProjectActivityFollowers', ['activityID' => \ProjectActivity::$id, 'usersFollowing' => \Yii::$app->getUser()->getId()]);
     $I->seeLink(IndexPage::$followButtonText, IndexPage::getFollowLink(\Project::$id));
     $I->dontSeeLink(IndexPage::$unfollowButtonText, IndexPage::getUnfollowLink(\Project::$id));
 }