Profile web test fixes.
authorDave Greenberg <dave@civicrm.org>
Wed, 14 Aug 2013 04:45:20 +0000 (21:45 -0700)
committerDave Greenberg <dave@civicrm.org>
Wed, 14 Aug 2013 04:45:20 +0000 (21:45 -0700)
tests/phpunit/WebTest/Profile/ProfileAddTest.php
tests/phpunit/WebTest/Profile/ProfileGroupSubscriptionTest.php

index 3f4793a767e3555bcce4e82cf1fd20dd518f311d..6cc4d283f89e82806ab8982f437a9ef733485c88 100644 (file)
@@ -206,7 +206,7 @@ class WebTest_Profile_ProfileAddTest extends CiviSeleniumTestCase {
 
     //enable recaptcha in the profile
     $this->openCiviPage('admin/uf/group', 'reset=1');
-    $this->clickLink("xpath=//div[@id='user-profiles']/div/div/table/tbody//tr/td[1]/span[text()= '$profileTitle']/../following-sibling::td[4]/span/a[2]");
+    $this->clickLink("xpath=//div[@id='user-profiles']/div/div/table/tbody//tr/td[1]/span[text()= '$profileTitle']/../following-sibling::td[6]/span/a[2]");
     $this->click("//form[@id='Group']/div[2]/div[2]/div[1]");
     //reCaptcha settings
     $this->click('add_captcha');
index e6020d0a44102d2aa5ec19b238af43999e349685..6b10ca9f66c9b4b08c533ad4289b7f0e7b71dd3d 100644 (file)
@@ -116,7 +116,7 @@ class WebTest_Profile_ProfileGroupSubscriptionTest extends CiviSeleniumTestCase
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // assert for subscription message
-    $this->assertElementContainsText('messages', "Your subscription request has been submitted for group ", "Subscription message is not shown");
+    $this->assertElementContainsText('css=div.messages', "Your subscription request has been submitted for group ", "Subscription message is not shown");
 
     //check if profile is saved
     $this->assertElementContainsText('css=span.msg-text', 'Your information has been saved.', 'Profile is not saved');
@@ -127,9 +127,8 @@ class WebTest_Profile_ProfileGroupSubscriptionTest extends CiviSeleniumTestCase
   }
 
   function _testdeleteProfile($profileTitle) {
-    //$this->click("xpath=//div[@id='user-profiles']/div/div/table/tbody//tr/td[1]/span[text() = '$profileTitle']/../following-sibling::td[4]/span[2][text()='more']");
-    $this->waitForElementPresent("xpath=//div[@id='user-profiles']/div/div/table/tbody//tr/td[1]/span[text() = '$profileTitle']/../following-sibling::td[4]/span[2][text()='more']/ul/li[4]/a[text()='Delete']");
-    $this->click("xpath=//div[@id='user-profiles']/div/div/table/tbody//tr/td[1]/span[text() = '$profileTitle']/../following-sibling::td[4]/span[2][text()='more']/ul/li[4]/a[text()='Delete']");
+    $this->waitForElementPresent("xpath=//div[@id='user-profiles']/div/div/table/tbody//tr/td/span[text() = '$profileTitle']/../../td[7]/span[2][text()='more']/ul/li[4]/a[text()='Delete']");
+    $this->click("xpath=//div[@id='user-profiles']/div/div/table/tbody//tr/td/span[text() = '$profileTitle']/../../td[7]/span[2][text()='more']/ul/li[4]/a[text()='Delete']");
     $this->waitForElementPresent('_qf_Group_next-bottom');
     $this->click('_qf_Group_next-bottom');
     $this->waitForElementPresent('newCiviCRMProfile-bottom');