1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Gateways: Stripe: Adding credit card standalone

This commit is contained in:
Benjamin Beganović 2021-07-07 13:46:37 +02:00
parent 51dbae59d4
commit 4705d40fdb

View File

@ -58,7 +58,7 @@ class CreditCardTest extends DuskTestCase
->type('cvc', '242'); ->type('cvc', '242');
}) })
->click('#pay-now') ->click('#pay-now')
->waitForText('Details of the payment'); ->waitForText('Details of the payment', 60);
}); });
} }
@ -79,7 +79,7 @@ class CreditCardTest extends DuskTestCase
}) })
->radio('#proxy_is_default', true) ->radio('#proxy_is_default', true)
->click('#pay-now') ->click('#pay-now')
->waitForText('Details of the payment') ->waitForText('Details of the payment', 60)
->visitRoute('client.payment_methods.index') ->visitRoute('client.payment_methods.index')
->clickLink('View') ->clickLink('View')
->assertSee('4242'); ->assertSee('4242');
@ -96,7 +96,7 @@ class CreditCardTest extends DuskTestCase
->click('@pay-with-1') ->click('@pay-with-1')
->click('.toggle-payment-with-token') ->click('.toggle-payment-with-token')
->click('#pay-now') ->click('#pay-now')
->waitForText('Details of the payment'); ->waitForText('Details of the payment', 60);
}); });
} }
@ -112,4 +112,23 @@ class CreditCardTest extends DuskTestCase
->assertSee('Payment method has been successfully removed.'); ->assertSee('Payment method has been successfully removed.');
}); });
} }
public function testAddingCreditCardStandalone()
{
$this->browse(function (Browser $browser) {
$browser
->visitRoute('client.payment_methods.index')
->press('Add Payment Method')
->clickLink('Credit Card')
->type('#cardholder-name', 'John Doe')
->withinFrame('iframe', function (Browser $browser) {
$browser
->type('cardnumber', '4242 4242 4242 4242')
->type('exp-date', '04/22')
->type('cvc', '242');
})
->press('Add Payment Method')
->waitForText('**** 4242');
});
}
} }