<?php

namespace Tests\Feature;

use Illuminate\Foundation\Testing\RefreshDatabase;
use App\Models\Setting;
use Tests\TestCase;

class PublicPagesTest extends TestCase
{
    use RefreshDatabase;

    public function test_public_sitemap_pages_load(): void
    {
        foreach ([
            '/',
            '/about-us',
            '/services',
            '/portfolio',
            '/pricing-plans',
            '/gts',
            '/contact-us',
            '/login',
        ] as $url) {
            $this->get($url)->assertOk();
        }
    }

    public function test_gts_landing_switch_hides_public_seller_page(): void
    {
        Setting::putMany(['gts_landing_enabled' => '0']);

        $this->get('/')->assertOk()->assertDontSee('Ghaffar Trusted Seller social service lane');
        $this->get('/gts')->assertNotFound();
    }
}
