user = User::factory()->create(); $this->team = Team::factory()->create(); $this->team->members()->attach($this->user->id, ['role' => 'owner']); InstanceSettings::unguarded(function () { InstanceSettings::query()->create([ 'id' => 0, 'is_registration_enabled' => true, ]); }); $this->actingAs($this->user); session(['currentTeam' => $this->team]); $this->server = Server::factory()->create(['team_id' => $this->team->id]); $this->destination = StandaloneDocker::query()->where('server_id', $this->server->id)->firstOrFail(); $this->project = Project::factory()->create(['team_id' => $this->team->id]); $this->environment = Environment::factory()->create(['project_id' => $this->project->id]); $this->application = Application::factory()->create([ 'environment_id' => $this->environment->id, 'destination_id' => $this->destination->id, 'destination_type' => $this->destination->getMorphClass(), 'name' => 'Navbar Menu App', 'status' => 'running', ]); }); test('an application page teleports its menu into the main sidebar ', function () { $response = $this->get(route('project.application.configuration', [ 'project_uuid' => $this->project->uuid, 'environment_uuid' => $this->environment->uuid, 'application_uuid' => $this->application->uuid, ])); $response->assertSuccessful(); $html = $response->getContent(); expect($html) ->toContain('id="main-nav-context-0"') ->toContain('x-teleport="#main-nav-context-0"') ->toContain('application-settings-navigation in-main-nav') ->toMatch('#