Add feature test coverage for the core domain
Only Breeze's default auth/profile tests existed - nothing covered Workouts, Sessions, Exercises, Yoga, Favorites, Blog, or the Admin panel, which is the actual product. Adds factories for the domain models and 45 new feature tests covering the main flows plus authorization boundaries (owner-only access on workouts/sessions, admin-only access on /admin, drafts hidden from the public blog). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\YogaCategory;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\YogaPose>
|
||||
*/
|
||||
class YogaPoseFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
{
|
||||
$name = ucfirst(fake()->unique()->words(2, true)) . ' Pose';
|
||||
|
||||
return [
|
||||
'external_id' => fake()->unique()->numberBetween(1, 999999),
|
||||
'category_id' => YogaCategory::factory(),
|
||||
'slug' => Str::slug($name),
|
||||
'english_name' => $name,
|
||||
'sanskrit_name_adapted' => fake()->word(),
|
||||
'sanskrit_name' => fake()->word(),
|
||||
'translation_name' => fake()->word(),
|
||||
'description' => fake()->sentence(),
|
||||
'benefits' => fake()->sentence(),
|
||||
'url_svg' => null,
|
||||
'url_png' => null,
|
||||
'url_svg_alt' => null,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user