Merge pull request #10695 from JMAConsulting/CRM-20879
[civicrm-core.git] / tests / phpunit / WebTest / Contribute / OnlineContributionTest.php
index fcd510d771ca8c5fff7fb666e679d63395ea984d..de506fb0dfed9af2d2bdd49468de8c8683ea7e44 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.7                                                |
+ | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
+ | Copyright CiviCRM LLC (c) 2004-2018                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -135,6 +135,13 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase {
     $this->assertElementContainsText("xpath=//div[@class='crm-group billing_name_address-group']//div[@class='crm-section no-label billing_name-section']", $firstName . "billing");
     $this->assertElementContainsText("xpath=//div[@class='crm-group billing_name_address-group']//div[@class='crm-section no-label billing_name-section']", $lastName . "billing");
 
+    $stateText = CRM_Core_PseudoConstant::stateProvinceAbbreviation(1004);
+    $countryText = CRM_Core_PseudoConstant::countryIsoCode(1228);
+    $billingDetails = array('15 Main St.', 'San Jose', '94129', $stateText, $countryText);
+    foreach ($billingDetails as $field) {
+      $this->assertElementContainsText("xpath=//div[@class='crm-group billing_name_address-group']//div[@class='crm-section no-label billing_address-section']", $field);
+    }
+
     $this->click("_qf_Confirm_next-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());