Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Pages/PaymentMollie.php
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | public function elements(): array | ||||
'@status-table' => 'table.table--select-status', | '@status-table' => 'table.table--select-status', | ||||
]; | ]; | ||||
} | } | ||||
/** | /** | ||||
* Submit payment form. | * Submit payment form. | ||||
* | * | ||||
* @param \Laravel\Dusk\Browser $browser The browser object | * @param \Laravel\Dusk\Browser $browser The browser object | ||||
* @param string $state Test payment status (paid, open, failed, canceled, expired) | * @param string $status Test payment status (paid, open, failed, canceled, expired) | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function submitValidCreditCard($browser, $status = 'paid') | public function submitValidCreditCard($browser, $status = 'paid') | ||||
{ | { | ||||
if ($browser->element('@methods')) { | if ($browser->element('@methods')) { | ||||
$browser->click('@methods button.grid-button-creditcard') | $browser->click('@methods button.grid-button-creditcard') | ||||
->waitFor('button.form__button'); | ->waitFor('button.form__button'); | ||||
} | } | ||||
$browser->click('input[value="' . $status . '"]') | $browser->click('input[value="' . $status . '"]') | ||||
->click('button.form__button'); | ->click('button.form__button'); | ||||
} | } | ||||
} | } |