50 lines
1.6 KiB
PHP
50 lines
1.6 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\Helpdesk\Tests\Browser;
|
|
|
|
use Laravel\Dusk\Browser;
|
|
use Modules\Helpdesk\Tests\Concerns\BuildsHelpdeskFixtures;
|
|
use Tests\DuskTestCase;
|
|
|
|
final class HelpdeskSettingsBrowserTest extends DuskTestCase
|
|
{
|
|
use BuildsHelpdeskFixtures;
|
|
|
|
public function test_settings_tabs_expose_lookup_git_and_workflow_setup_areas(): void
|
|
{
|
|
$fixtures = $this->seedHelpdeskFixtures();
|
|
$admin = $fixtures['admin'];
|
|
|
|
$this->browse(function (Browser $browser) use ($admin): void {
|
|
$browser->loginAs($admin)
|
|
->visitRoute('helpdesk.settings')
|
|
->waitFor('@helpdesk-settings-manager')
|
|
->assertSee('Support configuration')
|
|
->assertSee('Statuses')
|
|
->press('Priorities')
|
|
->waitForText('Priorities', 10)
|
|
->press('Categories')
|
|
->waitForText('Categories', 10)
|
|
->press('Teams')
|
|
->waitForText('Teams', 10)
|
|
->press('Projects')
|
|
->waitForText('Projects', 10)
|
|
->press('Git')
|
|
->waitForText('Git repositories', 10)
|
|
->assertSee('Remote URL')
|
|
->press('Workflow')
|
|
->waitForText('Workflow messages', 10)
|
|
->assertSee('HTML email body');
|
|
});
|
|
}
|
|
|
|
private function openSettingsSection(Browser $browser, string $section, string $expectedHeading): Browser
|
|
{
|
|
return $browser
|
|
->click('@helpdesk-settings-section-'.$section)
|
|
->waitForText($expectedHeading, 10);
|
|
}
|
|
}
|