31 lines
1.1 KiB
PHP
31 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Illuminate\Support\Facades\URL;
|
|
|
|
beforeEach(function () {
|
|
URL::forceRootUrl('https://'.config('domains.domain_portal'));
|
|
});
|
|
|
|
test('portal domain serves flux javascript from laravel route', function () {
|
|
$this->get('https://'.config('domains.domain_portal').'/flux/flux.js?id=test')
|
|
->assertSuccessful()
|
|
->assertHeader('content-type', 'text/javascript; charset=utf-8');
|
|
});
|
|
|
|
test('portal domain serves minified flux javascript route in production mode', function () {
|
|
config(['app.debug' => false]);
|
|
|
|
$this->get('https://'.config('domains.domain_portal').'/flux/flux.min.js?id=test')
|
|
->assertSuccessful()
|
|
->assertHeader('content-type', 'text/javascript; charset=utf-8');
|
|
});
|
|
|
|
test('flux pro vendor bundle contains alpine components used by the admin ui', function () {
|
|
$path = base_path('vendor/livewire/flux-pro/dist/flux.js');
|
|
|
|
expect(is_file($path))->toBeTrue('Flux Pro must be installed via composer (auth.json on live).');
|
|
|
|
expect(file_get_contents($path))->toContain('fluxModal');
|
|
});
|