Webtest Fix for Import
authorWeb Access <rohan.katkar@webaccessglobal.com>
Thu, 29 Oct 2015 13:18:18 +0000 (18:48 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Thu, 29 Oct 2015 13:18:18 +0000 (18:48 +0530)
tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php
tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php
tests/phpunit/WebTest/Import/MatchExternalIdTest.php
tests/phpunit/WebTest/Import/ParticipantTest.php

index c3d511f0934a91e34f5f832365a78931352ef811..fcfba448a41ae348665ad6e96351af0467e65e9c 100755 (executable)
@@ -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");
index cae49c0bc934c27cbeac02bc08ca492cbff66392..c6178f2f4230532f12106035adfe8996b3d8442a 100644 (file)
@@ -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',
       ),
     );
 
index e37c918c774679bb3826456919604225775821b8..0935d09e169af597ebea059e5573686e808a93e2 100644 (file)
@@ -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;
index 54bd4e8b1f514cf4b596111e389f79a2c2ac98c8..edf4c1756dd04663c3df7f9937bac6a277eeec33 100644 (file)
@@ -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;