X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FContact%2FTagSetSearchTest.php;h=69aa3bc607c0b106f6f61e7f25bca3a48e483757;hb=c6e262c51134924a9cc023dcb0613238fd1d0451;hp=097489640602bd8b2fd04407f37ebe21a1622c53;hpb=d5f6077993b1df66a934933af0bc9327cff13e78;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Contact/TagSetSearchTest.php b/tests/phpunit/WebTest/Contact/TagSetSearchTest.php index 0974896406..69aa3bc607 100644 --- a/tests/phpunit/WebTest/Contact/TagSetSearchTest.php +++ b/tests/phpunit/WebTest/Contact/TagSetSearchTest.php @@ -1,7 +1,7 @@ webtestLogin(); $tagSet1 = $this->_testAddTagSet(); @@ -110,7 +114,10 @@ class WebTest_Contact_TagSetSearchTest extends CiviSeleniumTestCase { $this->assertElementContainsText('css=.crm-search-results table.selector', "Anderson, $contact2"); } - function _testAddTagSet() { + /** + * @return array + */ + public function _testAddTagSet() { // Go to add tag set url. $this->openCiviPage('admin/tag', 'action=add&reset=1&tagset=1'); @@ -141,13 +148,12 @@ class WebTest_Contact_TagSetSearchTest extends CiviSeleniumTestCase { $this->waitForElementPresent("css=table.display tbody tr td"); // verify text - $this->waitForElementPresent("xpath=//table//tbody/tr/td[1][text()= '$tagSetName']"); + $this->assertTrue($this->isTextPresent($tagSetName), 'Missing text: ' . $tagSetName); - $tagid = explode('&id=', $this->getAttribute("xpath=//table//tbody/tr/td[1][text()= '$tagSetName']/following-sibling::td[7]/span/a[text()= 'Edit']@href")); + $tagid = explode('&id=', $this->getAttribute("xpath=//table[@class='display dataTable no-footer']/tbody//tr/td[1]/div[text()= '$tagSetName']/../../td[8]/span/a[text()= 'Edit']@href")); $tagid = explode('&', $tagid[1]); $tagid = $tagid[0]; return $tagid; } } -