1

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 ?

Jeremie Ges
  • 2,747
  • 3
  • 22
  • 37
  • You might want to give http://stackoverflow.com/questions/24081305/how-to-write-integration-tests-for-stripe-checkout-on-rails a look the concepts are similar. – Mark Davidson Jan 27 '16 at 16:05
  • Already saw that :p That's why the title is really similar, didn't really help. – Jeremie Ges Jan 27 '16 at 16:32
  • For posterity's sake, this is helpful - https://jasonmccreary.me/articles/testing-stripe-checkout-laravel-dusk/ – rgdigi Mar 21 '21 at 12:57

0 Answers0