Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/PaymentMollieTest.php
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | public function testPayment(): void | ||||
->click('@links .link-wallet') | ->click('@links .link-wallet') | ||||
->on(new WalletPage()) | ->on(new WalletPage()) | ||||
->assertSeeIn('@main button', 'Add credit') | ->assertSeeIn('@main button', 'Add credit') | ||||
->click('@main button') | ->click('@main button') | ||||
->with(new Dialog('@payment-dialog'), function (Browser $browser) { | ->with(new Dialog('@payment-dialog'), function (Browser $browser) { | ||||
$browser->assertSeeIn('@title', 'Top up your wallet') | $browser->assertSeeIn('@title', 'Top up your wallet') | ||||
->waitFor('#payment-method-selection #creditcard') | ->waitFor('#payment-method-selection #creditcard') | ||||
->waitFor('#payment-method-selection #paypal') | ->waitFor('#payment-method-selection #paypal') | ||||
->assertMissing('#payment-method-selection #banktransfer') | ->waitFor('#payment-method-selection #banktransfer') | ||||
->click('#creditcard'); | ->click('#creditcard'); | ||||
}) | }) | ||||
->with(new Dialog('@payment-dialog'), function (Browser $browser) { | ->with(new Dialog('@payment-dialog'), function (Browser $browser) { | ||||
$browser->assertSeeIn('@title', 'Top up your wallet') | $browser->assertSeeIn('@title', 'Top up your wallet') | ||||
->assertFocused('#amount') | ->assertFocused('#amount') | ||||
->assertSeeIn('@button-cancel', 'Cancel') | ->assertSeeIn('@button-cancel', 'Cancel') | ||||
->assertSeeIn('@button-action', 'Continue') | ->assertSeeIn('@button-action', 'Continue') | ||||
// Test error handling | // Test error handling | ||||
▲ Show 20 Lines • Show All 244 Lines • Show Last 20 Lines |