Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/WalletTest.php
Show First 20 Lines • Show All 251 Lines • ▼ Show 20 Lines | public function testHistory(): void | ||||
// Load sub-transactions | // Load sub-transactions | ||||
$browser->click("$debitEntry td.selection button") | $browser->click("$debitEntry td.selection button") | ||||
->waitUntilMissing('.app-loader') | ->waitUntilMissing('.app-loader') | ||||
->assertElementsCount("$debitEntry td.description ul li", 2) | ->assertElementsCount("$debitEntry td.description ul li", 2) | ||||
->assertMissing("$debitEntry td.selection button"); | ->assertMissing("$debitEntry td.selection button"); | ||||
}); | }); | ||||
}); | }); | ||||
} | } | ||||
/** | |||||
* Test that non-controller user has no access to wallet | |||||
*/ | |||||
public function testAccessDenied(): void | |||||
{ | |||||
$this->browse(function (Browser $browser) { | |||||
$browser->visit('/logout') | |||||
->on(new Home()) | |||||
->submitLogon('jack@kolab.org', 'simple123', true) | |||||
->on(new Dashboard()) | |||||
->assertMissing('@links .link-wallet') | |||||
->visit('/wallet') | |||||
->assertErrorPage(403, "Only account owners can access a wallet."); | |||||
}); | |||||
} | |||||
} | } |