Hi @zaster
Do you need to login to see the http://127.0.0.1:8000/employee/quotations page?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
<?php
namespace Tests\Feature;
use App\Models\PreCost;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Livewire\Livewire;
use Tests\TestCase;
class PreCostFormTest extends TestCase
{
use RefreshDatabase;
/** @test */
public function employee_section_quotation_page_contains_livewire_component()
{
$this->get('/employee/quotations')
->assertSuccessful();
//->assertSeeLivewire('pre-cost-form');
}
gives this error
Response status code [302] is not a successful status code.
Failed asserting that false is true.
The Actual URL looks like this
Oke, then the 302 status make sense. You are not logged in in your test, so /employee/quotations will redirect to the login page.
You also need to login in the test.
Something like:
$this->be(User::factory()->create())
->get('/employee/quotations')
->assertSuccessful();
Please or to participate in this conversation.