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.
roundcubemail/tests/Browser/Settings/AboutTest.php

44 lines
1.3 KiB
PHP

<?php
namespace Tests\Browser\Settings;
use Tests\Browser\Components\App;
use Tests\Browser\Components\Dialog;
class AboutTest extends \Tests\Browser\TestCase
{
public function testAbout()
{
$this->browse(function ($browser) {
$browser->go('settings');
$browser->clickTaskMenuItem('about');
$browser->with(new Dialog(), function ($browser) {
$browser->assertDialogTitle('About')
->assertButton('cancel', 'Close')
->assertVisible('@content #aboutframe');
if ($url = \rcmail::get_instance()->config->get('support_url')) {
$browser->assertButton('mainaction.help', 'Get support');
}
});
$browser->withinFrame('#aboutframe', function ($browser) {
// check task and action
$browser->with(new App(), function ($browser) {
$browser->assertEnv('task', 'settings');
$browser->assertEnv('action', 'about');
});
$browser->assertSee($this->app->config->get('product_name'));
$browser->assertVisible('#pluginlist');
});
$browser->with(new Dialog(), function ($browser) {
$browser->closeDialog();
});
});
}
}