Webtest Fix-Master
authorWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 10 Jul 2015 13:16:29 +0000 (18:46 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 10 Jul 2015 13:16:29 +0000 (18:46 +0530)
tests/phpunit/CiviTest/CiviSeleniumTestCase.php
tests/phpunit/WebTest/Case/ActivityToCaseTest.php
tests/phpunit/WebTest/Case/AddCaseTest.php
tests/phpunit/WebTest/Contact/AddTest.php
tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php

index 93821cb6b25c6c96893c264a85b150564c1d53c0..41b90aacd43494a2af9d1ed48fa8cc6a91e06018 100644 (file)
@@ -1357,7 +1357,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase {
       $this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
       $this->openCiviPage("admin/contribute", "reset=1");
       $this->waitForAjaxContent();
-      $this->click("xpath=//table['dataTables_wrapper no-footer']/tbody//tr/td[1]/strong[text()='$pageTitle']/../../td[5]/div[1]/span/ul/li[8]/a[text()='Premiums']");
+      $this->click("xpath=//table['dataTables_wrapper no-footer']/tbody//tr/td[1]/strong[text()='$pageTitle']/../../td[4]/div[1]/span/ul/li[8]/a[text()='Premiums']");
       $this->waitForElementPresent('_qf_Premium_cancel-bottom');
       $this->click("xpath=//div[@class='messages status no-popup']/a[text()='add one']");
       $this->waitForElementPresent('_qf_AddProduct_cancel-bottom');
index 8a9a7258dc283d052aa01e37cf8eba3fe768eb1b..1d6f1b1ef6d29eb3fa6252a8f8e7c6847114aeff 100644 (file)
@@ -180,7 +180,7 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase {
     $this->clickAjaxLink('_qf_Activity_upload-bottom');
     $id = $this->urlArg('id');
     $this->waitForText("case_id_$id", $activitySubject);
-    $this->click("xpath=//a[contains(text(),'$activitySubject')]");
+    $this->click("xpath=//table[@id='case_id_{$id}']/tbody//tr/td[2]/div[text()='{$activitySubject}']/../../td[8]/a[text()='View']");
 
     $LinkCaseActivityData = array(
       "Client" => $contact2['first_name'],
index a2e2b943038bda03b54ec2e2f0061c3323cc5027..9dee93c26553a8bf1dd3ac001ff4cc3c27149072 100644 (file)
@@ -219,7 +219,7 @@ class WebTest_Case_AddCaseTest extends CiviSeleniumTestCase {
     // check that open case subject is present
     $this->assertText("case_id_$id", $subject);
     // click open case activity pop-up dialog
-    $this->click("link=$subject");
+    $this->click("xpath=//table[@id='case_id_{$id}']/tbody//tr/td[2]/div[text()='{$subject}']/../../td[8]/a[text()='View']");
     $this->waitForElementPresent("ActivityView");
     $this->waitForElementPresent("css=tr.crm-case-activity-view-Activity");
     // set page location of table containing activity view data
index 2b01189ded3fc54db2b6caabcae5bfa6c3d9ffbb..2d2ab760273f1af77f2414d3baf4a62375cd65f9 100644 (file)
@@ -149,7 +149,7 @@ class WebTest_Contact_AddTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("subject");
     $this->type("subject", "test note");
     $this->type("note", "this is a test note contact webtest");
-    $this->assertElementContainsText('notesBlock', "Subject\n Notes");
+    $this->assertElementContainsText('notesBlock', "Subject\n Note");
 
     //Demographics section
     $this->click("//div[@class='crm-accordion-header' and contains(.,'Demographics')]");
index c6c7a4a387dec7a62c2989ae4ecc529c5fb20a86..e51209ed78b4e511a28a19d35e74603cbc70e205 100644 (file)
@@ -148,7 +148,7 @@ class WebTest_Member_OnlineMembershipCreateTest extends CiviSeleniumTestCase {
     // Click View action link on associated contribution record
     $this->waitForElementPresent("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[1][text()='View']");
     $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[1][text()='View']");
-    $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[3]/span[2]");
+    $this->waitForElementPresent("_qf_ContributionView_cancel-bottom");
     //View Contribution Record
     $verifyData = array(
       'From' => $firstName . ' ' . $lastName,