TenantAtlas/apps/platform/tests/Feature/Guards/BrowserLaneIsolationTest.php
2026-04-16 15:57:39 +02:00

29 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
use Illuminate\Support\Collection;
use Tests\Support\TestLaneManifest;
it('keeps browser tests isolated behind their dedicated lane', function (): void {
$lane = TestLaneManifest::lane('browser');
$files = new Collection(TestLaneManifest::discoverFiles('browser'));
expect($lane['includedFamilies'])->toContain('browser')
->and($lane['defaultEntryPoint'])->toBeFalse()
->and($files)->not->toBeEmpty()
->and($files->every(static fn (string $path): bool => str_starts_with($path, 'tests/Browser/')))->toBeTrue();
});
it('keeps the browser lane routed to the browser suite and out of the default loops', function (): void {
expect(TestLaneManifest::buildCommand('browser'))->toContain('--group=browser')
->and(TestLaneManifest::buildCommand('browser'))->toContain('--testsuite=Browser');
foreach (TestLaneManifest::discoverFiles('fast-feedback') as $path) {
expect($path)->not->toStartWith('tests/Browser/');
}
foreach (TestLaneManifest::discoverFiles('confidence') as $path) {
expect($path)->not->toStartWith('tests/Browser/');
}
});