Optimize academy
This commit is contained in:
@@ -631,6 +631,18 @@ final class AcademyAdminTest extends TestCase
|
||||
'risk_notes' => ['Climate icons may still be abstract'],
|
||||
],
|
||||
],
|
||||
'filled_examples' => [
|
||||
[
|
||||
'title' => 'Paris spring editorial poster',
|
||||
'description' => 'Filled example for a travel poster run.',
|
||||
'placeholder_values' => [
|
||||
'CITY_NAME' => 'Paris',
|
||||
'WEATHER_STYLE' => 'mild spring light',
|
||||
],
|
||||
'prompt' => 'Create a Paris travel poster with mild spring light and editorial composition.',
|
||||
'negative_prompt' => 'muddy weather, cluttered text',
|
||||
],
|
||||
],
|
||||
'difficulty' => 'intermediate',
|
||||
'access_level' => 'creator',
|
||||
'aspect_ratio' => '16:9',
|
||||
@@ -653,6 +665,9 @@ final class AcademyAdminTest extends TestCase
|
||||
$this->assertTrue((bool) ($prompt->helper_prompts[0]['active'] ?? false));
|
||||
$this->assertSame('Image-safe version', $prompt->prompt_variants[0]['title'] ?? null);
|
||||
$this->assertTrue((bool) ($prompt->prompt_variants[0]['recommended'] ?? false));
|
||||
$this->assertSame('Paris spring editorial poster', $prompt->filled_examples[0]['title'] ?? null);
|
||||
$this->assertSame('Paris', $prompt->filled_examples[0]['placeholder_values']['CITY_NAME'] ?? null);
|
||||
$this->assertSame('Create a Paris travel poster with mild spring light and editorial composition.', $prompt->filled_examples[0]['prompt'] ?? null);
|
||||
|
||||
$this->actingAs($admin)
|
||||
->get(route('admin.academy.prompts.edit', ['academyPromptTemplate' => $prompt]))
|
||||
@@ -703,6 +718,18 @@ final class AcademyAdminTest extends TestCase
|
||||
'risk_notes' => ['Climate icons may still be abstract'],
|
||||
'active' => true,
|
||||
],
|
||||
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES))
|
||||
->where('record.filled_examples', json_encode([
|
||||
[
|
||||
'title' => 'Paris spring editorial poster',
|
||||
'description' => 'Filled example for a travel poster run.',
|
||||
'placeholder_values' => [
|
||||
'CITY_NAME' => 'Paris',
|
||||
'WEATHER_STYLE' => 'mild spring light',
|
||||
],
|
||||
'prompt' => 'Create a Paris travel poster with mild spring light and editorial composition.',
|
||||
'negative_prompt' => 'muddy weather, cluttered text',
|
||||
],
|
||||
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user