command: sed -n '1,260p' resources/views/layouts/app/header.blade.php

aggregated_output:
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="dark">
    <head>
        @include('partials.head')
    </head>
    <body class="min-h-screen bg-white dark:bg-zinc-800">
        <flux:header container class="border-b border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
            <flux:sidebar.toggle class="lg:hidden mr-2" icon="bars-2" inset="left" />

            <x-app-logo href="{{ route('dashboard') }}" wire:navigate />

            <flux:navbar class="-mb-px max-lg:hidden">
                <flux:navbar.item icon="layout-grid" :href="route('dashboard')" :current="request()->routeIs('dashboard')" wire:navigate>
                    {{ __('Dashboard') }}
                </flux:navbar.item>
            </flux:navbar>

            <flux:spacer />

            <flux:navbar class="me-1.5 space-x-0.5 rtl:space-x-reverse py-0!">
                <flux:tooltip :content="__('Search')" position="bottom">
                    <flux:navbar.item class="!h-10 [&>div>svg]:size-5" icon="magnifying-glass" href="#" :label="__('Search')" />
                </flux:tooltip>
                <flux:tooltip :content="__('Repository')" position="bottom">
                    <flux:navbar.item
                        class="h-10 max-lg:hidden [&>div>svg]:size-5"
                        icon="folder-git-2"
                        href="https://github.com/laravel/livewire-starter-kit"
                        target="_blank"
                        :label="__('Repository')"
                    />
                </flux:tooltip>
                <flux:tooltip :content="__('Documentation')" position="bottom">
                    <flux:navbar.item
                        class="h-10 max-lg:hidden [&>div>svg]:size-5"
                        icon="book-open-text"
                        href="https://laravel.com/docs/starter-kits#livewire"
                        target="_blank"
                        :label="__('Documentation')"
                    />
                </flux:tooltip>
            </flux:navbar>

            <x-desktop-user-menu />
        </flux:header>

        <!-- Mobile Menu -->
        <flux:sidebar collapsible="mobile" sticky class="lg:hidden border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
            <flux:sidebar.header>
                <x-app-logo :sidebar="true" href="{{ route('dashboard') }}" wire:navigate />
                <flux:sidebar.collapse class="in-data-flux-sidebar-on-desktop:not-in-data-flux-sidebar-collapsed-desktop:-mr-2" />
            </flux:sidebar.header>

            <flux:sidebar.nav>
                <flux:sidebar.group :heading="__('Platform')">
                    <flux:sidebar.item icon="layout-grid" :href="route('dashboard')" :current="request()->routeIs('dashboard')" wire:navigate>
                        {{ __('Dashboard')  }}
                    </flux:sidebar.item>
                </flux:sidebar.group>
            </flux:sidebar.nav>

            <flux:spacer />

            <flux:sidebar.nav>
                <flux:sidebar.item icon="folder-git-2" href="https://github.com/laravel/livewire-starter-kit" target="_blank">
                    {{ __('Repository') }}
                </flux:sidebar.item>
                <flux:sidebar.item icon="book-open-text" href="https://laravel.com/docs/starter-kits#livewire" target="_blank">
                    {{ __('Documentation') }}
                </flux:sidebar.item>
            </flux:sidebar.nav>
        </flux:sidebar>

        {{ $slot }}

        @fluxScripts
    </body>
</html>


command: sed -n '1,260p' resources/views/layouts/app/sidebar.blade.php

sidebar.blade.php

type: read

