From fc2fa8f82a580d45787661670805e790f4be1571 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Wed, 30 Apr 2014 16:31:32 +0530 Subject: [PATCH] Web Test Fix --- .../WebTest/Contribute/StandaloneAddTest.php | 36 +++----- .../WebTest/Import/ContactCustomDataTest.php | 10 +-- .../phpunit/WebTest/Import/CustomDataTest.php | 16 ++-- .../WebTest/Import/MatchExternalIdTest.php | 6 +- .../Member/InheritedMembershipTest.php | 86 ++++++++----------- 5 files changed, 65 insertions(+), 89 deletions(-) diff --git a/tests/phpunit/WebTest/Contribute/StandaloneAddTest.php b/tests/phpunit/WebTest/Contribute/StandaloneAddTest.php index dd4f78f258..24926cc447 100644 --- a/tests/phpunit/WebTest/Contribute/StandaloneAddTest.php +++ b/tests/phpunit/WebTest/Contribute/StandaloneAddTest.php @@ -94,7 +94,8 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase { $this->type("trxn_id", "P20901X1" . rand(100, 10000)); // soft credit - $this->webtestFillAutocomplete("{$softCreditLname}, {$softCreditFname}", 'soft_credit_contact_1'); + $this->webtestFillAutocomplete("{$softCreditLname}, {$softCreditFname}", 's2id_soft_credit_contact_id_1'); + $this->type("soft_credit_amount_1", "100"); //Custom Data //$this->click('CIVICRM_QFID_3_6'); @@ -110,15 +111,6 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase { $this->type("invoice_id", time()); $this->webtestFillDate('thankyou_date'); - //Honoree section - $this->click("Honoree"); - $this->waitForElementPresent("honor_email"); - - $this->click("CIVICRM_QFID_1_2"); - $this->select("honor_prefix_id", "label=Ms."); - $this->type("honor_first_name", "Foo"); - $this->type("honor_last_name", "Bar"); - $this->type("honor_email", "foo@bar.com"); //Premium section $this->click("Premium"); @@ -132,13 +124,13 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase { $this->waitForPageToLoad($this->getTimeoutMsec()); // Is status message correct? - $this->assertTrue($this->isTextPresent("The contribution record has been saved."), "Status message didn't show up after saving!"); + $this->waitForText("crm-notification-container", "The contribution record has been saved."); // verify if Membership is created - $this->waitForElementPresent("xpath=//div[@id='Contributions']//table//tbody/tr[1]/td[8]/span/a[text()='View']"); + $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']"); //click through to the Membership view screen - $this->click("xpath=//div[@id='Contributions']//table/tbody/tr[1]/td[8]/span/a[text()='View']"); + $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']"); $this->waitForElementPresent("_qf_ContributionView_cancel-bottom"); $expected = array( @@ -173,13 +165,13 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase { // verify soft credit details $expected = array( - 3 => 'Donation', - 2 => '100.00', - 5 => 'Completed', 1 => "{$firstName} Contributor", + 2 => 'Donation', + 1 => '100.00', + 6 => 'Completed', ); foreach ($expected as $value => $label) { - $this->verifyText("xpath=id('Search')/div[2]/table[2]/tbody/tr[2]/td[$value]", preg_quote($label)); + $this->verifyText("xpath=id('Search')/div[2]/table[2]/tbody/tr[1]/td[$value]", preg_quote($label)); } } @@ -198,17 +190,17 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase { $this->openCiviPage("contribute/search", "reset=1", "_qf_Search_refresh"); // select group - $this->select("crmasmSelect2", "label={$financialType['name']}"); + $this->select("financial_type_id", "label={$financialType['name']}"); $this->clickLink("_qf_Search_refresh"); $this->assertElementContainsText("xpath=//div[@id='search-status']/table/tbody/tr[1]/td[1]", "2 Result"); $this->assertElementContainsText("xpath=//div[@id='search-status']/table/tbody/tr[1]/td[2]", "Financial Type IN {$financialType['name']}"); $this->openCiviPage("contact/search/advanced", "reset=1", "_qf_Advanced_refresh-top"); $this->click('CiviContribute'); - $this->waitForElementPresent("crmasmSelect5"); + $this->waitForElementPresent("financial_type_id"); // select group - $this->select("crmasmSelect5", "label={$financialType['name']}"); + $this->select("financial_type_id", "label={$financialType['name']}"); $this->clickLink("_qf_Advanced_refresh-top"); $this->assertElementContainsText("xpath=//div[@id='search-status']//table/tbody/tr[1]/td[1]", "2 Contacts"); $this->assertElementContainsText("xpath=//div[@id='search-status']//table/tbody/tr[1]/td[2]", "Financial Type IN {$financialType['name']}"); @@ -260,10 +252,10 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase { $this->assertTrue($this->isTextPresent("The contribution record has been saved."), "Status message didn't show up after saving!"); // verify if Membership is created - $this->waitForElementPresent("xpath=//div[@id='Contributions']//table//tbody/tr[1]/td[8]/span/a[text()='View']"); + $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']"); //click through to the Membership view screen - $this->click("xpath=//div[@id='Contributions']//table/tbody/tr[1]/td[8]/span/a[text()='View']"); + $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']"); $this->waitForElementPresent("_qf_ContributionView_cancel-bottom"); $expected = array( diff --git a/tests/phpunit/WebTest/Import/ContactCustomDataTest.php b/tests/phpunit/WebTest/Import/ContactCustomDataTest.php index ee6f87fd1f..ae33f06ef3 100644 --- a/tests/phpunit/WebTest/Import/ContactCustomDataTest.php +++ b/tests/phpunit/WebTest/Import/ContactCustomDataTest.php @@ -45,13 +45,13 @@ class WebTest_Import_ContactCustomDataTest extends ImportCiviSeleniumTestCase { $this->click("xpath=//div[@id='browseValues_Individual']/div[2]/a/span"); $this->waitForElementPresent('_qf_DedupeRules_next-bottom'); $this->type('title', $newRuleTitle); - $this->click("CIVICRM_QFID_1_used"); + $this->click("CIVICRM_QFID_Supervised_used"); $this->select("where_0", "label=$customDataParams[1]"); $this->type('weight_0', '10'); $this->type('threshold', '10'); $this->click('_qf_DedupeRules_next-bottom'); $this->waitForPageToLoad($this->getTimeoutMsec()); - $this->assertTrue($this->isTextPresent("The rule '{$newRuleTitle}' has been saved.")); + $this->waitForText("crm-notification-container", "The rule '{$newRuleTitle}' has been saved."); $rgId = explode('&rgid=', $this->getAttribute("xpath=//div[@id='browseValues_Individual']//table/tbody//tr/td[text()='{$newRuleTitle}']/../td[3]/span/a[text()='Use Rule']@href")); $rgId = explode('&', $rgId[1]); @@ -94,10 +94,10 @@ class WebTest_Import_ContactCustomDataTest extends ImportCiviSeleniumTestCase { $this->typeKeys('css=input#sort_name_navigation', $firstName1); // Wait for result list. - $this->waitForElementPresent("css=div.ac_results-inner li"); + $this->waitForElementPresent("css=ul.ui-autocomplete li"); // Visit contact summary page. - $this->click("css=div.ac_results-inner li"); + $this->click("css=ul.ui-autocomplete li"); $this->waitForPageToLoad($this->getTimeoutMsec()); $this->assertTrue($this->isTextPresent('This is a test field')); } @@ -167,7 +167,7 @@ class WebTest_Import_ContactCustomDataTest extends ImportCiviSeleniumTestCase { $this->click('_qf_Field_next-bottom'); $this->waitForElementPresent('newCustomField'); - $this->assertTrue($this->isTextPresent("Your custom field '{$customField}' has been saved.")); + $this->assertTrue($this->isTextPresent("Custom field '{$customField}' has been saved.")); $customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField']/../../td[8]/span/a@href")); $customFieldId = $customFieldId[1]; diff --git a/tests/phpunit/WebTest/Import/CustomDataTest.php b/tests/phpunit/WebTest/Import/CustomDataTest.php index 72fb6ba7ee..9b04abe640 100644 --- a/tests/phpunit/WebTest/Import/CustomDataTest.php +++ b/tests/phpunit/WebTest/Import/CustomDataTest.php @@ -190,14 +190,14 @@ class WebTest_Import_CustomDataTest extends ImportCiviSeleniumTestCase { $this->click('_qf_Field_next-bottom'); $this->waitForElementPresent('newCustomField'); - $this->assertTrue($this->isTextPresent("Your custom field '{$dateFieldLabel}' has been saved.")); + $this->assertTrue($this->isTextPresent("Custom field '{$dateFieldLabel}' has been saved.")); $dateFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$dateFieldLabel']/../../td[8]/span/a@href")); $dateFieldId = $dateFieldId[1]; // create another custom field - Integer Radio $this->click("//a[@id='newCustomField']/span"); - $this->waitForPageToLoad($this->getTimeoutMsec()); + $this->waitForElementPresent('_qf_Field_cancel-bottom'); $this->click("data_type[0]"); $this->select("data_type[0]", "value=1"); $this->click("//option[@value='1']"); @@ -228,10 +228,10 @@ class WebTest_Import_CustomDataTest extends ImportCiviSeleniumTestCase { //clicking save $this->click("_qf_Field_next"); - $this->waitForPageToLoad($this->getTimeoutMsec()); + $this->waitForElementPresent('newCustomField'); //Is custom field created - $this->assertTrue($this->isTextPresent("Your custom field '$radioFieldLabel' has been saved.")); + $this->waitForText("crm-notification-container", "Custom field '$radioFieldLabel' has been saved."); $radioFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$radioFieldLabel']/../../td[8]/span/a@href")); $radioFieldId = $radioFieldId[1]; @@ -268,8 +268,8 @@ class WebTest_Import_CustomDataTest extends ImportCiviSeleniumTestCase { // clicking save $this->click('_qf_Field_next-bottom'); - $this->waitForPageToLoad($this->getTimeoutMsec()); - $this->assertTrue($this->isTextPresent("Your custom field '{$multiSelectLabel}' has been saved.")); + $this->waitForElementPresent('newCustomField'); + $this->waitForText("crm-notification-container", "Custom field '{$multiSelectLabel}' has been saved."); $multiSelectFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$multiSelectLabel']/../../td[8]/span/a@href")); $multiSelectFieldId = $multiSelectFieldId[1]; @@ -292,9 +292,9 @@ class WebTest_Import_CustomDataTest extends ImportCiviSeleniumTestCase { // clicking save $this->click('_qf_Field_next-bottom'); - $this->waitForPageToLoad($this->getTimeoutMsec()); + $this->waitForElementPresent('newCustomField'); - $this->assertTrue($this->isTextPresent("Your custom field '{$contactReferenceLabel}' has been saved.")); + $this->waitForText("crm-notification-container", "Custom field '{$contactReferenceLabel}' has been saved."); $contactReferenceFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$contactReferenceLabel']/../../td[8]/span/a@href")); $contactReferenceFieldId = $contactReferenceFieldId[1]; diff --git a/tests/phpunit/WebTest/Import/MatchExternalIdTest.php b/tests/phpunit/WebTest/Import/MatchExternalIdTest.php index cefea63390..1aa0db57ed 100644 --- a/tests/phpunit/WebTest/Import/MatchExternalIdTest.php +++ b/tests/phpunit/WebTest/Import/MatchExternalIdTest.php @@ -317,7 +317,7 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase { } $this->click("_qf_Fee_upload-bottom"); - $this->waitForPageToLoad($this->getTimeoutMsec()); + $this->waitForElementPresent("_qf_Fee_upload-bottom"); // Go to Online Registration tab $this->click("link=Online Registration"); @@ -334,8 +334,8 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase { $this->type("confirm_from_email", "jane.doe@example.org"); $this->click("_qf_Registration_upload-bottom"); - $this->waitForPageToLoad($this->getTimeoutMsec()); - $this->waitForText('crm-notification-container', "Saved"); + $this->waitForElementPresent("_qf_Registration_upload-bottom"); + $this->waitForText('crm-notification-container', "'Online Registration' information has been saved"); // verify event input on info page // start at Manage Events listing diff --git a/tests/phpunit/WebTest/Member/InheritedMembershipTest.php b/tests/phpunit/WebTest/Member/InheritedMembershipTest.php index 8a25a4108c..e76ab50d32 100644 --- a/tests/phpunit/WebTest/Member/InheritedMembershipTest.php +++ b/tests/phpunit/WebTest/Member/InheritedMembershipTest.php @@ -50,17 +50,14 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase { $this->type('name', "Membership Type $title"); - $this->type('member_of_contact', $title); - $this->click('member_of_contact'); - $this->waitForElementPresent("css=div.ac_results-inner li"); - $this->click("css=div.ac_results-inner li"); + $this->select2('member_of_contact_id', $title); $this->type('minimum_fee', '100'); $this->select( 'financial_type_id', 'value=2' ); $this->type('duration_interval', 1); $this->select('duration_unit', 'label=year'); - $this->select('period_type', 'label=rolling'); + $this->select('period_type', 'value=rolling'); $this->removeSelection('relationship_type_id', 'label=- select -'); $this->addSelection('relationship_type_id', 'label=Employer of'); @@ -98,7 +95,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase { // Clicking save. $this->click('_qf_Membership_upload'); - $this->waitForPageToLoad($this->getTimeoutMsec()); + $this->waitForElementPresent('link=Add Membership'); // page was loaded $this->waitForTextPresent($sourceText); @@ -139,25 +136,24 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase { // visit relationship tab $this->click('css=li#tab_rel a'); $this->waitForElementPresent('css=div.action-link'); - $this->click("//div[@class='crm-container-snippet']/div/div[1]/div[1]/a/span"); - $this->waitForPageToLoad($this->getTimeoutMsec()); + $this->click("//div[@class='action-link']/a/span"); + $this->waitForElementPresent('_qf_Relationship_cancel-bottom'); $this->click('relationship_type_id'); $this->select('relationship_type_id', 'label=Employee of'); - $this->webtestFillAutocomplete($title1); - $this->waitForElementPresent('quick-save'); + $this->select2('related_contact_id', $title1, TRUE); $description = 'Well here is some description !!!!'; $this->type('description', $description); //save the relationship - $this->click('quick-save'); - $this->waitForElementPresent('current-relationships'); + $this->click('_qf_Relationship_upload-bottom'); + $this->waitForElementPresent('crm-contact-relationship-selector-current_wrapper'); //check the status message - $this->waitForText('crm-notification-container', 'New relationship created'); + $this->waitForText('crm-notification-container', 'Relationship created.'); - $this->waitForElementPresent("xpath=//div[@id='current-relationships']//div//table/tbody//tr/td[9]/span/a[text()='View']"); + $this->waitForElementPresent("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']"); // click through to the membership view screen $this->click('css=li#tab_member a'); @@ -185,9 +181,12 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase { $this->waitForElementPresent('css=div.action-link'); $this->click("//li[@id='tab_rel']/a"); - $this->waitForElementPresent("xpath=//div[@id='current-relationships']//div//table/tbody//tr/td[9]/span/a[text()='Edit']"); - $this->click("xpath=//div[@id='current-relationships']//div//table/tbody//tr/td[9]/span/a[text()='Edit']"); - $id = $this->urlArg('cid'); + $this->waitForElementPresent("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='Edit']"); + $id = explode('&id=', $this->getAttribute("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a@href")); + $id = explode('&', $id[0]); + $id = explode('=', $id[2]); + $id = $id[1]; + $this->click("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='Edit']"); $this->waitForElementPresent('is_active'); //disable relationship @@ -195,7 +194,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase { $this->click('is_active'); } $this->click('_qf_Relationship_upload'); - $this->waitForElementPresent('inactive-relationships'); + $this->waitForElementPresent('crm-contact-relationship-selector-past_wrapper'); //check the status message $this->waitForText('crm-notification-container', 'Relationship record has been updated'); @@ -203,22 +202,22 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase { $this->click('css=li#tab_member a'); //verify inherited membership has been removed - $this->openCiviPage("contact/view", "reset=1&cid=$id&selectedChild=member", "xpath=//div[@class='crm-container-snippet']/div/div[3]"); - $this->assertElementContainsText('Memberships', 'No memberships have been recorded for this contact.'); + $this->openCiviPage("contact/view", "reset=1&cid=$id&selectedChild=member", "xpath=//div[@class='view-content']/div[3]"); + $this->assertElementContainsText("xpath=//div[@class='view-content']", 'No memberships have been recorded for this contact.'); // visit relationship tab and re-enable the relationship $this->click('css=li#tab_rel a'); $this->waitForElementPresent('css=div.action-link'); $this->click("//li[@id='tab_rel']/a"); - $this->waitForElementPresent("xpath=//div[@id='inactive-relationships']//div//table/tbody//tr/td[9]/span/a[text()='Edit']"); - $this->click("xpath=//div[@id='inactive-relationships']//div//table/tbody//tr/td[9]/span/a[text()='Edit']"); + $this->waitForElementPresent("xpath=//div[@id='crm-contact-relationship-selector-past_wrapper']//table/tbody//tr/td[9]/span/a[text()='Edit']"); + $this->click("xpath=//div[@id='crm-contact-relationship-selector-past_wrapper']//table/tbody//tr/td[9]/span/a[text()='Edit']"); $this->waitForElementPresent('is_active'); if (!$this->isChecked('is_active')) { $this->click('is_active'); } $this->click('_qf_Relationship_upload'); - $this->waitForElementPresent('current-relationships'); + $this->waitForElementPresent('crm-contact-relationship-selector-current_wrapper'); //check the status message $this->waitForText('crm-notification-container', 'Relationship record has been updated.'); @@ -230,34 +229,25 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase { //disable relationship $this->click('css=li#tab_rel a'); $this->waitForElementPresent('css=div.action-link'); - $this->waitForElementPresent("xpath=//div[@id='current-relationships']//div//table/tbody//tr/td[9]/span[2][text()='more']/ul/li[1]/a[text()='Disable']"); - $this->click("xpath=//div[@id='current-relationships']//div//table/tbody//tr/td[9]/span[2][text()='more']/ul/li[1]/a[text()='Disable']"); - - $this->assertTrue((bool)preg_match("/^Are you sure you want to disable this relationship?[\s\S]$/", - $this->getConfirmation() - )); - $this->chooseOkOnNextConfirmation(); + $this->waitForElementPresent("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span[2][text()='more']/ul/li[1]/a[text()='Disable']"); + $this->click("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span[2][text()='more']/ul/li[1]/a[text()='Disable']"); + $this->waitForText("xpath=//div[@class='crm-confirm-dialog ui-dialog-content ui-widget-content modal-dialog']", 'Are you sure you want to disable this record?'); + $this->click("xpath=//div[@class='ui-dialog-buttonset']//button//span[text()='Disable']"); // Because it tends to cause problems, all uses of sleep() must be justified in comments // Sleep should never be used for wait for anything to load from the server // Justification for this instance: FIXME sleep(10); //verify inherited membership has been removed - $this->openCiviPage("contact/view", "reset=1&cid={$id}&selectedChild=member", "xpath=//div[@class='crm-container-snippet']/div/div[3]"); - $this->assertElementContainsText('Memberships', 'No memberships have been recorded for this contact.'); + $this->openCiviPage("contact/view", "reset=1&cid={$id}&selectedChild=member", "xpath=//div[@class='view-content']/div[3]"); + $this->assertElementContainsText("xpath=//div[@class='view-content']/div[3]", 'No memberships have been recorded for this contact.'); //enable relationship $this->click('css=li#tab_rel a'); $this->waitForElementPresent('css=div.action-link'); - $this->waitForElementPresent("xpath=//div[@id='inactive-relationships']//div//table/tbody//tr/td[9]/span[2][text()='more']/ul/li[1]/a[text()='Enable']"); - $this->click("xpath=//div[@id='inactive-relationships']//div//table/tbody//tr/td[9]/span[2][text()='more']/ul/li[1]/a[text()='Enable']"); - - $this->assertTrue((bool)preg_match("/^Are you sure you want to re-enable this relationship?[\s\S]$/", - $this->getConfirmation() - )); - $this->chooseOkOnNextConfirmation(); - $this->waitForPageToLoad($this->getTimeoutMsec()); + $this->waitForElementPresent("xpath=//div[@id='crm-contact-relationship-selector-past_wrapper']//table/tbody//tr/td[9]/span[2][text()='more']/ul/li[1]/a[text()='Enable']"); + $this->click("xpath=//div[@id='crm-contact-relationship-selector-past_wrapper']//table/tbody//tr/td[9]/span[2][text()='more']/ul/li[1]/a[text()='Enable']"); //verify membership $this->click('css=li#tab_member a'); @@ -287,17 +277,14 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase { $this->type('name', "Membership Type $title"); - $this->type('member_of_contact', $title); - $this->click('member_of_contact'); - $this->waitForElementPresent("css=div.ac_results-inner li"); - $this->click("css=div.ac_results-inner li"); + $this->select2('member_of_contact_id', $title); $this->type('minimum_fee', '100'); $this->select('financial_type_id', 'label=Member Dues'); $this->type('duration_interval', 1); $this->select('duration_unit', 'label=year'); - $this->select('period_type', 'label=rolling'); + $this->select('period_type', 'value=rolling'); $this->removeSelection('relationship_type_id', 'label=- select -'); $this->addSelection('relationship_type_id', 'label=Employer of'); @@ -332,7 +319,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase { $this->type('source', $sourceText); // Clicking save. - $this->clickLink('_qf_Membership_upload'); + $this->click('_qf_Membership_upload'); // page was loaded $this->waitForTextPresent($sourceText); @@ -349,11 +336,8 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase { $this->type("last_name", $lastName); // Set Current Employer - $this->type('current_employer', $org1); - $this->click('current_employer'); - $this->waitForElementPresent("css=div.ac_results-inner li"); - $this->click("css=div.ac_results-inner li"); - $this->assertContains($org1, $this->getValue('current_employer'), "autocomplete expected $org1 but didn’t find it in " . $this->getValue('current_employer')); + $this->select2('employer_id', $org1); + $this->waitForText('s2id_employer_id', $org1); $this->type("email_1_email", $email); $this->clickLink("_qf_Contact_upload_view-bottom"); -- 2.25.1