I have a payment process in my application, so far I created an integration test to check the process flow.
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class PurchaseBoxFlowTest extends TestCase
{
use DatabaseTransactions;
/** @test */
public function as_a_guest_i_buy_a_gift_box_for_5_months_and_i_deliver_it_to_a_regional_address()
{
// Some code.
$this->visit('payment');
}
}
Let's say payment displays a simple button which triggers the stripe checkout modal.
How I can fill the form of that iframe ?
Is PHPUnit behind the scene executes the javascript by himself ?
If not, what's the required plugin(s) to make it work ?