seedLookupData(); $admin = $this->admin(['name' => 'Settings Admin']); $this->browse(function (Browser $browser) use ($admin): void { $browser->loginAs($admin) ->visitRoute('helpdesk.settings') ->waitFor('@helpdesk-settings-manager') ->assertSee('Support configuration') ->assertSourceHas('Statuses') ->assertSourceHas('Priorities') ->assertSourceHas('Categories') ->assertSourceHas('Teams') ->assertSourceHas('Projects') ->assertSourceHas('Git') ->assertSourceHas('Workflow') ->assertSourceHas('Canned') ->assertSourceHas('SLA') ->assertSourceHas('Rules') ->assertSourceHas('Checks') ->assertSourceHas('Tags') ->assertSourceHas('Products'); $this->setHelpdeskSettingsSection($browser, 'git'); $browser->waitForText('Git repositories', 10) ->assertSee('Remote URL'); $this->setHelpdeskSettingsSection($browser, 'workflow'); $browser->waitForText('Workflow messages', 10) ->assertSee('HTML email body'); $this->setHelpdeskSettingsSection($browser, 'canned'); $browser->waitForText('Canned responses', 10) ->assertSee('Reply body'); $this->setHelpdeskSettingsSection($browser, 'sla'); $browser->waitForText('SLA policies', 10) ->assertSee('First response minutes'); $this->setHelpdeskSettingsSection($browser, 'automation'); $browser->waitForText('Email automation rules', 10) ->assertSee('Subject contains'); $this->setHelpdeskSettingsSection($browser, 'checklists'); $browser->waitForText('Checklist templates', 10) ->assertSee('Checklist items'); $this->setHelpdeskSettingsSection($browser, 'tags'); $browser->waitForText('Ticket tags', 10) ->assertSee('Colour'); $this->setHelpdeskSettingsSection($browser, 'products'); $browser->waitForText('Products and services', 10) ->assertSee('Release/build'); }); } private function setHelpdeskSettingsSection(Browser $browser, string $section): void { $encodedSection = json_encode($section, JSON_THROW_ON_ERROR); $browser->script(<<