Skip to content

Commit

Permalink
Merge pull request #881 from jitendrapurohit/d10_test
Browse files Browse the repository at this point in the history
D9 - Fill cc values after billing address
  • Loading branch information
KarinG authored Jun 17, 2023
2 parents 2e66821 + d3058a6 commit aae668f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/src/FunctionalJavascript/WebformCivicrmTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -693,13 +693,6 @@ protected function fillBillingFields($params) {
* Assert values populated in billing address fields after sameas checkbox is enabled.
*/
protected function fillCardAndSubmit($billingValues = []) {
// Wait for the credit card form to load in.
$this->assertSession()->waitForField('credit_card_number');
$this->getSession()->getPage()->fillField('Card Number', '4222222222222220');
$this->getSession()->getPage()->fillField('Security Code', '123');
$this->getSession()->getPage()->selectFieldOption('credit_card_exp_date[M]', '11');
$this_year = date('Y');
$this->getSession()->getPage()->selectFieldOption('credit_card_exp_date[Y]', $this_year + 1);
if (!empty($billingValues)) {
$this->getSession()->getPage()->checkField("civicrm_1_contribution_1_contribution_billing_address_same_as");
$this->assertSession()->assertWaitOnAjaxRequest();
Expand All @@ -723,6 +716,13 @@ protected function fillCardAndSubmit($billingValues = []) {
];
$this->fillBillingFields($billingValues);
}
// Wait for the credit card form to load in.
$this->assertSession()->waitForField('credit_card_number');
$this->getSession()->getPage()->fillField('credit_card_number', '4222222222222220');
$this->getSession()->getPage()->fillField('cvv2', '123');
$this->getSession()->getPage()->selectFieldOption('credit_card_exp_date[M]', '11');
$this_year = date('Y');
$this->getSession()->getPage()->selectFieldOption('credit_card_exp_date[Y]', $this_year + 1);

$this->getSession()->getPage()->pressButton('Submit');
$this->htmlOutput();
Expand Down

0 comments on commit aae668f

Please sign in to comment.