Merge pull request #71 from dpradeep/merge-20140930
[civicrm-core.git] / tests / phpunit / WebTest / Contact / AdvanceSearchPaneTest.php
index ae3e5aab7ed7919ee7ccff45aa7b1081fc6fac80..964d20d1a346b03d8e2364cd468c72e6d7471f0b 100644 (file)
@@ -151,6 +151,13 @@ class WebTest_Contact_AdvanceSearchPaneTest extends CiviSeleniumTestCase {
           }
           break;
 
+        case 'multiselect2':
+          foreach ($field['values'] as $op) {
+            $this->waitForVisible($fldLocator);
+            $this->multiselect2($fldLocator, $op);
+          }
+          break;
+
         case 'date':
           $this->webtestFillDate($fldLocator, current($field['values']));
           break;
@@ -177,8 +184,9 @@ class WebTest_Contact_AdvanceSearchPaneTest extends CiviSeleniumTestCase {
           array(
             'Location Type' =>
             array(
-              'type' => 'checkbox',
-              'values' => array('location_type[1]', 'location_type[2]'),
+              'type' => 'multiselect2',
+              'locator' => 'location_type',
+              'values' => array(array('Home', 'Work')),
             ),
             'Country' =>
             array(
@@ -188,9 +196,9 @@ class WebTest_Contact_AdvanceSearchPaneTest extends CiviSeleniumTestCase {
             ),
             'State' =>
             array(
-              'type' => 'select',
+              'type' => 'multiselect2',
               'locator' => 'state_province',
-              'values' => array('Alabama', 'California', 'New Jersey', 'New York'),
+              'values' => array(array('Alabama', 'California', 'New Jersey', 'New York')),
             ),
           ),
         ),