44 lines
1.6 KiB
PHP
44 lines
1.6 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Tests\Support\TestLaneReport;
|
|
|
|
it('keeps lane artifact paths app-root relative under storage/logs/test-lanes', function (): void {
|
|
$artifacts = TestLaneReport::artifactPaths('fast-feedback');
|
|
|
|
expect($artifacts)->toHaveKeys(['junit', 'summary', 'budget', 'report', 'profile']);
|
|
|
|
foreach (array_values($artifacts) as $relativePath) {
|
|
expect($relativePath)->toStartWith('storage/logs/test-lanes/');
|
|
}
|
|
});
|
|
|
|
it('keeps only the skeleton file checked into the lane artifact directory', function (): void {
|
|
$gitignore = base_path('storage/logs/test-lanes/.gitignore');
|
|
|
|
expect(file_exists($gitignore))->toBeTrue()
|
|
->and((string) file_get_contents($gitignore))->toContain('*')
|
|
->and((string) file_get_contents($gitignore))->toContain('!.gitignore');
|
|
});
|
|
|
|
it('publishes the shared fixture slimming comparison only for the governed standard lanes', function (): void {
|
|
$fastFeedback = TestLaneReport::buildReport(
|
|
laneId: 'fast-feedback',
|
|
wallClockSeconds: 176.73623,
|
|
slowestEntries: [],
|
|
durationsByFile: [],
|
|
comparisonProfile: 'shared-test-fixture-slimming',
|
|
);
|
|
|
|
$heavyGovernance = TestLaneReport::buildReport(
|
|
laneId: 'heavy-governance',
|
|
wallClockSeconds: 83.66,
|
|
slowestEntries: [],
|
|
durationsByFile: [],
|
|
comparisonProfile: 'shared-test-fixture-slimming',
|
|
);
|
|
|
|
expect($fastFeedback)->toHaveKey('sharedFixtureSlimmingComparison')
|
|
->and($heavyGovernance)->not->toHaveKey('sharedFixtureSlimmingComparison');
|
|
}); |