Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Admin/UserFinancesTest.php
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | public function testFinances(): void | ||||
}); | }); | ||||
// Now we go to Ned's info page, he's a controller on John's wallet | // Now we go to Ned's info page, he's a controller on John's wallet | ||||
$this->browse(function (Browser $browser) { | $this->browse(function (Browser $browser) { | ||||
$ned = $this->getTestUser('ned@kolab.org'); | $ned = $this->getTestUser('ned@kolab.org'); | ||||
$page = new UserPage($ned->id); | $page = new UserPage($ned->id); | ||||
$browser->click('@nav #tab-users') | $browser->click('@nav #tab-users') | ||||
->click('@user-users tbody tr:nth-child(3) td:first-child a') | ->click('@user-users tbody tr:nth-child(4) td:first-child a') | ||||
->on($page) | ->on($page) | ||||
->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') | ||||
->with('form', function (Browser $browser) { | ->with('form', function (Browser $browser) { | ||||
$browser->assertElementsCount('.row', 1) | $browser->assertElementsCount('.row', 1) | ||||
->assertSeeIn('.row:nth-child(1) label', 'Discount') | ->assertSeeIn('.row:nth-child(1) label', 'Discount') | ||||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |