Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Reseller/PaymentMollieTest.php
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | public function testPayment(): void | ||||
->submitLogon($user->email, \App\Utils::generatePassphrase(), true, ['paymentProvider' => 'mollie']) | ->submitLogon($user->email, \App\Utils::generatePassphrase(), true, ['paymentProvider' => 'mollie']) | ||||
->on(new Dashboard()) | ->on(new Dashboard()) | ||||
->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 .link-creditcard svg') | ||||
->waitFor('#payment-method-selection #paypal') | ->waitFor('#payment-method-selection .link-paypal svg') | ||||
->waitFor('#payment-method-selection #banktransfer') | ->waitFor('#payment-method-selection .link-banktransfer svg') | ||||
->click('#creditcard'); | ->click('#payment-method-selection .link-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 | ||||
->type('@body #amount', 'aaa') | ->type('@body #amount', 'aaa') | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |