/** * Test clicking on the Feed filter. */ public function testViewFeed() { parent::loginToSite('*****@*****.**', 'password'); $feedButton = $this->byId('feed'); $feedButton->click(); usleep(500000); $eventTitle = $this->byCssSelector('div.tiles div.title'); $this->assertEquals('Badminton Game', $eventTitle->text()); }
/** * Test changing password. */ public function testChangePassword() { parent::loginToSite('*****@*****.**', '12345'); $searchLink = $this->byId('profileLink'); $searchLink->click(); usleep(500000); $newPasswordField = $this->byId('newPassword'); $newPasswordField->clear(); $this->keys('a1b2c3d4e5'); $confirmNewPasswordField = $this->byId('confirmNewPassword'); $confirmNewPasswordField->clear(); $this->keys('a1b2c3d4e5'); $form = $this->byId('form'); $form->submit(); usleep(500000); $successMessage = $this->byCssSelector('div.alert span'); $this->assertEquals('Password has been successfully changed.', $successMessage->text()); }
/** * Test clicking on the cancel button on the recreate event page. */ public function testRecreateCancel() { parent::loginToSite('*****@*****.**', '12345'); $pastButton = $this->byId('past'); $pastButton->click(); usleep(500000); $eventDiv = $this->byCssSelector('div.tiles'); $eventDiv->click(); $originalLink = $this->getBrowserUrl(); $recreateButton = $this->byId('recreate'); $recreateButton->click(); usleep(500000); $cancelButton = $this->byId('cancel'); $cancelButton->click(); usleep(500000); $recreateButton = $this->byId('recreate'); $this->assertEquals('RECREATE', $recreateButton->text()); $this->assertEquals($originalLink, $this->getBrowserUrl()); }