feat(KAN-46): rebuild reusable project template management

This commit is contained in:
2026-09-16 07:01:03 +00:00
parent 5a10c85e61
commit 0941745883
12 changed files with 1322 additions and 500 deletions
@@ -163,6 +163,26 @@ class ProjectTemplateControllerTest extends TestCase
->assertNotFound();
}
public function test_unlinked_templates_can_be_updated_without_an_impact_confirmation(): void
{
$user = User::factory()->create();
$source = Project::factory()->create();
$template = ProjectTemplate::factory()->create([
'source_project_id' => $source->id,
]);
$this->syncGlobalPermissions($user, ['project:create']);
$this->actingAs($user)
->patch(route('project-templates.update', $template), [
'name' => 'Updated reusable template',
'copy_areas' => ['project_settings'],
])
->assertSessionHasNoErrors()
->assertRedirect(route('project-templates.index'));
$this->assertSame('Updated reusable template', $template->fresh()->name);
}
public function test_updating_a_template_requires_warning_acknowledgement_when_projects_are_linked(): void
{
$user = User::factory()->create();