Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Admin/UserFinancesTest.php
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | public function testFinances(): void | ||||
$this->browse(function (Browser $browser) { | $this->browse(function (Browser $browser) { | ||||
$jack = $this->getTestUser('jack@kolab.org'); | $jack = $this->getTestUser('jack@kolab.org'); | ||||
$wallet = $jack->wallets()->first(); | $wallet = $jack->wallets()->first(); | ||||
$wallet->transactions()->delete(); | $wallet->transactions()->delete(); | ||||
$wallet->setSetting('stripe_id', 'abc'); | $wallet->setSetting('stripe_id', 'abc'); | ||||
$page = new UserPage($jack->id); | $page = new UserPage($jack->id); | ||||
$browser->visit(new Home()) | $browser->visit(new Home()) | ||||
->submitLogon('jeroen@jeroen.jeroen', 'jeroen', true) | ->submitLogon('jeroen@jeroen.jeroen', \App\Utils::generatePassphrase(), true) | ||||
->on(new Dashboard()) | ->on(new Dashboard()) | ||||
->visit($page) | ->visit($page) | ||||
->on($page) | ->on($page) | ||||
->assertSeeIn('@nav #tab-finances', 'Finances') | ->assertSeeIn('@nav #tab-finances', 'Finances') | ||||
->with('@user-finances', function (Browser $browser) { | ->with('@user-finances', function (Browser $browser) { | ||||
$browser->waitUntilMissing('.app-loader') | $browser->waitUntilMissing('.app-loader') | ||||
->assertSeeIn('.card-title:first-child', 'Account balance') | ->assertSeeIn('.card-title:first-child', 'Account balance') | ||||
->assertSeeIn('.card-title:first-child .text-success', '0,00 CHF') | ->assertSeeIn('.card-title:first-child .text-success', '0,00 CHF') | ||||
▲ Show 20 Lines • Show All 267 Lines • Show Last 20 Lines |