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>
28 lines
637 B
PHP
28 lines
637 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Exercise;
|
|
use App\Models\Workout;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\WorkoutExercise>
|
|
*/
|
|
class WorkoutExerciseFactory extends Factory
|
|
{
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'workout_id' => Workout::factory(),
|
|
'exercise_id' => Exercise::factory(),
|
|
'position' => 1,
|
|
'sets' => 3,
|
|
'reps' => 10,
|
|
'weight' => null,
|
|
'rest_seconds' => 60,
|
|
'notes' => null,
|
|
];
|
|
}
|
|
}
|