X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FCampaign%2FMailingTest.php;h=fc5d675920f3968b8ccfde7758985b3d716fbadb;hb=16a4b3539eaeb14dc4dc5edd686dc04eb5b6e7ef;hp=0a7955ed419c8bd2f12225d2a0b363d82246b9c3;hpb=76e86fd8640221a1225320edafd0ebc2c8192643;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Campaign/MailingTest.php b/tests/phpunit/WebTest/Campaign/MailingTest.php index 0a7955ed41..fc5d675920 100644 --- a/tests/phpunit/WebTest/Campaign/MailingTest.php +++ b/tests/phpunit/WebTest/Campaign/MailingTest.php @@ -1,9 +1,9 @@ select("group_id", "label=$groupName"); $this->click("_qf_GroupContact_next"); - $this->waitForPageToLoad($this->getTimeoutMsec()); + $this->waitForElementPresent('link=Remove'); $this->openCiviPage('campaign/add', 'reset=1', '_qf_Campaign_upload-bottom'); @@ -91,15 +95,18 @@ class WebTest_Campaign_MailingTest extends CiviSeleniumTestCase { $this->click("_qf_Campaign_upload-bottom"); $this->waitForPageToLoad($this->getTimeoutMsec()); - $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.", - "Status message didn't show up after saving campaign!" - ); + $this->waitForText('crm-notification-container', "Campaign $title"); - $this->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]"); - $id = (int) $this->getText("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]"); + $this->waitForElementPresent("//div[@id='campaignList']/div[@id='campaigns_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]"); + $id = (int) $this->getText("//div[@id='campaignList']/div[@id='campaigns_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]"); $this->mailingAddTest($groupName, $campaignTitle, $id); } + /** + * @param $groupName + * @param $campaignTitle + * @param $id + */ function mailingAddTest($groupName, $campaignTitle, $id) { //---- create mailing contact and add to mailing Group $firstName = substr(sha1(rand()), 0, 7); @@ -211,7 +218,7 @@ class WebTest_Campaign_MailingTest extends CiviSeleniumTestCase { //----------end New Mailing------------- //check redirected page to Scheduled and Sent Mailings and verify for mailing name - $this->assertElementContainsText('page-title', "Scheduled and Sent Mailings"); + $this->assertElementContainsText('page-title', "Find Mailings"); $this->assertElementContainsText('Search', "Mailing $mailingName Webtest"); //--------- mail delivery verification---------