/** *Overview: * * This test checks the deletion of an e-mail in the headlines listing. It * selects an e-mail by clicking its checkbox and then clicks on the "Delete" * option within the options menu * * - CTV3-750 * http://comunidadeexpresso.serpro.gov.br/testlink/linkto.php?tprojectPrefix=CTV3&item=testcase&id=CTV3-750 */ public function test_CTV3_750_Delete_Mail() { //load test data $USER_LOGIN = $this->getGlobalValue('user.1.login'); $USER_PASSWORD = $this->getGlobalValue('user.1.password'); $USER_MAIL = $this->getGlobalValue('user.1.email'); $MAIL_SUBJECT = $this->getTestValue('mail.subject'); $MAIL_CONTENT = $this->getTestValue('mail.content'); $this->doLogin($USER_LOGIN, $USER_PASSWORD); $mailPage = new MailPage($this); $mailPage->sendMail(array($USER_MAIL), $MAIL_SUBJECT, $MAIL_CONTENT); //testStart $this->waitForAjaxAndAnimations(); $mailPage->clickOnFolderByName('Enviados'); $this->waitForAjaxAndAnimations(); $headlinesEntry = $mailPage->getHeadlinesEntryBySubject($MAIL_SUBJECT); $headlinesEntry->toggleCheckbox(); $mailPage->clickMenuOptionDelete(); $this->waitForAjaxAndAnimations(); $headlinesEntry = $mailPage->getHeadlinesEntryBySubject($MAIL_SUBJECT); $this->assertNull($headlinesEntry, 'Mail was deleted, but it was not removed from headlines listing'); $mailPage->clickOnFolderByName('Lixeira'); $this->waitForAjaxAndAnimations(); $headlinesEntry = $mailPage->getHeadlinesEntryBySubject($MAIL_SUBJECT); $this->assertNotNull($headlinesEntry, 'Mail was deleted, but could not be found in the trash bin'); }
public function test_CTV3_846_Delete_Draft() { $USER_LOGIN = $this->getGlobalValue('user.1.login'); $USER_PASSWORD = $this->getGlobalValue('user.1.password'); $RECIPIENT_1_MAIL = $this->getGlobalValue('user.2.email'); $MAIL_SUBJECT = $this->getTestValue('mail.subject'); $MAIL_CONTENT = $this->getTestValue('mail.content'); TestScenarios::createMessageDraft($this, (object) array('senderLogin' => $USER_LOGIN, 'senderPassword' => $USER_PASSWORD, 'recipentMail' => $RECIPIENT_1_MAIL, 'subject' => $MAIL_SUBJECT, 'content' => $MAIL_CONTENT)); $this->doLogin($USER_LOGIN, $USER_PASSWORD); $mailPage = new MailPage($this); $mailPage->clickOnFolderByName('Rascunhos'); $headlinesEntry = $mailPage->getHeadlinesEntryBySubject($MAIL_SUBJECT); $headlinesEntry->toggleCheckbox(); $mailPage->clickMenuOptionDelete(); $this->waitForAjaxAndAnimations(); $headlinesEntry = $mailPage->getHeadlinesEntryBySubject($MAIL_SUBJECT); $this->assertNull($headlinesEntry, 'Mail was deleted, but it was not removed from headlines listing in Draft Folder'); $mailPage->clickOnFolderByName('Lixeira'); $this->waitForAjaxAndAnimations(); $headlinesEntry = $mailPage->getHeadlinesEntryBySubject($MAIL_SUBJECT); $this->assertNotNull($headlinesEntry, 'Mail was deleted, but could not be found in the trash bin'); }