aggregated_output:
<!DOCTYPE html>
getLocale()) }}" class="dark">

        @include('partials.head')

        @php($logoutRoute = request()->routeIs('admin.*') ? route('admin.logout') : route('logout'))

        <flux:sidebar sticky collapsible="mobile" class="border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
            <flux:sidebar.header>
                <x-app-logo :sidebar="true" href="{{ route('admin.dashboard') }}" wire:navigate />
                <flux:sidebar.collapse class="lg:hidden" />
            </flux:sidebar.header>

            <flux:sidebar.nav>
                <flux:sidebar.group :heading="__('Platform')" class="grid">
                    <flux:sidebar.item icon="home" :href="route('admin.dashboard')" :current="request()->routeIs('admin.dashboard')" wire:navigate>
                        {{ __('Dashboard') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="chart-bar" :href="route('admin.analytics.index')" :current="request()->routeIs('admin.analytics.*')" wire:navigate>
                        {{ __('Analytics') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="squares-2x2" :href="route('admin.apps.index')" :current="request()->routeIs('admin.apps.*')" wire:navigate>
                        {{ __('Apps') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="code-bracket" :href="route('admin.developers.index')" :current="request()->routeIs('admin.developers.*')" wire:navigate>
                        {{ __('Developers') }}
                    </flux:sidebar.item>
                </flux:sidebar.group>

                <flux:sidebar.group :heading="__('Products')" class="grid">
                    <flux:sidebar.item icon="cube" :href="route('admin.products.index')" :current="request()->routeIs('admin.products.*')" wire:navigate>
                        {{ __('Products') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="rectangle-stack" :href="route('admin.collections.index')" :current="request()->routeIs('admin.collections.*')" wire:navigate>
                        {{ __('Collections') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="archive-box" :href="route('admin.inventory.index')" :current="request()->routeIs('admin.inventory.*')" wire:navigate>
                        {{ __('Inventory') }}
                    </flux:sidebar.item>
                </flux:sidebar.group>

                <flux:sidebar.group :heading="__('Operations')" class="grid">
                    <flux:sidebar.item icon="shopping-bag" :href="route('admin.orders.index')" :current="request()->routeIs('admin.orders.*')" wire:navigate>
                        {{ __('Orders') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="users" :href="route('admin.customers.index')" :current="request()->routeIs('admin.customers.*')" wire:navigate>
                        {{ __('Customers') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="tag" :href="route('admin.discounts.index')" :current="request()->routeIs('admin.discounts.*')" wire:navigate>
                        {{ __('Discounts') }}
                    </flux:sidebar.item>
                </flux:sidebar.group>

                <flux:sidebar.group :heading="__('Storefront')" class="grid">
                    <flux:sidebar.item icon="document-text" :href="route('admin.pages.index')" :current="request()->routeIs('admin.pages.*')" wire:navigate>
                        {{ __('Pages') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="bars-3" :href="route('admin.navigation.index')" :current="request()->routeIs('admin.navigation.*')" wire:navigate>
                        {{ __('Navigation') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="paint-brush" :href="route('admin.themes.index')" :current="request()->routeIs('admin.themes.*')" wire:navigate>
                        {{ __('Themes') }}
                    </flux:sidebar.item>
                </flux:sidebar.group>

                <flux:sidebar.group :heading="__('Configuration')" class="grid">
                    <flux:sidebar.item icon="cog-6-tooth" :href="route('admin.settings.index')" :current="request()->routeIs('admin.settings.*')" wire:navigate>
                        {{ __('Settings') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="magnifying-glass" :href="route('admin.search.settings')" :current="request()->routeIs('admin.search.*')" wire:navigate>
                        {{ __('Search') }}
                    </flux:sidebar.item>
                </flux:sidebar.group>
            </flux:sidebar.nav>

            <flux:spacer />

            <flux:sidebar.nav>
                <flux:sidebar.item icon="folder-git-2" href="https://github.com/laravel/livewire-starter-kit" target="_blank">
                    {{ __('Repository') }}
                </flux:sidebar.item>

                <flux:sidebar.item icon="book-open-text" href="https://laravel.com/docs/starter-kits#livewire" target="_blank">
                    {{ __('Documentation') }}
                </flux:sidebar.item>
            </flux:sidebar.nav>

            <x-desktop-user-menu class="hidden lg:block" :name="auth()->user()->name" />
        </flux:sidebar>

        <flux:header class="lg:hidden">
            <flux:sidebar.toggle class="lg:hidden" icon="bars-2" inset="left" />

            <flux:spacer />

            <flux:dropdown position="top" align="end">
                <flux:profile
                    :initials="auth()->user()->initials()"
                    icon-trailing="chevron-down"
                />

                <flux:menu>
                    <flux:menu.radio.group>

                                <flux:avatar
                                    :name="auth()->user()->name"
                                    :initials="auth()->user()->initials()"
                                />

                                    <flux:heading class="truncate">{{ auth()->user()->name }}</flux:heading>
                                    <flux:text class="truncate">{{ auth()->user()->email }}</flux:text>

                    </flux:menu.radio.group>

                    <flux:menu.separator />

                    <flux:menu.radio.group>
                        <flux:menu.item :href="route('profile.edit')" icon="cog" wire:navigate>
                            {{ __('Settings') }}
                        </flux:menu.item>
                    </flux:menu.radio.group>

                    <flux:menu.separator />

                    <form method="POST" action="{{ $logoutRoute }}" class="w-full">
                        @csrf
                        <flux:menu.item
                            as="button"
                            type="submit"
                            icon="arrow-right-start-on-rectangle"
                            class="w-full cursor-pointer"
                            data-test="logout-button"
                        >
                            {{ __('Log Out') }}
                        </flux:menu.item>
                    </form>
                </flux:menu>
            </flux:dropdown>
        </flux:header>

        {{ $slot }}

        @fluxScripts

status: completed


output:
Chunk ID: fe01ce
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 2001
Output:
<!DOCTYPE html>
getLocale()) }}" class="dark">

        @include('partials.head')

        @php($logoutRoute = request()->routeIs('admin.*') ? route('admin.logout') : route('logout'))

        <flux:sidebar sticky collapsible="mobile" class="border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
            <flux:sidebar.header>
                <x-app-logo :sidebar="true" href="{{ route('admin.dashboard') }}" wire:navigate />
                <flux:sidebar.collapse class="lg:hidden" />
            </flux:sidebar.header>

            <flux:sidebar.nav>
                <flux:sidebar.group :heading="__('Platform')" class="grid">
                    <flux:sidebar.item icon="home" :href="route('admin.dashboard')" :current="request()->routeIs('admin.dashboard')" wire:navigate>
                        {{ __('Dashboard') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="chart-bar" :href="route('admin.analytics.index')" :current="request()->routeIs('admin.analytics.*')" wire:navigate>
                        {{ __('Analytics') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="squares-2x2" :href="route('admin.apps.index')" :current="request()->routeIs('admin.apps.*')" wire:navigate>
                        {{ __('Apps') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="code-bracket" :href="route('admin.developers.index')" :current="request()->routeIs('admin.developers.*')" wire:navigate>
                        {{ __('Developers') }}
                    </flux:sidebar.item>
                </flux:sidebar.group>

                <flux:sidebar.group :heading="__('Products')" class="grid">
                    <flux:sidebar.item icon="cube" :href="route('admin.products.index')" :current="request()->routeIs('admin.products.*')" wire:navigate>
                        {{ __('Products') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="rectangle-stack" :href="route('admin.collections.index')" :current="request()->routeIs('admin.collections.*')" wire:navigate>
                        {{ __('Collections') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="archive-box" :href="route('admin.inventory.index')" :current="request()->routeIs('admin.inventory.*')" wire:navigate>
                        {{ __('Inventory') }}
                    </flux:sidebar.item>
                </flux:sidebar.group>

                <flux:sidebar.group :heading="__('Operations')" class="grid">
                    <flux:sidebar.item icon="shopping-bag" :href="route('admin.orders.index')" :current="request()->routeIs('admin.orders.*')" wire:navigate>
                        {{ __('Orders') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="users" :href="route('admin.customers.index')" :current="request()->routeIs('admin.customers.*')" wire:navigate>
                        {{ __('Customers') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="tag" :href="route('admin.discounts.index')" :current="request()->routeIs('admin.discounts.*')" wire:navigate>
                        {{ __('Discounts') }}
                    </flux:sidebar.item>
                </flux:sidebar.group>

                <flux:sidebar.group :heading="__('Storefront')" class="grid">
                    <flux:sidebar.item icon="document-text" :href="route('admin.pages.index')" :current="request()->routeIs('admin.pages.*')" wire:navigate>
                        {{ __('Pages') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="bars-3" :href="route('admin.navigation.index')" :current="request()->routeIs('admin.navigation.*')" wire:navigate>
                        {{ __('Navigation') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="paint-brush" :href="route('admin.themes.index')" :current="request()->routeIs('admin.themes.*')" wire:navigate>
                        {{ __('Themes') }}
                    </flux:sidebar.item>
                </flux:sidebar.group>

                <flux:sidebar.group :heading="__('Configuration')" class="grid">
                    <flux:sidebar.item icon="cog-6-tooth" :href="route('admin.settings.index')" :current="request()->routeIs('admin.settings.*')" wire:navigate>
                        {{ __('Settings') }}
                    </flux:sidebar.item>

                    <flux:sidebar.item icon="magnifying-glass" :href="route('admin.search.settings')" :current="request()->routeIs('admin.search.*')" wire:navigate>
                        {{ __('Search') }}
                    </flux:sidebar.item>
                </flux:sidebar.group>
            </flux:sidebar.nav>

            <flux:spacer />

            <flux:sidebar.nav>
                <flux:sidebar.item icon="folder-git-2" href="https://github.com/laravel/livewire-starter-kit" target="_blank">
                    {{ __('Repository') }}
                </flux:sidebar.item>

                <flux:sidebar.item icon="book-open-text" href="https://laravel.com/docs/starter-kits#livewire" target="_blank">
                    {{ __('Documentation') }}
                </flux:sidebar.item>
            </flux:sidebar.nav>

            <x-desktop-user-menu class="hidden lg:block" :name="auth()->user()->name" />
        </flux:sidebar>

        <flux:header class="lg:hidden">
            <flux:sidebar.toggle class="lg:hidden" icon="bars-2" inset="left" />

            <flux:spacer />

            <flux:dropdown position="top" align="end">
                <flux:profile
                    :initials="auth()->user()->initials()"
                    icon-trailing="chevron-down"
                />

                <flux:menu>
                    <flux:menu.radio.group>

                                <flux:avatar
                                    :name="auth()->user()->name"
                                    :initials="auth()->user()->initials()"
                                />

                                    <flux:heading class="truncate">{{ auth()->user()->name }}</flux:heading>
                                    <flux:text class="truncate">{{ auth()->user()->email }}</flux:text>

                    </flux:menu.radio.group>

                    <flux:menu.separator />

                    <flux:menu.radio.group>
                        <flux:menu.item :href="route('profile.edit')" icon="cog" wire:navigate>
                            {{ __('Settings') }}
                        </flux:menu.item>
                    </flux:menu.radio.group>

                    <flux:menu.separator />

                    <form method="POST" action="{{ $logoutRoute }}" class="w-full">
                        @csrf
                        <flux:menu.item
                            as="button"
                            type="submit"
                            icon="arrow-right-start-on-rectangle"
                            class="w-full cursor-pointer"
                            data-test="logout-button"
                        >
                            {{ __('Log Out') }}
                        </flux:menu.item>
                    </form>
                </flux:menu>
            </flux:dropdown>
        </flux:header>

        {{ $slot }}

        @fluxScripts


output:
Chunk ID: f88cb4
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 896
Output:
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="dark">
    <head>
        @include('partials.head')
    </head>
    <body class="min-h-screen bg-white dark:bg-zinc-800">
        <flux:header container class="border-b border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
            <flux:sidebar.toggle class="lg:hidden mr-2" icon="bars-2" inset="left" />

            <x-app-logo href="{{ route('dashboard') }}" wire:navigate />

            <flux:navbar class="-mb-px max-lg:hidden">
                <flux:navbar.item icon="layout-grid" :href="route('dashboard')" :current="request()->routeIs('dashboard')" wire:navigate>
                    {{ __('Dashboard') }}
                </flux:navbar.item>
            </flux:navbar>

            <flux:spacer />

            <flux:navbar class="me-1.5 space-x-0.5 rtl:space-x-reverse py-0!">
                <flux:tooltip :content="__('Search')" position="bottom">
                    <flux:navbar.item class="!h-10 [&>div>svg]:size-5" icon="magnifying-glass" href="#" :label="__('Search')" />
                </flux:tooltip>
                <flux:tooltip :content="__('Repository')" position="bottom">
                    <flux:navbar.item
                        class="h-10 max-lg:hidden [&>div>svg]:size-5"
                        icon="folder-git-2"
                        href="https://github.com/laravel/livewire-starter-kit"
                        target="_blank"
                        :label="__('Repository')"
                    />
                </flux:tooltip>
                <flux:tooltip :content="__('Documentation')" position="bottom">
                    <flux:navbar.item
                        class="h-10 max-lg:hidden [&>div>svg]:size-5"
                        icon="book-open-text"
                        href="https://laravel.com/docs/starter-kits#livewire"
                        target="_blank"
                        :label="__('Documentation')"
                    />
                </flux:tooltip>
            </flux:navbar>

            <x-desktop-user-menu />
        </flux:header>

        <!-- Mobile Menu -->
        <flux:sidebar collapsible="mobile" sticky class="lg:hidden border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
            <flux:sidebar.header>
                <x-app-logo :sidebar="true" href="{{ route('dashboard') }}" wire:navigate />
                <flux:sidebar.collapse class="in-data-flux-sidebar-on-desktop:not-in-data-flux-sidebar-collapsed-desktop:-mr-2" />
            </flux:sidebar.header>

            <flux:sidebar.nav>
                <flux:sidebar.group :heading="__('Platform')">
                    <flux:sidebar.item icon="layout-grid" :href="route('dashboard')" :current="request()->routeIs('dashboard')" wire:navigate>
                        {{ __('Dashboard')  }}
                    </flux:sidebar.item>
                </flux:sidebar.group>
            </flux:sidebar.nav>

            <flux:spacer />

            <flux:sidebar.nav>
                <flux:sidebar.item icon="folder-git-2" href="https://github.com/laravel/livewire-starter-kit" target="_blank">
                    {{ __('Repository') }}
                </flux:sidebar.item>
                <flux:sidebar.item icon="book-open-text" href="https://laravel.com/docs/starter-kits#livewire" target="_blank">
                    {{ __('Documentation') }}
                </flux:sidebar.item>
            </flux:sidebar.nav>
        </flux:sidebar>

        {{ $slot }}

        @fluxScripts
    </body>
</html>


command: sed -n '1,180p' tests/Browser/SmokeTest.php

SmokeTest.php

aggregated_output:
<?php

use App\Models\Collection as ProductCollection;
use App\Models\Page;
use App\Models\Product;
use App\Models\Store;
use App\Models\User;
use Database\Seeders\DatabaseSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

beforeEach(function (): void {
    $this->seed(DatabaseSeeder::class);
});

function browserSmokeStore(): Store
{
    return Store::query()->where('handle', 'acme-fashion')->firstOrFail();
}

function browserSmokeHost(): array
{
    return ['host' => 'shop.test'];
}

test('storefront core pages render without javascript errors', function (): void {
    $store = browserSmokeStore();
    $product = Product::withoutGlobalScopes()
        ->where('store_id', $store->getKey())
        ->where('status', 'active')
        ->firstOrFail();
    $collection = ProductCollection::withoutGlobalScopes()
        ->where('store_id', $store->getKey())
        ->where('status', 'active')
        ->firstOrFail();
    $page = Page::withoutGlobalScopes()
        ->where('store_id', $store->getKey())
        ->where('status', 'published')
        ->firstOrFail();

    $pages = visit([
        '/',
        '/collections',
        "/collections/{$collection->handle}",
        "/products/{$product->handle}",
        '/search?q=shirt',
        "/pages/{$page->handle}",
        '/cart',
    ], browserSmokeHost());

    $pages->assertNoJavaScriptErrors();

    [$home, $collections, $collectionPage, $productPage, $search, $contentPage, $cart] = $pages;

    $home->assertSee($store->name);
    $collections->assertSee('Collections');
    $collectionPage->assertSee($collection->title);
    $productPage->assertSee($product->title);
    $search->assertSee('Search');
    $contentPage->assertSee($page->title);
    $cart->assertSee('Cart');
});

test('admin core pages render for an authenticated store user', function (): void {
    $store = browserSmokeStore();
    $user = User::query()->where('email', 'admin@acme.test')->firstOrFail();

    $this->actingAs($user);
    $this->withSession(['current_store_id' => $store->getKey()]);

    $expected = [
        '/admin' => 'Dashboard',
        '/admin/analytics' => 'Analytics',
        '/admin/apps' => 'Apps',
        '/admin/developers' => 'Developers',
        '/admin/products' => 'Products',
        '/admin/collections' => 'Collections',
        '/admin/inventory' => 'Inventory',
        '/admin/orders' => 'Orders',
        '/admin/customers' => 'Customers',
        '/admin/discounts' => 'Discounts',
        '/admin/pages' => 'Pages',
        '/admin/navigation' => 'Navigation',
        '/admin/themes' => 'Themes',
        '/admin/settings' => 'Settings',
        '/admin/settings/shipping' => 'Shipping',
        '/admin/settings/taxes' => 'Taxes',
        '/admin/settings/checkout' => 'Checkout',
        '/admin/settings/notifications' => 'Notifications',
        '/admin/search/settings' => 'Search',
    ];

    $pages = visit(array_keys($expected), browserSmokeHost());

    $pages->assertNoJavaScriptErrors();

    foreach ($pages as $index => $page) {
        $page->assertSee(array_values($expected)[$index]);
    }
});

test('storefront account auth pages render without javascript errors', function (): void {
    $pages = visit([
        '/account/login',
        '/account/register',
        '/forgot-password',
        '/reset-password/test-token?email=customer@example.test',
        '/account/forgot-password',
        '/account/reset-password/test-token?email=customer@example.test',
    ], browserSmokeHost());

    $pages->assertNoJavaScriptErrors();

    [$login, $register, $forgotPassword, $resetPassword, $accountForgotPassword, $accountResetPassword] = $pages;

    $login->assertSee('Log in');
    $register->assertSee('Create an account');
    $forgotPassword->assertSee('Reset password');
    $resetPassword->assertSee('New password');
    $accountForgotPassword->assertSee('Reset password');
    $accountResetPassword->assertSee('New password');
});

test('storefront home renders on a mobile viewport', function (): void {
    $store = browserSmokeStore();

    visit('/', browserSmokeHost())
        ->on()
        ->mobile()
        ->assertSee($store->name)
        ->assertNoJavaScriptErrors();
});


output:
Chunk ID: 09b10f
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 1063
Output:
<?php

use App\Models\Collection as ProductCollection;
use App\Models\Page;
use App\Models\Product;
use App\Models\Store;
use App\Models\User;
use Database\Seeders\DatabaseSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

beforeEach(function (): void {
    $this->seed(DatabaseSeeder::class);
});

function browserSmokeStore(): Store
{
    return Store::query()->where('handle', 'acme-fashion')->firstOrFail();
}

function browserSmokeHost(): array
{
    return ['host' => 'shop.test'];
}

test('storefront core pages render without javascript errors', function (): void {
    $store = browserSmokeStore();
    $product = Product::withoutGlobalScopes()
        ->where('store_id', $store->getKey())
        ->where('status', 'active')
        ->firstOrFail();
    $collection = ProductCollection::withoutGlobalScopes()
        ->where('store_id', $store->getKey())
        ->where('status', 'active')
        ->firstOrFail();
    $page = Page::withoutGlobalScopes()
        ->where('store_id', $store->getKey())
        ->where('status', 'published')
        ->firstOrFail();

    $pages = visit([
        '/',
        '/collections',
        "/collections/{$collection->handle}",
        "/products/{$product->handle}",
        '/search?q=shirt',
        "/pages/{$page->handle}",
        '/cart',
    ], browserSmokeHost());

    $pages->assertNoJavaScriptErrors();

    [$home, $collections, $collectionPage, $productPage, $search, $contentPage, $cart] = $pages;

    $home->assertSee($store->name);
    $collections->assertSee('Collections');
    $collectionPage->assertSee($collection->title);
    $productPage->assertSee($product->title);
    $search->assertSee('Search');
    $contentPage->assertSee($page->title);
    $cart->assertSee('Cart');
});

test('admin core pages render for an authenticated store user', function (): void {
    $store = browserSmokeStore();
    $user = User::query()->where('email', 'admin@acme.test')->firstOrFail();

    $this->actingAs($user);
    $this->withSession(['current_store_id' => $store->getKey()]);

    $expected = [
        '/admin' => 'Dashboard',
        '/admin/analytics' => 'Analytics',
        '/admin/apps' => 'Apps',
        '/admin/developers' => 'Developers',
        '/admin/products' => 'Products',
        '/admin/collections' => 'Collections',
        '/admin/inventory' => 'Inventory',
        '/admin/orders' => 'Orders',
        '/admin/customers' => 'Customers',
        '/admin/discounts' => 'Discounts',
        '/admin/pages' => 'Pages',
        '/admin/navigation' => 'Navigation',
        '/admin/themes' => 'Themes',
        '/admin/settings' => 'Settings',
        '/admin/settings/shipping' => 'Shipping',
        '/admin/settings/taxes' => 'Taxes',
        '/admin/settings/checkout' => 'Checkout',
        '/admin/settings/notifications' => 'Notifications',
        '/admin/search/settings' => 'Search',
    ];

    $pages = visit(array_keys($expected), browserSmokeHost());

    $pages->assertNoJavaScriptErrors();

    foreach ($pages as $index => $page) {
        $page->assertSee(array_values($expected)[$index]);
    }
});

test('storefront account auth pages render without javascript errors', function (): void {
    $pages = visit([
        '/account/login',
        '/account/register',
        '/forgot-password',
        '/reset-password/test-token?email=customer@example.test',
        '/account/forgot-password',
        '/account/reset-password/test-token?email=customer@example.test',
    ], browserSmokeHost());

    $pages->assertNoJavaScriptErrors();

    [$login, $register, $forgotPassword, $resetPassword, $accountForgotPassword, $accountResetPassword] = $pages;

    $login->assertSee('Log in');
    $register->assertSee('Create an account');
    $forgotPassword->assertSee('Reset password');
    $resetPassword->assertSee('New password');
    $accountForgotPassword->assertSee('Reset password');
    $accountResetPassword->assertSee('New password');
});

test('storefront home renders on a mobile viewport', function (): void {
    $store = browserSmokeStore();

    visit('/', browserSmokeHost())
        ->on()
        ->mobile()
        ->assertSee($store->name)
        ->assertNoJavaScriptErrors();
});


command: rg -n "assertVisible|assertPresent|assertButtonEnabled|assertButtonDisabled" vendor/pestphp/pest-plugin-browser/src tests/Browser -g '*.php'

type: search

cmd: rg -n 'assertVisible|assertPresent|assertButtonEnabled|assertButtonDisabled' vendor/pestphp/pest-plugin-browser/src tests/Browser -g '*.php'

query: assertVisible|assertPresent|assertButtonEnabled|assertButtonDisabled

path: pest-plugin-browser

aggregated_output:
tests/Browser/Storefront/BrowsingTest.php:76:        ->assertPresent('.line-through')
tests/Browser/Storefront/BrowsingTest.php:109:        ->assertButtonDisabled('button:has-text("Sold out")')
tests/Browser/Storefront/BrowsingTest.php:119:        ->assertButtonEnabled('button:has-text("Add to cart")')
tests/Browser/Storefront/CheckoutTest.php:209:        ->assertButtonDisabled('main button:has-text("Checkout")')
tests/Browser/Storefront/InventoryTest.php:64:        ->assertButtonDisabled('button:has-text("Sold out")')
tests/Browser/Storefront/InventoryTest.php:85:        ->assertButtonEnabled('button:has-text("Add to cart")')
vendor/pestphp/pest-plugin-browser/src/Api/Concerns/MakesElementAssertions.php:497:    public function assertVisible(string $selector): Webpage
vendor/pestphp/pest-plugin-browser/src/Api/Concerns/MakesElementAssertions.php:509:    public function assertPresent(string $selector): Webpage
vendor/pestphp/pest-plugin-browser/src/Api/Concerns/MakesElementAssertions.php:563:    public function assertButtonEnabled(string $button): Webpage
vendor/pestphp/pest-plugin-browser/src/Api/Concerns/MakesElementAssertions.php:575:    public function assertButtonDisabled(string $button): Webpage


command: rg -n "collections|filter|Classic Cotton|Add to cart|cart.show|checkout" tests/Browser/Storefront resources/views/livewire/storefront -g '*.php' -g '*.blade.php'

type: search

cmd: rg -n 'collections|filter|Classic Cotton|Add to cart|cart.show|checkout' tests/Browser/Storefront resources/views/livewire/storefront -g '*.php' -g '*.blade.php'

query: collections|filter|Classic Cotton|Add to cart|cart.show|checkout

path: Storefront

aggregated_output:
tests/Browser/Storefront/TenantIsolationTest.php:105:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/TenantIsolationTest.php:111:test('storefront collections only contain current store products', function (): void {
tests/Browser/Storefront/TenantIsolationTest.php:112:    visit('/collections/t-shirts', tenantIsolationHost())
tests/Browser/Storefront/TenantIsolationTest.php:114:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/TenantIsolationTest.php:140:        ->assertSee('Classic Cotton T-Shirt')
resources/views/livewire/storefront/home.blade.php:14:                    <flux:button :href="data_get($hero, 'primary_url', '/collections')" wire:navigate variant="primary">{{ data_get($hero, 'primary_label', 'Shop') }}</flux:button>
resources/views/livewire/storefront/home.blade.php:15:                    <flux:button :href="data_get($hero, 'secondary_url', '/collections')" wire:navigate variant="ghost">{{ data_get($hero, 'secondary_label', 'View collections') }}</flux:button>
resources/views/livewire/storefront/home.blade.php:32:
Featured collections

resources/views/livewire/storefront/home.blade.php:35:            All collections
resources/views/livewire/storefront/home.blade.php:40:                handle) }}" class="group rounded-lg border border-zinc-200 bg-white p-5 transition hover:border-zinc-300 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700" wire:navigate wire:key="home-collection-{{ $collection->getKey() }}">
tests/Browser/Storefront/BrowsingTest.php:27:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/BrowsingTest.php:33:    visit('/collections/t-shirts', storefrontBrowsingHost())
tests/Browser/Storefront/BrowsingTest.php:35:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/BrowsingTest.php:40:    visit('/collections/t-shirts', storefrontBrowsingHost())
tests/Browser/Storefront/BrowsingTest.php:44:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/BrowsingTest.php:46:        ->assertSee('Add to cart')
tests/Browser/Storefront/BrowsingTest.php:52:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/BrowsingTest.php:82:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/BrowsingTest.php:92:test('does not show draft products on storefront collections', function (): void {
tests/Browser/Storefront/BrowsingTest.php:93:    visit('/collections', storefrontBrowsingHost())
tests/Browser/Storefront/BrowsingTest.php:110:        ->assertDontSee('Add to cart')
tests/Browser/Storefront/BrowsingTest.php:118:        ->assertSee('Add to cart')
tests/Browser/Storefront/BrowsingTest.php:119:        ->assertButtonEnabled('button:has-text("Add to cart")')
tests/Browser/Storefront/BrowsingTest.php:124:    visit('/collections/new-arrivals', storefrontBrowsingHost())
tests/Browser/Storefront/BrowsingTest.php:137:        ->hover('nav[aria-label="Main navigation"] a[href$="/collections"]')
tests/Browser/Storefront/BrowsingTest.php:138:        ->click('nav[aria-label="Main navigation"] a[href$="/collections/t-shirts"]')
tests/Browser/Storefront/BrowsingTest.php:140:        ->assertPathIs('/collections/t-shirts')
tests/Browser/Storefront/CartTest.php:31:        ->click('Add to cart')
tests/Browser/Storefront/CartTest.php:41:        ->assertSee('Classic Cotton T-Shirt');
tests/Browser/Storefront/CartTest.php:56:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/CartTest.php:69:        ->click('main button[aria-label="Increase Classic Cotton T-Shirt quantity"]')
tests/Browser/Storefront/CartTest.php:78:        ->click('main button[aria-label="Remove Classic Cotton T-Shirt"]')
tests/Browser/Storefront/CartTest.php:88:        ->click('Add to cart')
tests/Browser/Storefront/CartTest.php:92:        ->assertSee('Classic Cotton T-Shirt')
resources/views/livewire/storefront/collections/show.blade.php:3:        ['label' => 'Collections', 'url' => route('collections.index')],
resources/views/livewire/storefront/collections/show.blade.php:36:                            <flux:checkbox wire:model.live="types" value="{{ $type }}" :label="$type" wire:key="type-filter-{{ $type }}" />
resources/views/livewire/storefront/collections/show.blade.php:45:                            <flux:checkbox wire:model.live="vendors" value="{{ $vendor }}" :label="$vendor" wire:key="vendor-filter-{{ $vendor }}" />
resources/views/livewire/storefront/collections/show.blade.php:69:
Try adjusting your filters or browse another collection.

resources/views/livewire/storefront/collections/show.blade.php:70:                        <flux:b…2468 chars truncated…/Storefront/InventoryTest.php:117:        ->click('main button[aria-label="Increase Classic Cotton T-Shirt quantity"]')
tests/Browser/Storefront/InventoryTest.php:120:        ->click('main button[aria-label="Increase Classic Cotton T-Shirt quantity"]')
resources/views/livewire/storefront/search/index.blade.php:38:                            <flux:checkbox wire:model.live="types" value="{{ $type }}" :label="$type" wire:key="search-type-filter-{{ $type }}" />
resources/views/livewire/storefront/search/index.blade.php:47:                            <flux:checkbox wire:model.live="vendors" value="{{ $vendor }}" :label="$vendor" wire:key="search-vendor-filter-{{ $vendor }}" />
resources/views/livewire/storefront/search/index.blade.php:71:
Try another search term or adjust your filters.

resources/views/livewire/storefront/search/index.blade.php:72:                        <flux:button wire:click="clearFilters" variant="ghost">Clear filters</flux:button>
resources/views/livewire/storefront/account/orders/index.blade.php:11:
Review orders and manage saved checkout details.

resources/views/livewire/storefront/account/orders/index.blade.php:64:                    <flux:button :href="route('collections.index')" wire:navigate variant="primary" class="mt-6">
resources/views/livewire/storefront/account/addresses/index.blade.php:11:
Saved shipping details for faster checkout.

resources/views/livewire/storefront/checkout/show.blade.php:3:        ['label' => 'Cart', 'url' => route('cart.show')],
resources/views/livewire/storefront/checkout/show.blade.php:29:                    <flux:button :href="route('collections.index')" wire:navigate variant="primary" class="mt-6">
resources/views/livewire/storefront/checkout/show.blade.php:41:                        @if ($checkout?->status !== \App\Enums\CheckoutStatus::Started)
resources/views/livewire/storefront/checkout/show.blade.php:107:                        @if ($checkout?->status === \App\Enums\CheckoutStatus::ShippingSelected || $checkout?->status === \App\Enums\CheckoutStatus::PaymentSelected)
resources/views/livewire/storefront/checkout/show.blade.php:159:                        @if ($checkout?->status === \App\Enums\CheckoutStatus::PaymentSelected)
resources/views/livewire/storefront/checkout/show.blade.php:223:
getKey() }}">
resources/views/livewire/storefront/checkout/show.blade.php:244:                        @if ($checkout?->discount_code)
resources/views/livewire/storefront/checkout/show.blade.php:245:                            {{ $checkout->discount_code }}
resources/views/livewire/storefront/checkout/confirmation.blade.php:11:        ['label' => 'Cart', 'url' => route('cart.show')],
resources/views/livewire/storefront/checkout/confirmation.blade.php:12:        ['label' => 'Checkout', 'url' => route('checkout.show')],
resources/views/livewire/storefront/checkout/confirmation.blade.php:101:            <flux:button :href="route('collections.index')" wire:navigate variant="primary" class="mt-6 w-full">
resources/views/livewire/storefront/account/auth/register.blade.php:2:    <x-auth-header :title="__('Create an account')" :description="__('Save your details for faster checkout')" />
resources/views/livewire/storefront/cart-drawer.blade.php:9:            <flux:button :href="route('cart.show')" wire:navigate variant="subtle" size="sm" icon="shopping-bag">
resources/views/livewire/storefront/cart-drawer.blade.php:18:                <flux:button :href="route('collections.index')" wire:navigate variant="primary" class="mt-5">
resources/views/livewire/storefront/cart-drawer.blade.php:64:                <flux:button wire:click="checkout" variant="primary" class="w-full">
resources/views/livewire/storefront/cart/show.blade.php:12:                <flux:button :href="route('collections.index')" wire:navigate variant="ghost" icon="arrow-left">
resources/views/livewire/storefront/cart/show.blade.php:25:                    <flux:button :href="route('collections.index')" wire:navigate variant="primary" class="mt-6">
resources/views/livewire/storefront/cart/show.blade.php:167:            <flux:button wire:click="checkout" variant="primary" class="mt-6 w-full" :disabled="$lineCount === 0">
resources/views/livewire/storefront/products/show.blade.php:3:        ['label' => $product->collections->first()?->title ?? 'Products', 'url' => $product->collections->first() ? route('collections.show', $product->collections->first()->handle) : route('collections.index')],
resources/views/livewire/storefront/products/show.blade.php:70:                    {{ $this->canAddToCart() ? 'Add to cart' : 'Sold out' }}


output:
Chunk ID: a96d2a
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 3117
Output:
tests/Browser/Storefront/TenantIsolationTest.php:105:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/TenantIsolationTest.php:111:test('storefront collections only contain current store products', function (): void {
tests/Browser/Storefront/TenantIsolationTest.php:112:    visit('/collections/t-shirts', tenantIsolationHost())
tests/Browser/Storefront/TenantIsolationTest.php:114:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/TenantIsolationTest.php:140:        ->assertSee('Classic Cotton T-Shirt')
resources/views/livewire/storefront/home.blade.php:14:                    <flux:button :href="data_get($hero, 'primary_url', '/collections')" wire:navigate variant="primary">{{ data_get($hero, 'primary_label', 'Shop') }}</flux:button>
resources/views/livewire/storefront/home.blade.php:15:                    <flux:button :href="data_get($hero, 'secondary_url', '/collections')" wire:navigate variant="ghost">{{ data_get($hero, 'secondary_label', 'View collections') }}</flux:button>
resources/views/livewire/storefront/home.blade.php:32:
Featured collections

resources/views/livewire/storefront/home.blade.php:35:            All collections
resources/views/livewire/storefront/home.blade.php:40:                handle) }}" class="group rounded-lg border border-zinc-200 bg-white p-5 transition hover:border-zinc-300 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700" wire:navigate wire:key="home-collection-{{ $collection->getKey() }}">
tests/Browser/Storefront/BrowsingTest.php:27:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/BrowsingTest.php:33:    visit('/collections/t-shirts', storefrontBrowsingHost())
tests/Browser/Storefront/BrowsingTest.php:35:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/BrowsingTest.php:40:    visit('/collections/t-shirts', storefrontBrowsingHost())
tests/Browser/Storefront/BrowsingTest.php:44:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/BrowsingTest.php:46:        ->assertSee('Add to cart')
tests/Browser/Storefront/BrowsingTest.php:52:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/BrowsingTest.php:82:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/BrowsingTest.php:92:test('does not show draft products on storefront collections', function (): void {
tests/Browser/Storefront/BrowsingTest.php:93:    visit('/collections', storefrontBrowsingHost())
tests/Browser/Storefront/BrowsingTest.php:110:        ->assertDontSee('Add to cart')
tests/Browser/Storefront/BrowsingTest.php:118:        ->assertSee('Add to cart')
tests/Browser/Storefront/BrowsingTest.php:119:        ->assertButtonEnabled('button:has-text("Add to cart")')
tests/Browser/Storefront/BrowsingTest.php:124:    visit('/collections/new-arrivals', storefrontBrowsingHost())
tests/Browser/Storefront/BrowsingTest.php:137:        ->hover('nav[aria-label="Main navigation"] a[href$="/collections"]')
tests/Browser/Storefront/BrowsingTest.php:138:        ->click('nav[aria-label="Main navigation"] a[href$="/collections/t-shirts"]')
tests/Browser/Storefront/BrowsingTest.php:140:        ->assertPathIs('/collections/t-shirts')
tests/Browser/Storefront/CartTest.php:31:        ->click('Add to cart')
tests/Browser/Storefront/CartTest.php:41:        ->assertSee('Classic Cotton T-Shirt');
tests/Browser/Storefront/CartTest.php:56:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/CartTest.php:69:        ->click('main button[aria-label="Increase Classic Cotton T-Shirt quantity"]')
tests/Browser/Storefront/CartTest.php:78:        ->click('main button[aria-label="Remove Classic Cotton T-Shirt"]')
tests/Browser/Storefront/CartTest.php:88:        ->click('Add to cart')
tests/Browser/Storefront/CartTest.php:92:        ->assertSee('Classic Cotton T-Shirt')
resources/views/livewire/storefront/collections/show.blade.php:3:        ['label' => 'Collections', 'url' => route('collections.index')],
resources/views/livewire/storefront/collections/show.blade.php:36:                            <flux:checkbox wire:model.live="types" value="{{ $type }}" :label="$type" wire:key="type-filter-{{ $type }}" />
resources/views/livewire/storefront/collections/show.blade.php:45:                            <flux:checkbox wire:model.live="vendors" value="{{ $vendor }}" :label="$vendor" wire:key="vendor-filter-{{ $vendor }}" />
resources/views/livewire/storefront/collections/show.blade.php:69:
Try adjusting your filters or browse another collection.

resources/views/livewire/storefront/collections/show.blade.php:70:                        <flux:button wire:click="clearFilters" variant="ghost">Clear filters</flux:button>
tests/Browser/Storefront/CheckoutTest.php:31:        ->click('Add to cart')
tests/Browser/Storefront/CheckoutTest.php:37:        ->assertPathIs('/checkout')
tests/Browser/Storefront/CheckoutTest.php:109:        ->click('Add to cart')
tests/Browser/Storefront/CheckoutTest.php:118:test('completes full checkout with credit card', function (): void {
tests/Browser/Storefront/CheckoutTest.php:123:        ->assertPathBeginsWith('/checkout/confirmation')
tests/Browser/Storefront/CheckoutTest.php:159:test('applies discount during checkout', function (): void {
tests/Browser/Storefront/CheckoutTest.php:164:        ->assertPathIs('/checkout');
tests/Browser/Storefront/CheckoutTest.php:206:test('prevents checkout with empty cart', function (): void {
tests/Browser/Storefront/CheckoutTest.php:213:test('completes checkout with paypal', function (): void {
tests/Browser/Storefront/CheckoutTest.php:220:        ->assertPathBeginsWith('/checkout/confirmation')
tests/Browser/Storefront/CheckoutTest.php:226:test('completes checkout with bank transfer', function (): void {
tests/Browser/Storefront/CheckoutTest.php:233:        ->assertPathBeginsWith('/checkout/confirmation')
tests/Browser/Storefront/CheckoutTest.php:250:        ->assertPathIs('/checkout')
tests/Browser/Storefront/CheckoutTest.php:263:        ->assertPathIs('/checkout')
tests/Browser/Storefront/CustomerAccountTest.php:86:                'title_snapshot' => 'Classic Cotton T-Shirt',
resources/views/livewire/storefront/collections/index.blade.php:10:        @foreach ($collections as $collection)
resources/views/livewire/storefront/collections/index.blade.php:11:            handle) }}" class="group rounded-lg border border-zinc-200 bg-white p-5 transition hover:border-zinc-300 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700" wire:navigate wire:key="collection-index-{{ $collection->getKey() }}">
tests/Browser/Storefront/InventoryTest.php:65:        ->assertDontSee('Add to cart')
tests/Browser/Storefront/InventoryTest.php:73:        ->click('Add to cart')
tests/Browser/Storefront/InventoryTest.php:83:        ->assertSee('Classic Cotton T-Shirt')
tests/Browser/Storefront/InventoryTest.php:85:        ->assertButtonEnabled('button:has-text("Add to cart")')
tests/Browser/Storefront/InventoryTest.php:113:        ->click('Add to cart')
tests/Browser/Storefront/InventoryTest.php:117:        ->click('main button[aria-label="Increase Classic Cotton T-Shirt quantity"]')
tests/Browser/Storefront/InventoryTest.php:120:        ->click('main button[aria-label="Increase Classic Cotton T-Shirt quantity"]')
resources/views/livewire/storefront/search/index.blade.php:38:                            <flux:checkbox wire:model.live="types" value="{{ $type }}" :label="$type" wire:key="search-type-filter-{{ $type }}" />
resources/views/livewire/storefront/search/index.blade.php:47:                            <flux:checkbox wire:model.live="vendors" value="{{ $vendor }}" :label="$vendor" wire:key="search-vendor-filter-{{ $vendor }}" />
resources/views/livewire/storefront/search/index.blade.php:71:
Try another search term or adjust your filters.

resources/views/livewire/storefront/search/index.blade.php:72:                        <flux:button wire:click="clearFilters" variant="ghost">Clear filters</flux:button>
resources/views/livewire/storefront/account/orders/index.blade.php:11:
Review orders and manage saved checkout details.

resources/views/livewire/storefront/account/orders/index.blade.php:64:                    <flux:button :href="route('collections.index')" wire:navigate variant="primary" class="mt-6">
resources/views/livewire/storefront/account/addresses/index.blade.php:11:
Saved shipping details for faster checkout.

resources/views/livewire/storefront/checkout/show.blade.php:3:        ['label' => 'Cart', 'url' => route('cart.show')],
resources/views/livewire/storefront/checkout/show.blade.php:29:                    <flux:button :href="route('collections.index')" wire:navigate variant="primary" class="mt-6">
resources/views/livewire/storefront/checkout/show.blade.php:41:                        @if ($checkout?->status !== \App\Enums\CheckoutStatus::Started)
resources/views/livewire/storefront/checkout/show.blade.php:107:                        @if ($checkout?->status === \App\Enums\CheckoutStatus::ShippingSelected || $checkout?->status === \App\Enums\CheckoutStatus::PaymentSelected)
resources/views/livewire/storefront/checkout/show.blade.php:159:                        @if ($checkout?->status === \App\Enums\CheckoutStatus::PaymentSelected)
resources/views/livewire/storefront/checkout/show.blade.php:223:
getKey() }}">
resources/views/livewire/storefront/checkout/show.blade.php:244:                        @if ($checkout?->discount_code)
resources/views/livewire/storefront/checkout/show.blade.php:245:                            {{ $checkout->discount_code }}
resources/views/livewire/storefront/checkout/confirmation.blade.php:11:        ['label' => 'Cart', 'url' => route('cart.show')],
resources/views/livewire/storefront/checkout/confirmation.blade.php:12:        ['label' => 'Checkout', 'url' => route('checkout.show')],
resources/views/livewire/storefront/checkout/confirmation.blade.php:101:            <flux:button :href="route('collections.index')" wire:navigate variant="primary" class="mt-6 w-full">
resources/views/livewire/storefront/account/auth/register.blade.php:2:    <x-auth-header :title="__('Create an account')" :description="__('Save your details for faster checkout')" />
resources/views/livewire/storefront/cart-drawer.blade.php:9:            <flux:button :href="route('cart.show')" wire:navigate variant="subtle" size="sm" icon="shopping-bag">
resources/views/livewire/storefront/cart-drawer.blade.php:18:                <flux:button :href="route('collections.index')" wire:navigate variant="primary" class="mt-5">
resources/views/livewire/storefront/cart-drawer.blade.php:64:                <flux:button wire:click="checkout" variant="primary" class="w-full">
resources/views/livewire/storefront/cart/show.blade.php:12:                <flux:button :href="route('collections.index')" wire:navigate variant="ghost" icon="arrow-left">
resources/views/livewire/storefront/cart/show.blade.php:25:                    <flux:button :href="route('collections.index')" wire:navigate variant="primary" class="mt-6">
resources/views/livewire/storefront/cart/show.blade.php:167:            <flux:button wire:click="checkout" variant="primary" class="mt-6 w-full" :disabled="$lineCount === 0">
resources/views/livewire/storefront/products/show.blade.php:3:        ['label' => $product->collections->first()?->title ?? 'Products', 'url' => $product->collections->first() ? route('collections.show', $product->collections->first()->handle) : route('collections.index')],
resources/views/livewire/storefront/products/show.blade.php:70:                    {{ $this->canAddToCart() ? 'Add to cart' : 'Sold out' }}


output:
Chunk ID: 4ad2ee
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 305
Output:
tests/Browser/Storefront/BrowsingTest.php:76:        ->assertPresent('.line-through')
tests/Browser/Storefront/BrowsingTest.php:109:        ->assertButtonDisabled('button:has-text("Sold out")')
tests/Browser/Storefront/BrowsingTest.php:119:        ->assertButtonEnabled('button:has-text("Add to cart")')
tests/Browser/Storefront/CheckoutTest.php:209:        ->assertButtonDisabled('main button:has-text("Checkout")')
tests/Browser/Storefront/InventoryTest.php:64:        ->assertButtonDisabled('button:has-text("Sold out")')
tests/Browser/Storefront/InventoryTest.php:85:        ->assertButtonEnabled('button:has-text("Add to cart")')
vendor/pestphp/pest-plugin-browser/src/Api/Concerns/MakesElementAssertions.php:497:    public function assertVisible(string $selector): Webpage
vendor/pestphp/pest-plugin-browser/src/Api/Concerns/MakesElementAssertions.php:509:    public function assertPresent(string $selector): Webpage
vendor/pestphp/pest-plugin-browser/src/Api/Concerns/MakesElementAssertions.php:563:    public function assertButtonEnabled(string $button): Webpage
vendor/pestphp/pest-plugin-browser/src/Api/Concerns/MakesElementAssertions.php:575:    public function assertButtonDisabled(string $button): Webpage


command: rg -n "test\(" tests/Browser/Storefront -g '*.php'

type: search

cmd: rg -n "test\\(" tests/Browser/Storefront -g '*.php'

query: test\(

path: Storefront

aggregated_output:
tests/Browser/Storefront/TenantIsolationTest.php:102:test('storefront only shows current store products', function (): void {
tests/Browser/Storefront/TenantIsolationTest.php:111:test('storefront collections only contain current store products', function (): void {
tests/Browser/Storefront/TenantIsolationTest.php:120:test('admin cannot see other store products or orders', function (): void {
tests/Browser/Storefront/TenantIsolationTest.php:138:test('search only returns current store products', function (): void {
tests/Browser/Storefront/TenantIsolationTest.php:150:test('customer accounts are scoped to their store', function (): void {
tests/Browser/Storefront/BrowsingTest.php:24:test('shows featured products on home page', function (): void {
tests/Browser/Storefront/BrowsingTest.php:32:test('shows collection with product grid', function (): void {
tests/Browser/Storefront/BrowsingTest.php:39:test('can navigate from collection to product', function (): void {
tests/Browser/Storefront/BrowsingTest.php:50:test('shows product detail with variant options', function (): void {
tests/Browser/Storefront/BrowsingTest.php:59:test('shows size and color option values', function (): void {
tests/Browser/Storefront/BrowsingTest.php:71:test('shows sale and compare at pricing for sale product', function (): void {
tests/Browser/Storefront/BrowsingTest.php:80:test('shows search results for valid query', function (): void {
tests/Browser/Storefront/BrowsingTest.php:86:test('shows no results message for invalid query', function (): void {
tests/Browser/Storefront/BrowsingTest.php:92:test('does not show draft products on storefront collections', function (): void {
tests/Browser/Storefront/BrowsingTest.php:98:test('does not show draft products in search results', function (): void {
tests/Browser/Storefront/BrowsingTest.php:104:test('shows out of stock messaging for deny policy product', function (): void {
tests/Browser/Storefront/BrowsingTest.php:114:test('shows backorder messaging for continue policy product', function (): void {
tests/Browser/Storefront/BrowsingTest.php:123:test('shows new arrivals collection', function (): void {
tests/Browser/Storefront/BrowsingTest.php:129:test('shows static about page', function (): void {
tests/Browser/Storefront/BrowsingTest.php:135:test('navigates between pages using the main navigation', function (): void {
tests/Browser/Storefront/CartTest.php:52:test('can add product to cart', function (): void {
tests/Browser/Storefront/CartTest.php:61:test('can view cart with added item', function (): void {
tests/Browser/Storefront/CartTest.php:67:test('can update quantity in cart', function (): void {
tests/Browser/Storefront/CartTest.php:76:test('can remove item from cart', function (): void {
tests/Browser/Storefront/CartTest.php:84:test('can add multiple different products', function (): void {
tests/Browser/Storefront/CartTest.php:97:test('can apply valid discount code welcome ten', function (): void {
tests/Browser/Storefront/CartTest.php:105:test('shows error for invalid discount code', function (): void {
tests/Browser/Storefront/CartTest.php:111:test('shows error for expired discount code', function (): void {
tests/Browser/Storefront/CartTest.php:117:test('shows error for maxed out discount code', function (): void {
tests/Browser/Storefront/CartTest.php:123:test('can apply free shipping discount', function (): void {
tests/Browser/Storefront/CartTest.php:130:test('can apply flat five discount for fixed amount off', function (): void {
tests/Browser/Storefront/CartTest.php:137:test('shows subtotal and total in cart', function (): void {
tests/Browser/Storefront/CheckoutTest.php:118:test('completes full checkout with credit card', function (): void {
tests/Browser/Storefront/CheckoutTest.php:129:test('shows shipping methods based on german address', function (): void {
tests/Browser/Storefront/CheckoutTest.php:144:test('shows international shipping methods for non german address', function (): void {
tests/Browser/Storefront/CheckoutTest.php:159:test('applies discount during checkout', function (): void {
tests/Browser/Storefront/CheckoutTest.php:177:test('validates required contact email', function (): void {
tests/Browser/Storefront/CheckoutTest.php:185:test('validates required shipping address fields', function (): void {
tests/Browser/Storefront/CheckoutTest.php:198:test('validates invalid postal code format', function (): void {
tests/Browser/Storefront/CheckoutTest.php:206:test('prevents checkout with empty cart', function (): void {
tests/Browser/Storefront/CheckoutTest.php:213:test('completes checkout with paypal', function (): void {
tests/Browser/Storefront/CheckoutTest.php:226:test('completes checkout with bank transfer', function (): void {
tests/Browser/Storefront/CheckoutTest.php:242:test('shows error for declined credit card', function (): void {
tests/Browser/Storefront/CheckoutTest.php:255:test('shows error for insufficient funds', function (): void {
tests/Browser/Storefront/CheckoutTest.php:268:test('switches between payment method forms', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:96:test('can register a new customer', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:109:test('shows validation errors for duplicate email registration', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:122:test('shows validation errors for mismatched passwords', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:135:test('can log in as existing customer', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:139:test('shows error for invalid customer credentials', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:150:test('redirects unauthenticated customers to login', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:158:test('shows order history for logged in customer', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:171:test('shows order detail for customer order', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:187:test('can view addresses', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:197:test('can add a new address', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:217:test('can edit an existing address', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:231:test('can log out', function (): void {
tests/Browser/Storefront/InventoryTest.php:59:test('blocks add to cart for out of stock deny policy product', function (): void {
tests/Browser/Storefront/InventoryTest.php:69:test('allows add to cart for out of stock continue policy product', function (): void {
tests/Browser/Storefront/InventoryTest.php:81:test('shows correct stock status for in stock product', function (): void {
tests/Browser/Storefront/InventoryTest.php:91:test('prevents adding more than available stock for deny policy product', function (): void {


output:
Chunk ID: 24760d
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 1754
Output:
tests/Browser/Storefront/TenantIsolationTest.php:102:test('storefront only shows current store products', function (): void {
tests/Browser/Storefront/TenantIsolationTest.php:111:test('storefront collections only contain current store products', function (): void {
tests/Browser/Storefront/TenantIsolationTest.php:120:test('admin cannot see other store products or orders', function (): void {
tests/Browser/Storefront/TenantIsolationTest.php:138:test('search only returns current store products', function (): void {
tests/Browser/Storefront/TenantIsolationTest.php:150:test('customer accounts are scoped to their store', function (): void {
tests/Browser/Storefront/BrowsingTest.php:24:test('shows featured products on home page', function (): void {
tests/Browser/Storefront/BrowsingTest.php:32:test('shows collection with product grid', function (): void {
tests/Browser/Storefront/BrowsingTest.php:39:test('can navigate from collection to product', function (): void {
tests/Browser/Storefront/BrowsingTest.php:50:test('shows product detail with variant options', function (): void {
tests/Browser/Storefront/BrowsingTest.php:59:test('shows size and color option values', function (): void {
tests/Browser/Storefront/BrowsingTest.php:71:test('shows sale and compare at pricing for sale product', function (): void {
tests/Browser/Storefront/BrowsingTest.php:80:test('shows search results for valid query', function (): void {
tests/Browser/Storefront/BrowsingTest.php:86:test('shows no results message for invalid query', function (): void {
tests/Browser/Storefront/BrowsingTest.php:92:test('does not show draft products on storefront collections', function (): void {
tests/Browser/Storefront/BrowsingTest.php:98:test('does not show draft products in search results', function (): void {
tests/Browser/Storefront/BrowsingTest.php:104:test('shows out of stock messaging for deny policy product', function (): void {
tests/Browser/Storefront/BrowsingTest.php:114:test('shows backorder messaging for continue policy product', function (): void {
tests/Browser/Storefront/BrowsingTest.php:123:test('shows new arrivals collection', function (): void {
tests/Browser/Storefront/BrowsingTest.php:129:test('shows static about page', function (): void {
tests/Browser/Storefront/BrowsingTest.php:135:test('navigates between pages using the main navigation', function (): void {
tests/Browser/Storefront/CartTest.php:52:test('can add product to cart', function (): void {
tests/Browser/Storefront/CartTest.php:61:test('can view cart with added item', function (): void {
tests/Browser/Storefront/CartTest.php:67:test('can update quantity in cart', function (): void {
tests/Browser/Storefront/CartTest.php:76:test('can remove item from cart', function (): void {
tests/Browser/Storefront/CartTest.php:84:test('can add multiple different products', function (): void {
tests/Browser/Storefront/CartTest.php:97:test('can apply valid discount code welcome ten', function (): void {
tests/Browser/Storefront/CartTest.php:105:test('shows error for invalid discount code', function (): void {
tests/Browser/Storefront/CartTest.php:111:test('shows error for expired discount code', function (): void {
tests/Browser/Storefront/CartTest.php:117:test('shows error for maxed out discount code', function (): void {
tests/Browser/Storefront/CartTest.php:123:test('can apply free shipping discount', function (): void {
tests/Browser/Storefront/CartTest.php:130:test('can apply flat five discount for fixed amount off', function (): void {
tests/Browser/Storefront/CartTest.php:137:test('shows subtotal and total in cart', function (): void {
tests/Browser/Storefront/CheckoutTest.php:118:test('completes full checkout with credit card', function (): void {
tests/Browser/Storefront/CheckoutTest.php:129:test('shows shipping methods based on german address', function (): void {
tests/Browser/Storefront/CheckoutTest.php:144:test('shows international shipping methods for non german address', function (): void {
tests/Browser/Storefront/CheckoutTest.php:159:test('applies discount during checkout', function (): void {
tests/Browser/Storefront/CheckoutTest.php:177:test('validates required contact email', function (): void {
tests/Browser/Storefront/CheckoutTest.php:185:test('validates required shipping address fields', function (): void {
tests/Browser/Storefront/CheckoutTest.php:198:test('validates invalid postal code format', function (): void {
tests/Browser/Storefront/CheckoutTest.php:206:test('prevents checkout with empty cart', function (): void {
tests/Browser/Storefront/CheckoutTest.php:213:test('completes checkout with paypal', function (): void {
tests/Browser/Storefront/CheckoutTest.php:226:test('completes checkout with bank transfer', function (): void {
tests/Browser/Storefront/CheckoutTest.php:242:test('shows error for declined credit card', function (): void {
tests/Browser/Storefront/CheckoutTest.php:255:test('shows error for insufficient funds', function (): void {
tests/Browser/Storefront/CheckoutTest.php:268:test('switches between payment method forms', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:96:test('can register a new customer', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:109:test('shows validation errors for duplicate email registration', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:122:test('shows validation errors for mismatched passwords', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:135:test('can log in as existing customer', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:139:test('shows error for invalid customer credentials', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:150:test('redirects unauthenticated customers to login', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:158:test('shows order history for logged in customer', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:171:test('shows order detail for customer order', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:187:test('can view addresses', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:197:test('can add a new address', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:217:test('can edit an existing address', function (): void {
tests/Browser/Storefront/CustomerAccountTest.php:231:test('can log out', function (): void {
tests/Browser/Storefront/InventoryTest.php:59:test('blocks add to cart for out of stock deny policy product', function (): void {
tests/Browser/Storefront/InventoryTest.php:69:test('allows add to cart for out of stock continue policy product', function (): void {
tests/Browser/Storefront/InventoryTest.php:81:test('shows correct stock status for in stock product', function (): void {
tests/Browser/Storefront/InventoryTest.php:91:test('prevents adding more than available stock for deny policy product', function (): void {


cmd: sed -n '480,520p' vendor/pestphp/pest-plugin-browser/src/Api/Concerns/MakesElementAssertions.php


cmd: sed -n '1,180p' tests/Browser/Storefront/BrowsingTest.php


cmd: sed -n '1,220p' resources/views/livewire/storefront/collections/show.blade.php


cmd: sed -n '1,180p' resources/views/livewire/storefront/products/show.blade.php


cmd: sed -n '1,220p' resources/views/livewire/storefront/cart/show.blade.php


cmd: sed -n '1,280p' resources/views/livewire/storefront/checkout/show.blade.php


command: sed -n '480,520p' vendor/pestphp/pest-plugin-browser/src/Api/Concerns/MakesElementAssertions.php

aggregated_output:
        return $this->assertAttribute($selector, 'aria-'.$attribute, $value);
    }

    /**
     * Assert that the element matching the given selector has the given value in the provided data attribute.
     */
    public function assertDataAttribute(string $selector, string $attribute, string|int|float $value): Webpage
    {
        $value = (string) $value;

        return $this->assertAttribute($selector, 'data-'.$attribute, $value);
    }

    /**
     * Assert that the element matching the given selector is visible.
     */
    public function assertVisible(string $selector): Webpage
    {
        $locator = $this->guessLocator($selector);

        expect($locator->isVisible())->toBeTrue("Expected element [{$selector}] to be visible on the page initially with the url [{$this->initialUrl}], but it was not.");

        return $this;
    }

    /**
     * Assert that the element matching the given selector is present.
     */
    public function assertPresent(string $selector): Webpage
    {
        $count = $this->guessLocator($selector)->count();
        expect($count)->toBeGreaterThan(0, "Expected element [{$selector}] to be present in the DOM on the page initially with the url [{$this->initialUrl}], but it was not found.");

        return $this;
    }

    /**
     * Assert that the element matching the given selector is not present in the source.
     */
    public function assertNotPresent(string $selector): Webpage


output:
Chunk ID: f1add0
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 363
Output:

        return $this->assertAttribute($selector, 'aria-'.$attribute, $value);
    }

    /**
     * Assert that the element matching the given selector has the given value in the provided data attribute.
     */
    public function assertDataAttribute(string $selector, string $attribute, string|int|float $value): Webpage
    {
        $value = (string) $value;

        return $this->assertAttribute($selector, 'data-'.$attribute, $value);
    }

    /**
     * Assert that the element matching the given selector is visible.
     */
    public function assertVisible(string $selector): Webpage
    {
        $locator = $this->guessLocator($selector);

        expect($locator->isVisible())->toBeTrue("Expected element [{$selector}] to be visible on the page initially with the url [{$this->initialUrl}], but it was not.");

        return $this;
    }

    /**
     * Assert that the element matching the given selector is present.
     */
    public function assertPresent(string $selector): Webpage
    {
        $count = $this->guessLocator($selector)->count();
        expect($count)->toBeGreaterThan(0, "Expected element [{$selector}] to be present in the DOM on the page initially with the url [{$this->initialUrl}], but it was not found.");

        return $this;
    }

    /**
     * Assert that the element matching the given selector is not present in the source.
     */
    public function assertNotPresent(string $selector): Webpage


command: sed -n '1,180p' tests/Browser/Storefront/BrowsingTest.php

aggregated_output:
<?php

use Database\Seeders\DatabaseSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Pest\Browser\Playwright\Playwright;

uses(RefreshDatabase::class);

beforeEach(function (): void {
    Playwright::setHost('shop.test');

    $this->seed(DatabaseSeeder::class);
});

afterEach(function (): void {
    Playwright::setHost(null);
});

function storefrontBrowsingHost(): array
{
    return ['host' => 'shop.test'];
}

test('shows featured products on home page', function (): void {
    visit('/', storefrontBrowsingHost())
        ->assertSee('Acme Fashion')
        ->assertSee('Classic Cotton T-Shirt')
        ->assertSee('24.99')
        ->assertNoJavaScriptErrors();
});

test('shows collection with product grid', function (): void {
    visit('/collections/t-shirts', storefrontBrowsingHost())
        ->assertSee('T-Shirts')
        ->assertSee('Classic Cotton T-Shirt')
        ->assertNoJavaScriptErrors();
});

test('can navigate from collection to product', function (): void {
    visit('/collections/t-shirts', storefrontBrowsingHost())
        ->click('a[href$="/products/classic-cotton-t-shirt"]')
        ->wait(1)
        ->assertPathIs('/products/classic-cotton-t-shirt')
        ->assertSee('Classic Cotton T-Shirt')
        ->assertSee('24.99')
        ->assertSee('Add to cart')
        ->assertNoJavaScriptErrors();
});

test('shows product detail with variant options', function (): void {
    visit('/products/classic-cotton-t-shirt', storefrontBrowsingHost())
        ->assertSee('Classic Cotton T-Shirt')
        ->assertSee('24.99')
        ->assertSee('Size')
        ->assertSee('Color')
        ->assertNoJavaScriptErrors();
});

test('shows size and color option values', function (): void {
    visit('/products/classic-cotton-t-shirt', storefrontBrowsingHost())
        ->assertSee('S')
        ->assertSee('M')
        ->assertSee('L')
        ->assertSee('XL')
        ->assertSee('Black')
        ->assertSee('White')
        ->assertSee('Navy')
        ->assertNoJavaScriptErrors();
});

test('shows sale and compare at pricing for sale product', function (): void {
    visit('/products/premium-slim-fit-jeans', storefrontBrowsingHost())
        ->assertSee('Premium Slim Fit Jeans')
        ->assertSee('79.99')
        ->assertSee('99.99')
        ->assertPresent('.line-through')
        ->assertNoJavaScriptErrors();
});

test('shows search results for valid query', function (): void {
    visit('/search?q=cotton', storefrontBrowsingHost())
        ->assertSee('Classic Cotton T-Shirt')
        ->assertNoJavaScriptErrors();
});

test('shows no results message for invalid query', function (): void {
    visit('/search?q=zznonexistentproductzz', storefrontBrowsingHost())
        ->assertSee('No products found')
        ->assertNoJavaScriptErrors();
});

test('does not show draft products on storefront collections', function (): void {
    visit('/collections', storefrontBrowsingHost())
        ->assertDontSee('Unreleased Winter Jacket')
        ->assertNoJavaScriptErrors();
});

test('does not show draft products in search results', function (): void {
    visit('/search?q=draft', storefrontBrowsingHost())
        ->assertDontSee('Unreleased Winter Jacket')
        ->assertNoJavaScriptErrors();
});

test('shows out of stock messaging for deny policy product', function (): void {
    visit('/products/limited-edition-sneakers', storefrontBrowsingHost())
        ->assertSee('Limited Edition Sneakers')
        ->assertSee('Out of stock')
        ->assertSee('Sold out')
        ->assertButtonDisabled('button:has-text("Sold out")')
        ->assertDontSee('Add to cart')
        ->assertNoJavaScriptErrors();
});

test('shows backorder messaging for continue policy product', function (): void {
    visit('/products/backorder-denim-jacket', storefrontBrowsingHost())
        ->assertSee('Backorder Denim Jacket')
        ->assertSee('Available on backorder')
        ->assertSee('Add to cart')
        ->assertButtonEnabled('button:has-text("Add to cart")')
        ->assertNoJavaScriptErrors();
});

test('shows new arrivals collection', function (): void {
    visit('/collections/new-arrivals', storefrontBrowsingHost())
        ->assertSee('New Arrivals')
        ->assertNoJavaScriptErrors();
});

test('shows static about page', function (): void {
    visit('/pages/about', storefrontBrowsingHost())
        ->assertSee('About')
        ->assertNoJavaScriptErrors();
});

test('navigates between pages using the main navigation', function (): void {
    visit('/', storefrontBrowsingHost())
        ->hover('nav[aria-label="Main navigation"] a[href$="/collections"]')
        ->click('nav[aria-label="Main navigation"] a[href$="/collections/t-shirts"]')
        ->wait(1)
        ->assertPathIs('/collections/t-shirts')
        ->assertSee('T-Shirts')
        ->assertNoJavaScriptErrors();
});


output:
Chunk ID: c6f90b
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 1219
Output:
<?php

use Database\Seeders\DatabaseSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Pest\Browser\Playwright\Playwright;

uses(RefreshDatabase::class);

beforeEach(function (): void {
    Playwright::setHost('shop.test');

    $this->seed(DatabaseSeeder::class);
});

afterEach(function (): void {
    Playwright::setHost(null);
});

function storefrontBrowsingHost(): array
{
    return ['host' => 'shop.test'];
}

test('shows featured products on home page', function (): void {
    visit('/', storefrontBrowsingHost())
        ->assertSee('Acme Fashion')
        ->assertSee('Classic Cotton T-Shirt')
        ->assertSee('24.99')
        ->assertNoJavaScriptErrors();
});

test('shows collection with product grid', function (): void {
    visit('/collections/t-shirts', storefrontBrowsingHost())
        ->assertSee('T-Shirts')
        ->assertSee('Classic Cotton T-Shirt')
        ->assertNoJavaScriptErrors();
});

test('can navigate from collection to product', function (): void {
    visit('/collections/t-shirts', storefrontBrowsingHost())
        ->click('a[href$="/products/classic-cotton-t-shirt"]')
        ->wait(1)
        ->assertPathIs('/products/classic-cotton-t-shirt')
        ->assertSee('Classic Cotton T-Shirt')
        ->assertSee('24.99')
        ->assertSee('Add to cart')
        ->assertNoJavaScriptErrors();
});

test('shows product detail with variant options', function (): void {
    visit('/products/classic-cotton-t-shirt', storefrontBrowsingHost())
        ->assertSee('Classic Cotton T-Shirt')
        ->assertSee('24.99')
        ->assertSee('Size')
        ->assertSee('Color')
        ->assertNoJavaScriptErrors();
});

test('shows size and color option values', function (): void {
    visit('/products/classic-cotton-t-shirt', storefrontBrowsingHost())
        ->assertSee('S')
        ->assertSee('M')
        ->assertSee('L')
        ->assertSee('XL')
        ->assertSee('Black')
        ->assertSee('White')
        ->assertSee('Navy')
        ->assertNoJavaScriptErrors();
});

test('shows sale and compare at pricing for sale product', function (): void {
    visit('/products/premium-slim-fit-jeans', storefrontBrowsingHost())
        ->assertSee('Premium Slim Fit Jeans')
        ->assertSee('79.99')
        ->assertSee('99.99')
        ->assertPresent('.line-through')
        ->assertNoJavaScriptErrors();
});

test('shows search results for valid query', function (): void {
    visit('/search?q=cotton', storefrontBrowsingHost())
        ->assertSee('Classic Cotton T-Shirt')
        ->assertNoJavaScriptErrors();
});

test('shows no results message for invalid query', function (): void {
    visit('/search?q=zznonexistentproductzz', storefrontBrowsingHost())
        ->assertSee('No products found')
        ->assertNoJavaScriptErrors();
});

test('does not show draft products on storefront collections', function (): void {
    visit('/collections', storefrontBrowsingHost())
        ->assertDontSee('Unreleased Winter Jacket')
        ->assertNoJavaScriptErrors();
});

test('does not show draft products in search results', function (): void {
    visit('/search?q=draft', storefrontBrowsingHost())
        ->assertDontSee('Unreleased Winter Jacket')
        ->assertNoJavaScriptErrors();
});

test('shows out of stock messaging for deny policy product', function (): void {
    visit('/products/limited-edition-sneakers', storefrontBrowsingHost())
        ->assertSee('Limited Edition Sneakers')
        ->assertSee('Out of stock')
        ->assertSee('Sold out')
        ->assertButtonDisabled('button:has-text("Sold out")')
        ->assertDontSee('Add to cart')
        ->assertNoJavaScriptErrors();
});

test('shows backorder messaging for continue policy product', function (): void {
    visit('/products/backorder-denim-jacket', storefrontBrowsingHost())
        ->assertSee('Backorder Denim Jacket')
        ->assertSee('Available on backorder')
        ->assertSee('Add to cart')
        ->assertButtonEnabled('button:has-text("Add to cart")')
        ->assertNoJavaScriptErrors();
});

test('shows new arrivals collection', function (): void {
    visit('/collections/new-arrivals', storefrontBrowsingHost())
        ->assertSee('New Arrivals')
        ->assertNoJavaScriptErrors();
});

test('shows static about page', function (): void {
    visit('/pages/about', storefrontBrowsingHost())
        ->assertSee('About')
        ->assertNoJavaScriptErrors();
});

test('navigates between pages using the main navigation', function (): void {
    visit('/', storefrontBrowsingHost())
        ->hover('nav[aria-label="Main navigation"] a[href$="/collections"]')
        ->click('nav[aria-label="Main navigation"] a[href$="/collections/t-shirts"]')
        ->wait(1)
        ->assertPathIs('/collections/t-shirts')
        ->assertSee('T-Shirts')
        ->assertNoJavaScriptErrors();
});


command: sed -n '1,220p' resources/views/livewire/storefront/collections/show.blade.php

aggregated_output:
    <x-storefront.breadcrumbs :items="[
        ['label' => 'Collections', 'url' => route('collections.index')],
        ['label' => $collection->title],
    ]" />

{{ $collection->title }}

        @if ($collection->description_html)

{!! $collection->description_html !!}

        @endif

Filters

                <button wire:click="clearFilters" class="text-sm font-medium text-blue-700 hover:underline dark:text-blue-300">Clear all</button>

                <flux:checkbox wire:model.live="inStock" label="In stock" />

Price

                        <flux:input wire:model.live.debounce.500ms="minPrice" type="number" min="0" placeholder="Min" aria-label="Minimum price" />
                        <flux:input wire:model.live.debounce.500ms="maxPrice" type="number" min="0" placeholder="Max" aria-label="Maximum price" />

Product type

                        @foreach ($productTypes as $type)
                            <flux:checkbox wire:model.live="types" value="{{ $type }}" :label="$type" wire:key="type-filter-{{ $type }}" />
                        @endforeach

Vendor

                        @foreach ($productVendors as $vendor)
                            <flux:checkbox wire:model.live="vendors" value="{{ $vendor }}" :label="$vendor" wire:key="vendor-filter-{{ $vendor }}" />
                        @endforeach

{{ $products->total() }} products

                <flux:select wire:model.live="sort" aria-label="Sort products" class="sm:max-w-56">
                    <flux:select.option value="featured">Featured</flux:select.option>
                    <flux:select.option value="price_asc">Price: Low to High</flux:select.option>
                    <flux:select.option value="price_desc">Price: High to Low</flux:select.option>
                    <flux:select.option value="newest">Newest</flux:select.option>
                </flux:select>

            @if ($products->isEmpty())

                        <flux:icon name="magnifying-glass" class="size-10 text-zinc-400" />

No products found

Try adjusting your filters or browse another collection.

                        <flux:button wire:click="clearFilters" variant="ghost">Clear filters</flux:button>

            @else

                    @foreach ($products as $product)
                        <x-storefront.product-card :product="$product" wire:key="collection-product-{{ $product->getKey() }}" />
                    @endforeach

                {{ $products->links() }}
            @endif


output:
Chunk ID: f30460
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 1110
Output:

    <x-storefront.breadcrumbs :items="[
        ['label' => 'Collections', 'url' => route('collections.index')],
        ['label' => $collection->title],
    ]" />

{{ $collection->title }}

        @if ($collection->description_html)

{!! $collection->description_html !!}

        @endif

Filters

                <button wire:click="clearFilters" class="text-sm font-medium text-blue-700 hover:underline dark:text-blue-300">Clear all</button>

                <flux:checkbox wire:model.live="inStock" label="In stock" />

Price

                        <flux:input wire:model.live.debounce.500ms="minPrice" type="number" min="0" placeholder="Min" aria-label="Minimum price" />
                        <flux:input wire:model.live.debounce.500ms="maxPrice" type="number" min="0" placeholder="Max" aria-label="Maximum price" />

Product type

                        @foreach ($productTypes as $type)
                            <flux:checkbox wire:model.live="types" value="{{ $type }}" :label="$type" wire:key="type-filter-{{ $type }}" />
                        @endforeach

Vendor

                        @foreach ($productVendors as $vendor)
                            <flux:checkbox wire:model.live="vendors" value="{{ $vendor }}" :label="$vendor" wire:key="vendor-filter-{{ $vendor }}" />
                        @endforeach

{{ $products->total() }} products

                <flux:select wire:model.live="sort" aria-label="Sort products" class="sm:max-w-56">
                    <flux:select.option value="featured">Featured</flux:select.option>
                    <flux:select.option value="price_asc">Price: Low to High</flux:select.option>
                    <flux:select.option value="price_desc">Price: High to Low</flux:select.option>
                    <flux:select.option value="newest">Newest</flux:select.option>
                </flux:select>

            @if ($products->isEmpty())

                        <flux:icon name="magnifying-glass" class="size-10 text-zinc-400" />

No products found

Try adjusting your filters or browse another collection.

                        <flux:button wire:click="clearFilters" variant="ghost">Clear filters</flux:button>

            @else

                    @foreach ($products as $product)
                        <x-storefront.product-card :product="$product" wire:key="collection-product-{{ $product->getKey() }}" />
                    @endforeach

                {{ $products->links() }}
            @endif


command: sed -n '1,180p' resources/views/livewire/storefront/products/show.blade.php

aggregated_output:
    <x-storefront.breadcrumbs :items="[
        ['label' => $product->collections->first()?->title ?? 'Products', 'url' => $product->collections->first() ? route('collections.show', $product->collections->first()->handle) : route('collections.index')],
        ['label' => $product->title],
    ]" />

                <flux:icon name="shopping-bag" class="size-20" />

                    @if ($selectedVariant?->compare_at_amount && $selectedVariant->compare_at_amount > $selectedVariant->price_amount)
                        Sale
                    @endif
                    @foreach ($product->tags ?? [] as $tag)
                        {{ $tag }}
                    @endforeach

{{ $product->title }}

                @if ($selectedVariant)
                    <x-storefront.price :amount="$selectedVariant->price_amount" :compare-at="$selectedVariant->compare_at_amount" :currency="$selectedVariant->currency" class="text-2xl" aria-live="polite" />
                @endif

            @if ($product->options->isNotEmpty())

                    @foreach ($product->options as $option)
                        <fieldset class="space-y-3" wire:key="product-option-selector-{{ $option->getKey() }}">
                            <legend class="text-sm font-medium text-zinc-950 dark:text-white">{{ $option->name }}</legend>

                                @foreach ($option->values as $value)
                                    @php($selected = ($selectedOptions[$option->name] ?? null) === $value->value)
                                    <button
                                        type="button"
                                        wire:click="selectOption(@js($option->name), @js($value->value))"
                                        @class([
                                            'min-h-10 rounded-md border px-4 py-2 text-sm font-medium transition',
                                            'border-blue-700 bg-blue-50 text-blue-800 dark:border-blue-300 dark:bg-blue-950 dark:text-blue-100' => $selected,
                                            'border-zinc-200 text-zinc-700 hover:border-zinc-400 dark:border-zinc-700 dark:text-zinc-200 dark:hover:border-zinc-500' => ! $selected,
                                        ])
                                        aria-pressed="{{ $selected ? 'true' : 'false' }}"
                                    >
                                        {{ $value->value }}
                                    </button>
                                @endforeach

                        </fieldset>
                    @endforeach

            @endif

{{ $stockState['message'] }}

                    <button type="button" wire:click="decreaseQuantity" class="flex size-11 items-center justify-center border-r border-zinc-200 text-lg dark:border-zinc-700" aria-label="Decrease quantity">-</button>
                    <input wire:model.live="quantity" type="number" min="1" class="h-11 w-full border-0 bg-transparent text-center text-sm" aria-label="Quantity">
                    <button type="button" wire:click="increaseQuantity" class="flex size-11 items-center justify-center border-l border-zinc-200 text-lg dark:border-zinc-700" aria-label="Increase quantity">+</button>

                <flux:button wire:click="addToCart" variant="primary" class="w-full" :disabled="! $this->canAddToCart()">
                    {{ $this->canAddToCart() ? 'Add to cart' : 'Sold out' }}
                </flux:button>

            @if ($product->description_html)

                    {!! $product->description_html !!}

            @endif

Vendor

{{ $product->vendor ?: '-' }}

Product type

{{ $product->product_type ?: '-' }}

                @if ($selectedVariant)

SKU

{{ $selectedVariant->sku ?: '-' }}

Shipping

{{ $selectedVariant->requires_shipping ? 'Required' : 'Digital delivery' }}

                @endif


output:
Chunk ID: b46045
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 1586
Output:

    <x-storefront.breadcrumbs :items="[
        ['label' => $product->collections->first()?->title ?? 'Products', 'url' => $product->collections->first() ? route('collections.show', $product->collections->first()->handle) : route('collections.index')],
        ['label' => $product->title],
    ]" />

                <flux:icon name="shopping-bag" class="size-20" />

                    @if ($selectedVariant?->compare_at_amount && $selectedVariant->compare_at_amount > $selectedVariant->price_amount)
                        Sale
                    @endif
                    @foreach ($product->tags ?? [] as $tag)
                        {{ $tag }}
                    @endforeach

{{ $product->title }}

                @if ($selectedVariant)
                    <x-storefront.price :amount="$selectedVariant->price_amount" :compare-at="$selectedVariant->compare_at_amount" :currency="$selectedVariant->currency" class="text-2xl" aria-live="polite" />
                @endif

            @if ($product->options->isNotEmpty())

                    @foreach ($product->options as $option)
                        <fieldset class="space-y-3" wire:key="product-option-selector-{{ $option->getKey() }}">
                            <legend class="text-sm font-medium text-zinc-950 dark:text-white">{{ $option->name }}</legend>

                                @foreach ($option->values as $value)
                                    @php($selected = ($selectedOptions[$option->name] ?? null) === $value->value)
                                    <button
                                        type="button"
                                        wire:click="selectOption(@js($option->name), @js($value->value))"
                                        @class([
                                            'min-h-10 rounded-md border px-4 py-2 text-sm font-medium transition',
                                            'border-blue-700 bg-blue-50 text-blue-800 dark:border-blue-300 dark:bg-blue-950 dark:text-blue-100' => $selected,
                                            'border-zinc-200 text-zinc-700 hover:border-zinc-400 dark:border-zinc-700 dark:text-zinc-200 dark:hover:border-zinc-500' => ! $selected,
                                        ])
                                        aria-pressed="{{ $selected ? 'true' : 'false' }}"
                                    >
                                        {{ $value->value }}
                                    </button>
                                @endforeach

                        </fieldset>
                    @endforeach

            @endif

{{ $stockState['message'] }}

                    <button type="button" wire:click="decreaseQuantity" class="flex size-11 items-center justify-center border-r border-zinc-200 text-lg dark:border-zinc-700" aria-label="Decrease quantity">-</button>
                    <input wire:model.live="quantity" type="number" min="1" class="h-11 w-full border-0 bg-transparent text-center text-sm" aria-label="Quantity">
                    <button type="button" wire:click="increaseQuantity" class="flex size-11 items-center justify-center border-l border-zinc-200 text-lg dark:border-zinc-700" aria-label="Increase quantity">+</button>

                <flux:button wire:click="addToCart" variant="primary" class="w-full" :disabled="! $this->canAddToCart()">
                    {{ $this->canAddToCart() ? 'Add to cart' : 'Sold out' }}
                </flux:button>

            @if ($product->description_html)

                    {!! $product->description_html !!}

            @endif

Vendor

{{ $product->vendor ?: '-' }}

Product type

{{ $product->product_type ?: '-' }}

                @if ($selectedVariant)

SKU

{{ $selectedVariant->sku ?: '-' }}

Shipping

{{ $selectedVariant->requires_shipping ? 'Required' : 'Digital delivery' }}

                @endif