Webtest fixes
authorWeb Access <web@web-desktop.(none)>
Thu, 27 Mar 2014 14:13:50 +0000 (19:43 +0530)
committerWeb Access <web@web-desktop.(none)>
Thu, 27 Mar 2014 14:13:50 +0000 (19:43 +0530)
tests/phpunit/CiviTest/CiviSeleniumTestCase.php
tests/phpunit/WebTest/Contact/AddTest.php
tests/phpunit/WebTest/Contact/SearchBuilderTest.php
tests/phpunit/WebTest/Contribute/AddPricesetTest.php

index 7a7ce98c61c9baef6cbb792dd9ce4fba52215f73..fa2273116b07c2ed79d4ec27664b7db26be5a15d 100644 (file)
@@ -1646,7 +1646,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase {
     else {
       $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='$financialType[oldname]']/../td[7]/span/a[text()='Edit']");
     }
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->waitForElementPresent("name");
     $this->type('name', $financialType['name']);
     if ($option == 'new') {
       $this->type('description', $financialType['name'] . ' description');
index 519273a768eb5c07170ed683abe7c45aac3b4b5c..66eeca074b321f59e2a1e8a2fc4bb8ad6ec1108f 100644 (file)
@@ -257,13 +257,17 @@ class WebTest_Contact_AddTest extends CiviSeleniumTestCase {
     $this->select("preferred_language", "value=fr_FR");
 
     //Notes section
-    $this->click("notesBlock");
+    $this->clickAt("xpath=//div[text()='
+   
+    Notes
+  ']");
     $this->waitForElementPresent("subject");
     $this->type("subject", "Grant's note");
     $this->type("note", "This is a household contact webtest note.");
 
     // select group
-    $this->select("crmasmSelect0", "label=$groupName");
+    $this->clickAt("xpath=//div[text()='Tags and Groups']");
+    $this->select("group", "label=$groupName");
 
     //tags section
     $this->click("tag[{$this->webtestGetValidEntityID('Tag')}]");
index 6a708b0405023495ee6605866d9820264f44ccd5..e2892c30694e886fd9a894989c9c4d992a846f61 100644 (file)
@@ -268,7 +268,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
     //advanced search by selecting the contactType
     $this->openCiviPage("contact/search/advanced", "reset=1");
     if (isset($contactType)) {
-      $this->select("id=crmasmSelect0", "value=$contactType");
+      $this->select("id=contact_type", "value=$contactType");
     }
     if (substr($field, 0, 5) == 'note_') {
       $this->click("notes");
index 5aafe757b77a060176b8ded1c1c08a818ebc6e67..f53a0d92af4789ee1dc978e89c45d0572437a5e5 100644 (file)
@@ -180,7 +180,7 @@ class WebTest_Contribute_AddPricesetTest extends CiviSeleniumTestCase {
     $this->openCiviPage("admin/price", "reset=1");
 
     // Use the price set id ($sid) to pick the correct row
-    $this->clickLink("css=tr#row_{$sid} a[title='View and Edit Price Fields']", 'Link=Add Price Field');
+    $this->clickLink("//*[@id='price_set-{$sid}']/td[4]/span[1]/a[1]", 'Link=Add Price Field');
     // Check for expected price set field strings
     $this->assertStringsPresent($validateStrings);
   }