You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
728 B
PHTML
29 lines
728 B
PHTML
5 years ago
|
<?php
|
||
|
|
||
|
namespace Tests\Browser;
|
||
|
|
||
5 years ago
|
use Tests\Browser\Components\App;
|
||
|
|
||
5 years ago
|
class LogoutTest extends TestCase
|
||
5 years ago
|
{
|
||
|
public function testLogout()
|
||
|
{
|
||
|
$this->browse(function ($browser) {
|
||
5 years ago
|
$browser->go('settings');
|
||
5 years ago
|
|
||
5 years ago
|
// click the Logout button in taskmenu
|
||
5 years ago
|
$browser->clickTaskMenuItem('logout');
|
||
5 years ago
|
|
||
|
// task should be set to 'login'
|
||
5 years ago
|
$browser->with(new App(), function ($browser) {
|
||
|
$browser->assertEnv('task', 'login');
|
||
|
});
|
||
5 years ago
|
|
||
|
// form should exist
|
||
|
$browser->assertVisible('input[name="_user"]');
|
||
|
$browser->assertVisible('input[name="_pass"]');
|
||
|
$browser->assertMissing('#taskmenu');
|
||
|
});
|
||
|
}
|
||
|
}
|