Show template inheritance overrides

This commit is contained in:
2026-09-08 10:25:52 +00:00
committed by Twyco
parent fef82cb88f
commit 831014f7fe
16 changed files with 334 additions and 4 deletions
@@ -3,8 +3,10 @@
namespace Tests\Feature\Projects;
use App\Actions\ProjectTicketMetadata\InitializeProjectTicketMetadata;
use App\Actions\Projects\DuplicateProjectConfiguration;
use App\Models\BoardColumn;
use App\Models\Project;
use App\Models\ProjectTemplate;
use App\Models\Ticket;
use App\Models\TicketStatus;
use App\Models\User;
@@ -31,6 +33,15 @@ class ProjectBoardSettingsControllerTest extends TestCase
'position' => 1,
]);
$template = ProjectTemplate::factory()->create([
'configuration_snapshot' => app(DuplicateProjectConfiguration::class)->export($project, [
DuplicateProjectConfiguration::COPY_BOARD_WORKFLOW,
]),
'copy_areas' => [DuplicateProjectConfiguration::COPY_BOARD_WORKFLOW],
'name' => 'Starter Workflow',
]);
$project->update(['project_template_id' => $template->id]);
$this->syncProjectPermissions($project, $user, ['edit']);
$this->actingAs($user)
@@ -41,7 +52,9 @@ class ProjectBoardSettingsControllerTest extends TestCase
->where('project.id', $project->id)
->where('backlogTicketStatuses.0.name', 'Backlog')
->where('boardColumns.0.name', 'Todo')
->where('ticketStatuses.0.name', 'Backlog'),
->where('ticketStatuses.0.name', 'Backlog')
->where('templateState.templateName', 'Starter Workflow')
->where('templateState.inheritedAreas.0.value', DuplicateProjectConfiguration::COPY_BOARD_WORKFLOW),
);
}