dishplanner/tests/Browser/Dishes/EditDishTest.php

28 lines
748 B
PHP

<?php
use App\Models\Dish;
it('exposes the edit feature', function () {
$planner = createPlanner();
Dish::factory()->create(['planner_id' => $planner->id, 'name' => 'Test Dish']);
loginAs($planner, '/dishes')
->assertPathIs('/dishes')
->assertSee('MANAGE DISHES')
->assertSee('Edit');
});
it('shows the edit modal components', function () {
loginAndGoToDishes()
->assertSee('MANAGE DISHES')
->assertSee('Add Dish');
});
it('renders the dishes page structure', function () {
$planner = createPlanner();
Dish::factory()->create(['planner_id' => $planner->id, 'name' => 'Test Dish']);
loginAs($planner, '/dishes')
->assertSee('Edit')
->assertSee('Delete');
});