From: Web Access Date: Thu, 29 Oct 2015 13:18:18 +0000 (+0530) Subject: Webtest Fix for Import X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a8d9d2073383dc15ab66cce85fea2e140d460612;p=civicrm-core.git Webtest Fix for Import --- diff --git a/tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php b/tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php index c3d511f093..fcfba448a4 100755 --- a/tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php +++ b/tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php @@ -162,6 +162,7 @@ class WebTest_ACL_AssignUsersToRolesTest extends CiviSeleniumTestCase { $this->click('newACL'); $this->waitForElementPresent("acl_role_id"); $this->select("acl_role_id", "label=" . $label); + $this->waitForAjaxContent(); $this->select("entity_id", "label={$groupTitle}"); $this->clickLink("_qf_EntityRole_next-botttom", 'newACL', FALSE); @@ -171,6 +172,7 @@ class WebTest_ACL_AssignUsersToRolesTest extends CiviSeleniumTestCase { $this->waitForElementPresent("group_id"); $this->select("group_id", "label={$smartGroupTitle}"); $this->select("operation", "label=Edit"); + $this->waitForAjaxContent(); $this->select("entity_id", "label={$label}"); $this->type("name", "describe {$label}"); $this->clickLink("_qf_ACL_next-bottom", 'newACL', FALSE); @@ -180,6 +182,7 @@ class WebTest_ACL_AssignUsersToRolesTest extends CiviSeleniumTestCase { $this->waitForElementPresent('name'); $this->type("name", "Edit All Events $label"); $this->select("entity_id", "label={$label}"); + $this->waitForAjaxContent(); $this->select("operation", "label=Edit"); $this->click("xpath=//label[contains(text(), 'Events')]"); $this->select("event_id", "value=0"); @@ -376,6 +379,7 @@ class WebTest_ACL_AssignUsersToRolesTest extends CiviSeleniumTestCase { $this->type("name", "Edit Events{$label}"); $this->select("operation", "label=Edit"); $this->select("entity_id", "label={$label}"); + $this->waitForElementPresent("xpath=//tr[@class='crm-acl-form-block-object_type']/td[2]/label[contains(text(), 'Events')]"); $this->click("xpath=//tr[@class='crm-acl-form-block-object_type']/td[2]/label[contains(text(), 'Events')]"); $this->select("event_id", "label=All Events"); $this->clickLink("_qf_ACL_next-bottom"); diff --git a/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php b/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php index cae49c0bc9..c6178f2f42 100644 --- a/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php +++ b/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php @@ -458,19 +458,19 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase { public function _getImportComponentContactType($component, $contactType) { $importComponentMode = array( 'Event' => array( - 'Individual' => 'CIVICRM_QFID_1_8', - 'Household' => 'CIVICRM_QFID_2_10', - 'Organization' => 'CIVICRM_QFID_4_12', + 'Individual' => 'CIVICRM_QFID_1_18', + 'Household' => 'CIVICRM_QFID_2_20', + 'Organization' => 'CIVICRM_QFID_4_22', ), 'Contribution' => array( - 'Individual' => 'CIVICRM_QFID_1_6', - 'Household' => 'CIVICRM_QFID_2_8', - 'Organization' => 'CIVICRM_QFID_4_10', + 'Individual' => 'CIVICRM_QFID_1_18', + 'Household' => 'CIVICRM_QFID_2_20', + 'Organization' => 'CIVICRM_QFID_4_22', ), 'Membership' => array( - 'Individual' => 'CIVICRM_QFID_1_6', - 'Household' => 'CIVICRM_QFID_2_8', - 'Organization' => 'CIVICRM_QFID_4_10', + 'Individual' => 'CIVICRM_QFID_1_18', + 'Household' => 'CIVICRM_QFID_2_20', + 'Organization' => 'CIVICRM_QFID_4_22', ), ); diff --git a/tests/phpunit/WebTest/Import/MatchExternalIdTest.php b/tests/phpunit/WebTest/Import/MatchExternalIdTest.php index e37c918c77..0935d09e16 100644 --- a/tests/phpunit/WebTest/Import/MatchExternalIdTest.php +++ b/tests/phpunit/WebTest/Import/MatchExternalIdTest.php @@ -319,7 +319,7 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase { $this->click("link=Fees"); $this->waitForElementPresent("_qf_Fee_upload-bottom"); $this->click("CIVICRM_QFID_1_is_monetary"); - $this->click("xpath=//tr[@class='crm-event-manage-fee-form-block-payment_processor']/td[2]/label[text()='$processorName']"); + $this->select2('payment_processor', $processorName, TRUE); $this->select("financial_type_id", "value=4"); $counter = 1; diff --git a/tests/phpunit/WebTest/Import/ParticipantTest.php b/tests/phpunit/WebTest/Import/ParticipantTest.php index 54bd4e8b1f..edf4c1756d 100644 --- a/tests/phpunit/WebTest/Import/ParticipantTest.php +++ b/tests/phpunit/WebTest/Import/ParticipantTest.php @@ -295,9 +295,8 @@ class WebTest_Import_ParticipantTest extends ImportCiviSeleniumTestCase { $this->click("CIVICRM_QFID_1_is_monetary"); // select newly created processor - $xpath = "xpath=//label[text() = '{$processorName}']/preceding-sibling::input[1]"; + $this->select2('payment_processor', $processorName, TRUE); $this->assertElementContainsText('paymentProcessor', $processorName); - $this->check($xpath); $this->select("financial_type_id", "value=4"); $counter = 1;