From 8617883d4223434dae71c30d5d40d5475b0cd782 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Tue, 13 Aug 2013 21:45:20 -0700 Subject: [PATCH] Profile web test fixes. --- tests/phpunit/WebTest/Profile/ProfileAddTest.php | 2 +- .../WebTest/Profile/ProfileGroupSubscriptionTest.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/WebTest/Profile/ProfileAddTest.php b/tests/phpunit/WebTest/Profile/ProfileAddTest.php index 3f4793a767..6cc4d283f8 100644 --- a/tests/phpunit/WebTest/Profile/ProfileAddTest.php +++ b/tests/phpunit/WebTest/Profile/ProfileAddTest.php @@ -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'); diff --git a/tests/phpunit/WebTest/Profile/ProfileGroupSubscriptionTest.php b/tests/phpunit/WebTest/Profile/ProfileGroupSubscriptionTest.php index e6020d0a44..6b10ca9f66 100644 --- a/tests/phpunit/WebTest/Profile/ProfileGroupSubscriptionTest.php +++ b/tests/phpunit/WebTest/Profile/ProfileGroupSubscriptionTest.php @@ -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'); -- 2.25.1