actingAs(User::factory(['is_admin' => true])->create()); livewire(ListQuotes::class)->assertSuccessful(); }); it('cannot render the list page if user isn\'t an admin', function () { $this->actingAs(User::factory()->create()); livewire(ListQuotes::class)->assertForbidden(); }); it('can create a quote using the form', function () { $this->actingAs(User::factory(['is_admin' => true])->create()); $customer = Customer::factory()->create(); $formData = [ 'customer_id' => $customer->id, 'date' => today(), 'notes' => 'Some note', ]; $this->livewire(CreateQuote::class) ->fillForm($formData) ->call('create') ->assertHasNoErrors(); $this->assertDatabaseHas('quotes', $formData); }); it('can add an embroidery entry to the quote using the form', function () {}); it('can add a screen printing entry to the quote using the form', function () {}); it('can add a heat transfer entry to the quote using the form', function () {});