Output:
Wall time: 0.0088 seconds
Output:
[{"type":"text","text":"### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Create discount](http://shop.test/admin/discounts/create)\n### Page\n- Page URL: http://shop.test/admin/discounts/create\n- Page Title: Create discount\n### Snapshot\n```yaml\n- generic [ref=e353]:\n  - switch \"Disabled\" [checked] [active] [ref=e354]\n  - generic [ref=e356]: Disabled\n```"}]


### Result
Waited for 1
### Ran Playwright code
```js
await new Promise(f => setTimeout(f, 1 * 1000));
```
### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Create discount](http://shop.test/admin/discounts/create)
### Page
- Page URL: http://shop.test/admin/discounts/create
- Page Title: Create discount
### Snapshot
- [Snapshot](.playwright-mcp/page-2026-05-04T02-27-22-461Z.yml)


Output:
Wall time: 1.0171 seconds
Output:
[{"type":"text","text":"### Result\nWaited for 1\n### Ran Playwright code\n```js\nawait new Promise(f => setTimeout(f, 1 * 1000));\n```\n### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Create discount](http://shop.test/admin/discounts/create)\n### Page\n- Page URL: http://shop.test/admin/discounts/create\n- Page Title: Create discount\n### Snapshot\n- [Snapshot](.playwright-mcp/page-2026-05-04T02-27-22-461Z.yml)"}]


### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Create discount](http://shop.test/admin/discounts/create)
### Page
- Page URL: http://shop.test/admin/discounts/create
- Page Title: Create discount
### Snapshot
```yaml
- generic [ref=e353]:
  - switch "Disabled" [checked] [active] [ref=e354]
  - generic [ref=e356]: Disabled
```


Output:
Wall time: 0.0155 seconds
Output:
[{"type":"text","text":"### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Create discount](http://shop.test/admin/discounts/create)\n### Page\n- Page URL: http://shop.test/admin/discounts/create\n- Page Title: Create discount\n### Snapshot\n```yaml\n- generic [ref=e353]:\n  - switch \"Disabled\" [checked] [active] [ref=e354]\n  - generic [ref=e356]: Disabled\n```"}]


The browser smoke caught a small UI inconsistency: the active switch becomes checked, but its label remains “Disabled” before save. I’m checking the form binding before deciding whether to patch it.


rg -n "switch|isActive|wire:model" resources/views/livewire/admin/discounts/form.blade.php app/Livewire/Admin/Discounts/Form.php


live model update binding
switch wire model live
flux switch checked label


rg -n "switch|isActive|wire:model" resources/views/livewire/admin/discounts/form.blade.php app/Livewire/Admin/Discounts/Form.php

rg -n 'switch|isActive|wire:model' resources/views/livewire/admin/discounts/form.blade.php app/Livewire/Admin/Discounts/Form.php

Question: switch|isActive|wire:model

resources/views/livewire/admin/discounts/form.blade.php:19:            <flux:radio.group wire:model.live="type" label="Type" class="grid gap-3 sm:grid-cols-2">
resources/views/livewire/admin/discounts/form.blade.php:31:                        <flux:input wire:model="code" label="Discount code" placeholder="SUMMER20" />
resources/views/livewire/admin/discounts/form.blade.php:45:                <flux:radio.group wire:model.live="valueType" label="Value type" class="grid gap-3 sm:grid-cols-3">
resources/views/livewire/admin/discounts/form.blade.php:53:                        <flux:input wire:model="valueAmount" type="number" step="0.01" min="0" label="{{ $valueType === 'percent' ? 'Percentage' : 'Amount' }}" />
resources/views/livewire/admin/discounts/form.blade.php:65:                    <flux:input wire:model="minimumPurchaseAmount" type="number" step="0.01" min="0" label="Minimum purchase amount" description="Leave empty for no minimum" placeholder="0.00" />
resources/views/livewire/admin/discounts/form.blade.php:71:                        <flux:input wire:model.live.debounce.300ms="productSearch" icon="magnifying-glass" label="Specific products" placeholder="Search products..." />
resources/views/livewire/admin/discounts/form.blade.php:94:                        <flux:input wire:model.live.debounce.300ms="collectionSearch" icon="magnifying-glass" label="Specific collections" placeholder="Search collections..." />
resources/views/livewire/admin/discounts/form.blade.php:123:                <flux:input wire:model="usageLimit" type="number" min="1" label="Total usage limit" placeholder="Unlimited" />
resources/views/livewire/admin/discounts/form.blade.php:125:                    <flux:checkbox wire:model="onePerCustomer" label="Limit to one use per customer" />
resources/views/livewire/admin/discounts/form.blade.php:135:                <flux:input wire:model="startsAt" type="datetime-local" label="Start date" />
resources/views/livewire/admin/discounts/form.blade.php:136:                <flux:input wire:model="endsAt" type="datetime-local" label="End date" description="Leave empty for no end date" />
resources/views/livewire/admin/discounts/form.blade.php:145:            <flux:switch wire:model="isActive" label="{{ $isActive ? 'Active' : 'Disabled' }}" align="left" />
app/Livewire/Admin/Discounts/Form.php:53:    public bool $isActive = false;
app/Livewire/Admin/Discounts/Form.php:124:            'isActive' => ['boolean'],
app/Livewire/Admin/Discounts/Form.php:272:        $this->isActive = $discount->status !== DiscountStatus::Disabled;
app/Livewire/Admin/Discounts/Form.php:408:        if ($this->isActive) {


Output:
Chunk ID: 804d98
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 663
Output:
resources/views/livewire/admin/discounts/form.blade.php:19:            <flux:radio.group wire:model.live="type" label="Type" class="grid gap-3 sm:grid-cols-2">
resources/views/livewire/admin/discounts/form.blade.php:31:                        <flux:input wire:model="code" label="Discount code" placeholder="SUMMER20" />
resources/views/livewire/admin/discounts/form.blade.php:45:                <flux:radio.group wire:model.live="valueType" label="Value type" class="grid gap-3 sm:grid-cols-3">
resources/views/livewire/admin/discounts/form.blade.php:53:                        <flux:input wire:model="valueAmount" type="number" step="0.01" min="0" label="{{ $valueType === 'percent' ? 'Percentage' : 'Amount' }}" />
resources/views/livewire/admin/discounts/form.blade.php:65:                    <flux:input wire:model="minimumPurchaseAmount" type="number" step="0.01" min="0" label="Minimum purchase amount" description="Leave empty for no minimum" placeholder="0.00" />
resources/views/livewire/admin/discounts/form.blade.php:71:                        <flux:input wire:model.live.debounce.300ms="productSearch" icon="magnifying-glass" label="Specific products" placeholder="Search products..." />
resources/views/livewire/admin/discounts/form.blade.php:94:                        <flux:input wire:model.live.debounce.300ms="collectionSearch" icon="magnifying-glass" label="Specific collections" placeholder="Search collections..." />
resources/views/livewire/admin/discounts/form.blade.php:123:                <flux:input wire:model="usageLimit" type="number" min="1" label="Total usage limit" placeholder="Unlimited" />
resources/views/livewire/admin/discounts/form.blade.php:125:                    <flux:checkbox wire:model="onePerCustomer" label="Limit to one use per customer" />
resources/views/livewire/admin/discounts/form.blade.php:135:                <flux:input wire:model="startsAt" type="datetime-local" label="Start date" />
resources/views/livewire/admin/discounts/form.blade.php:136:                <flux:input wire:model="endsAt" type="datetime-local" label="End date" description="Leave empty for no end date" />
resources/views/livewire/admin/discounts/form.blade.php:145:            <flux:switch wire:model="isActive" label="{{ $isActive ? 'Active' : 'Disabled' }}" align="left" />
app/Livewire/Admin/Discounts/Form.php:53:    public bool $isActive = false;
app/Livewire/Admin/Discounts/Form.php:124:            'isActive' => ['boolean'],
app/Livewire/Admin/Discounts/Form.php:272:        $this->isActive = $discount->status !== DiscountStatus::Disabled;
app/Livewire/Admin/Discounts/Form.php:408:        if ($this->isActive) {


# Search Results

## Wire Model
Wire Model | livewire/livewire@4.x | Source: https://livewire.laravel.com/docs/4.x/wire-model

Livewire makes it easy to bind a component property's value with form inputs using `wire:model`.

Here is a simple example of using `wire:model` to bind the `$title` and `$content` properties with form inputs in a "Create Post" component:

```php
use Livewire\Component;
use App\Models\Post;

class CreatePost extends Component
{
    public $title = '';

    public $content = '';

    public function save()
    {
		$post = Post::create([
			'title' => $this->title
			'content' => $this->content
		]);

        // ...
    }
}
```

```blade
<form wire:submit="save">
    <label>
        <span>Title</span>

        <input type="text" wire:model="title"> <!-- [tl! highlight] -->
    </label>

    <label>
        <span>Content</span>

        <textarea wire:model="content"></textarea> <!-- [tl! highlight] -->
    </label>

	<button type="submit">Save</button>
</form>
```

Because both inputs use `wire:model`, their values will be synchronized with the server's properties when the "Save" button is pressed.

> [!warning] "Why isn't my component live updating as I type?"
> If you tried this in your browser and are confused why the title isn't automatically updating, it's because Livewire only updates a component when an "action" is submitted—like pressing a submit button—not when a user types into a field. This cuts down on network requests and improves performance. To enable "live" updating as a user types, you can use `wire:model.live` instead. [Learn more about data binding](/docs/4.x/properties#data-binding).

---

## Components Switch > flux:switch
Components Switch | livewire/flux@2.x | Source: https://fluxui.dev/components/switch#livewire/flux

flux:switch

<ui-table-scroll-area>

Prop

Description

    wire:model

Binds the switch to a Livewire property. See the wire:model documentation for more information.

    label

Label text displayed above the switch. When provided, wraps the switch in a flux:field component with an adjacent flux:label component. See the field component.

    description

Help text displayed below the switch. When provided alongside label, appears between the label and switch within the flux:field wrapper. See the field component.

    align

Alignment of the switch relative to its label. Options: right|start (default), left|end.

    disabled

Prevents user interaction with the switch.

</ui-table-scroll-area>

<ui-table-scroll-area>

Attribute

Description

    data-flux-switch

Applied to the root element for styling and identification.

    data-checked

Applied when the switch is in the "on" state.

</ui-table-scroll-area>

---

## Docs Dark Mode > Toggle switch
Docs Dark Mode | livewire/flux@2.x | Source: https://fluxui.dev/docs/dark-mode#livewire/flux

            Toggle switch

A simple toggle switch to allow users to control dark mode from something like a settings page.

<flux:switch x-data x-model="$flux.dark" label="Dark mode"  />

---

## Components Checkbox > Checked
Components Checkbox | livewire/flux@2.x | Source: https://fluxui.dev/components/checkbox#livewire/flux

Checked

Mark a checkbox as checked by default.

<flux:checkbox checked />

---

## Attribute Modelable Modifiers
Attribute Modelable | livewire/livewire@4.x | Source: https://livewire.laravel.com/docs/4.x/attribute-modelable

## Modifiers

The parent can use `wire:model` modifiers for timing and network control:

```blade
{{-- Live updates on every keystroke --}}
<livewire:todo-input wire:model.live="todo" />

{{-- Debounce updates --}}
<livewire:todo-input wire:model.live.debounce.500ms="todo" />

{{-- Throttle updates --}}
<livewire:todo-input wire:model.live.throttle.500ms="todo" />
```

> [!note] Event-based modifiers on components
> Event-based modifiers like `.blur`, `.change`, and `.enter` control DOM events on specific elements, not reactive component bindings. To control sync timing for modelable components, place these modifiers on the actual input element inside the child component:
>
> ```blade
> {{-- Parent --}}
> <livewire:todo-input wire:model="todo" />
>
> {{-- Child component --}}
> <input wire:model.blur="value" />
> ```

---

## Forms Live-updating fields
Forms | livewire/livewire@4.x | Source: https://livewire.laravel.com/docs/4.x/forms

## Live-updating fields

By default, Livewire only sends a network request when the form is submitted (or any other [action](/docs/4.x/actions) is called), not while the form is being filled out.

Take the `post.create` component, for example. If you want to make sure the "title" input field is synchronized with the `$title` property on the backend as the user types, you may add the `.live` modifier to `wire:model` like so:

```blade
<input type="text" wire:model.live="title">
```

Now, as a user types into this field, network requests will be sent to the server to update `$title`. This is useful for things like a real-time search, where a dataset is filtered as a user types into a search box.

---

## Components Switch > Reference
Components Switch | livewire/flux@2.x | Source: https://fluxui.dev/components/switch#livewire/flux

    Reference

---

## Components Switch > Switch
Components Switch | livewire/flux@2.x | Source: https://fluxui.dev/components/switch#livewire/flux

    Switch

Toggle a setting on or off. Suitable for binary options like enabling or disabling features.

        Use switches as auto-saving controls outside forms; checkboxes otherwise.

<flux:field variant="inline">    <flux:label>Enable notifications</flux:label>    <flux:switch wire:model.live="notifications" />    <flux:error name="notifications" /></flux:field>

---

## Components Switch > Left align
Components Switch | livewire/flux@2.x | Source: https://fluxui.dev/components/switch#livewire/flux

Left align

Left align switches for more compact layouts using the align prop.

<flux:fieldset>    <flux:legend>Email notifications</flux:legend>
        <flux:switch label="Communication emails" align="left" />        <flux:switch label="Marketing emails" align="left" />        <flux:switch label="Social emails" align="left" />        <flux:switch label="Security emails" align="left" />
</flux:fieldset>

---

## Quickstart Create a Livewire component
Quickstart | livewire/livewire@4.x | Source: https://livewire.laravel.com/docs/4.x/quickstart

## Create a Livewire component

Livewire provides a convenient Artisan command to generate new components. Run the following command to make a new page component:

```shell
php artisan make:livewire pages::post.create
```

Since this component will be used as a full page, we use the `pages::` prefix to keep it organized in the pages directory.

This command will generate a new single-file component at `resources/views/pages/post/⚡create.blade.php`.

> [!info] What's with the ⚡ emoji?
> The lightning bolt makes Livewire components instantly recognizable in your editor. It's completely optional and can be disabled in your config if you prefer. See the [components documentation](/docs/4.x/components#creating-components) for more details.

---

## Components Switch > Fieldset
Components Switch | livewire/flux@2.x | Source: https://fluxui.dev/components/switch#livewire/flux

Fieldset

Group related switches within a fieldset.

<flux:fieldset>    <flux:legend>Email notifications</flux:legend>
        <flux:switch wire:model.live="communication" label="Communication emails" description="Receive emails about your account activity." />        <flux:separator variant="subtle" />        <flux:switch wire:model.live="marketing" label="Marketing emails" description="Receive emails about new products, features, and more." />        <flux:separator variant="subtle" />        <flux:switch wire:model.live="social" label="Social emails" description="Receive emails for friend requests, follows, and more." />        <flux:separator variant="subtle" />        <flux:switch wire:model.live="security" label="Security emails" description="Receive emails about your account activity and security." />
</flux:fieldset>

---

## Quickstart Install Livewire
Quickstart | livewire/livewire@4.x | Source: https://livewire.laravel.com/docs/4.x/quickstart

## Install Livewire

From the root directory of your Laravel app, run the following [Composer](https://getcomposer.org/) command:

```shell
composer require livewire/livewire
```

---

## Javascript The `Livewire` global object
Javascript | livewire/livewire@4.x | Source: https://livewire.laravel.com/docs/4.x/javascript

## The `Livewire` global object

Livewire's global object is the best starting point for interacting with Livewire from external scripts.

You can access the global `Livewire` JavaScript object on `window` from anywhere inside your client-side code.

It is often helpful to use `window.Livewire` inside a `livewire:init` event listener

### Accessing components

You can use the following methods to access specific Livewire components loaded on the current page:

```js
// Retrieve the $wire object for the first component on the page...
let component = Livewire.first()

// Retrieve a given component's `$wire` object by its ID...
let component = Livewire.find(id)

// Retrieve an array of component `$wire` objects by name...
let components = Livewire.getByName(name)

// Retrieve $wire objects for every component on the page...
let components = Livewire.all()
```

> [!info]
> Each of these methods returns a `$wire` object representing the component's state in Livewire.
>

> You can learn more about these objects in [the `$wire` documentation](#the-wire-object).

### Interacting with events

In addition to dispatching and listening for events from individual components in PHP, the global `Livewire` object allows you to interact with [Livewire's event system](/docs/4.x/events) from anywhere in your application:

```js
// Dispatch an event to any Livewire components listening...
Livewire.dispatch('post-created', { postId: 2 })

// Dispatch an event to a given Livewire component by name...
Livewire.dispatchTo('dashboard', 'post-created', { postId: 2 })

// Listen for events dispatched from Livewire components...
Livewire.on('post-created', ({ postId }) => {
    // ...
})
```

In certain scenarios, you might need to unregister global Livewire events. For instance, when working with Alpine components and `wire:navigate`, multiple listeners may be registered as `init` is called when navigating between pages. To address this, utilize the `destroy` function, automatically invoked by Alpine. Loop through all your listeners within this function to unregister them and prevent any unwanted accumulation.

```js
Alpine.data('MyComponent', () => ({
    listeners: [],
    init() {
        this.listeners.push(
            Livewire.on('post-created', (options) => {
                // Do something...
            })
        );
    },
    destroy() {
        this.listeners.forEach((listener) => {
            listener();
        });
    }
}));
```
### Using lifecycle hooks

Livewire allows you to hook into various parts of its global lifecycle using `Livewire.hook()`:

```js
// Register a callback to execute on a given internal Livewire hook...
Livewire.hook('component.init', ({ component, cleanup }) => {
    // ...
})
```

More information about Livewire's JavaScript hooks can be [found below](#javascript-hooks).

### Registering custom directives

Livewire allows you to register custom directives using `Livewire.directive()`.

Below is an example of a custom `wire:confirm` directive that uses JavaScript's `confirm()` dialog to confirm or cancel an action before it is sent to the server:

```html
<button wire:confirm="Are you sure?" wire:click="delete">Delete post</button>
```

Here is the implementation of `wire:confirm` using `Livewire.directive()`:

```js
Livewire.directive('confirm', ({ el, directive, component, cleanup }) => {
    let content =  directive.expression

    // The "directive" object gives you access to the parsed directive.
    // For example, here are its values for: wire:click.prevent="deletePost(1)"
    //
    // directive.raw = wire:click.prevent
    // directive.value = "click"
    // directive.modifiers = ['prevent']
    // directive.expression = "deletePost(1)"

    let onClick = e => {
        if (! confirm(content)) {
            e.preventDefault()
            e.stopImmediatePropagation()
        }
    }

    el.addEventListener('click', onClick, { capture: true })

    // Register any cleanup code inside `cleanup()` in the case
    // where a Livewire component is removed from the DOM while
    // the page is still active.
    cleanup(() => {
        el.removeEventListener('click', onClick)
    })
})
```

---

## Components Navbar > Profile switcher
Components Navbar | livewire/flux@2.x | Source: https://fluxui.dev/components/navbar#livewire/flux

Profile switcher

_[Truncated]_


Output:
Wall time: 3.2028 seconds
Output:
[{"type":"text","text":"# Search Results\n\n## Wire Model\nWire Model | livewire/livewire@4.x | Source: https://livewire.laravel.com/docs/4.x/wire-model\n\nLivewire makes it easy to bind a component property's value with form inputs using `wire:model`.\n\nHere is a simple example of using `wire:model` to bind the `$title` and `$content` properties with form inputs in a \"Create Post\" component:\n\n```php\nuse Livewire\\Component;\nuse App\\Models\\Post;\n\nclass CreatePost extends Component\n{\n    public $title = '';\n\n    public $content = '';\n\n    public function save()\n    {\n\t\t$post = Post::create([\n\t\t\t'title' => $this->title\n\t\t\t'content' => $this->content\n\t\t]);\n\n        // ...\n    }\n}\n```\n\n```blade\n<form wire:submit=\"save\">\n    <label>\n        <span>Title</span>\n\n        <input type=\"text\" wire:model=\"title\"> <!-- [tl! highlight] -->\n    </label>\n\n    <label>\n        <span>Content</span>\n\n        <textarea wire:model=\"content\"></textarea> <!-- [tl! highlight] -->\n    </label>\n\n\t<button type=\"submit\">Save</button>\n</form>\n```\n\nBecause both inputs use `wire:model`, their values will be synchronized with the server's properties when the \"Save\" button is pressed.\n\n> [!warning] \"Why isn't my component live updating as I type?\"\n> If you tried this in your browser and are confused why the title isn't automatically updating, it's because Livewire only updates a component when an \"action\" is submitted—like pressing a submit button—not when a user types into a field. This cuts down on network requests and improves performance. To enable \"live\" updating as a user types, you can use `wire:model.live` instead. [Learn more about data binding](/docs/4.x/properties#data-binding).\n\n---\n\n## Components Switch > flux:switch\nComponents Switch | livewire/flux@2.x | Source: https://fluxui.dev/components/switch#livewire/flux\n\n
flux:switch

<ui-table-scroll-area>

Prop

Description

\n    wire:model\n

Binds the switch to a Livewire property. See the wire:model documentation for more information.

\n    label\n

Label text displayed above the switch. When provided, wraps the switch in a flux:field component with an adjacent flux:label component. See the field component.

\n    description\n

Help text displayed below the switch. When provided alongside label, appears between the label and switch within the flux:field wrapper. See the field component.

\n    align\n

Alignment of the switch relative to its label. Options: right|start (default), left|end.

\n    disabled\n

Prevents user interaction with the switch.

</ui-table-scroll-area>

<ui-table-scroll-area>

Attribute

Description

\n    data-flux-switch\n

Applied to the root element for styling and identification.

\n    data-checked\n

Applied when the switch is in the \"on\" state.

</ui-table-scroll-area>

\n\n---\n\n## Docs Dark Mode > Toggle switch\nDocs Dark Mode | livewire/flux@2.x | Source: https://fluxui.dev/docs/dark-mode#livewire/flux\n\n
\n            Toggle switch\n

A simple toggle switch to allow users to control dark mode from something like a settings page.

<flux:switch x-data x-model=\"$flux.dark\" label=\"Dark mode\"  />

\n\n---\n\n## Components Checkbox > Checked\nComponents Checkbox | livewire/flux@2.x | Source: https://fluxui.dev/components/checkbox#livewire/flux\n\n
Checked

Mark a checkbox as checked by default.

<flux:checkbox checked />

\n\n---\n\n## Attribute Modelable Modifiers\nAttribute Modelable | livewire/livewire@4.x | Source: https://livewire.laravel.com/docs/4.x/attribute-modelable\n\n## Modifiers\n\nThe parent can use `wire:model` modifiers for timing and network control:\n\n```blade\n{{-- Live updates on every keystroke --}}\n<livewire:todo-input wire:model.live=\"todo\" />\n\n{{-- Debounce updates --}}\n<livewire:todo-input wire:model.live.debounce.500ms=\"todo\" />\n\n{{-- Throttle updates --}}\n<livewire:todo-input wire:model.live.throttle.500ms=\"todo\" />\n```\n\n> [!note] Event-based modifiers on components\n> Event-based modifiers like `.blur`, `.change`, and `.enter` control DOM events on specific elements, not reactive component bindings. To control sync timing for modelable components, place these modifiers on the actual input element inside the child component:\n>\n> ```blade\n> {{-- Parent --}}\n> <livewire:todo-input wire:model=\"todo\" />\n>\n> {{-- Child component --}}\n> <input wire:model.blur=\"value\" />\n> ```\n\n---\n\n## Forms Live-updating fields\nForms | livewire/livewire@4.x | Source: https://livewire.laravel.com/docs/4.x/forms\n\n## Live-updating fields\n\nBy default, Livewire only sends a network request when the form is submitted (or any other [action](/docs/4.x/actions) is called), not while the form is being filled out.\n\nTake the `post.create` component, for example. If you want to make sure the \"title\" input field is synchronized with the `$title` property on the backend as the user types, you may add the `.live` modifier to `wire:model` like so:\n\n```blade\n<input type=\"text\" wire:model.live=\"title\">\n```\n\nNow, as a user types into this field, network requests will be sent to the server to update `$title`. This is useful for things like a real-time search, where a dataset is filtered as a user types into a search box.\n\n---\n\n## Components Switch > Reference\nComponents Switch | livewire/flux@2.x | Source: https://fluxui.dev/components/switch#livewire/flux\n\n
\n    Reference\n

\n\n---\n\n## Components Switch > Switch\nComponents Switch | livewire/flux@2.x | Source: https://fluxui.dev/components/switch#livewire/flux\n\n

\n    Switch\n

Toggle a setting on or off. Suitable for binary options like enabling or disabling features.

\n        Use switches as auto-saving controls outside forms; checkboxes otherwise.\n

<flux:field variant=\"inline\">    <flux:label>Enable notifications</flux:label>    <flux:switch wire:model.live=\"notifications\" />    <flux:error name=\"notifications\" /></flux:field>

\n\n---\n\n## Components Switch > Left align\nComponents Switch | livewire/flux@2.x | Source: https://fluxui.dev/components/switch#livewire/flux\n\n
Left align

Left align switches for more compact layouts using the align prop.

<flux:fieldset>    <flux:legend>Email notifications</flux:legend>
        <flux:switch label=\"Communication emails\" align=\"left\" />        <flux:switch label=\"Marketing emails\" align=\"left\" />        <flux:switch label=\"Social emails\" align=\"left\" />        <flux:switch label=\"Security emails\" align=\"left\" />
</flux:fieldset>

\n\n---\n\n## Quickstart Create a Livewire component\nQuickstart | livewire/livewire@4.x | Source: https://livewire.laravel.com/docs/4.x/quickstart\n\n## Create a Livewire component\n\nLivewire provides a convenient Artisan command to generate new components. Run the following command to make a new page component:\n\n```shell\nphp artisan make:livewire pages::post.create\n```\n\nSince this component will be used as a full page, we use the `pages::` prefix to keep it organized in the pages directory.\n\nThis command will generate a new single-file component at `resources/views/pages/post/⚡create.blade.php`.\n\n> [!info] What's with the ⚡ emoji?\n> The lightning bolt makes Livewire components instantly recognizable in your editor. It's completely optional and can be disabled in your config if you prefer. See the [components documentation](/docs/4.x/components#creating-components) for more details.\n\n---\n\n## Components Switch > Fieldset\nComponents Switch | livewire/flux@2.x | Source: https://fluxui.dev/components/switch#livewire/flux\n\n
Fieldset

Group related switches within a fieldset.

<flux:fieldset>    <flux:legend>Email notifications</flux:legend>
        <flux:switch wire:model.live=\"communication\" label=\"Communication emails\" description=\"Receive emails about your account activity.\" />        <flux:separator variant=\"subtle\" />        <flux:switch wire:model.live=\"marketing\" label=\"Marketing emails\" description=\"Receive emails about new products, features, and more.\" />        <flux:separator variant=\"subtle\" />        <flux:switch wire:model.live=\"social\" label=\"Social emails\" description=\"Receive emails for friend requests, follows, and more.\" />        <flux:separator variant=\"subtle\" />        <flux:switch wire:model.live=\"security\" label=\"Security emails\" description=\"Receive emails about your account activity and security.\" />
</flux:fieldset>

\n\n---\n\n## Quickstart Install Livewire\nQuickstart | livewire/livewire@4.x | Source: https://livewire.laravel.com/docs/4.x/quickstart\n\n## Install Livewire\n\nFrom the root directory of your Laravel app, run the following [Composer](https://getcomposer.org/) command:\n\n```shell\ncomposer require livewire/livewire\n```\n\n---\n\n## Javascript The `Livewire` global object\nJavascript | livewire/livewire@4.x | Source: https://livewire.laravel.com/docs/4.x/javascript\n\n## The `Livewire` global object\n\nLivewire's global object is the best starting point for interacting with Livewire from external scripts.\n\nYou can access the global `Livewire` JavaScript object on `window` from anywhere inside your client-side code.\n\nIt is often helpful to use `window.Livewire` inside a `livewire:init` event listener\n\n### Accessing components\n\nYou can use the following methods to access specific Livewire components loaded on the current page:\n\n```js\n// Retrieve the $wire object for the first component on the page...\nlet component = Livewire.first()\n\n// Retrieve a given component's `$wire` object by its ID...\nlet component = Livewire.find(id)\n\n// Retrieve an array of component `$wire` objects by name...\nlet components = Livewire.getByName(name)\n\n// Retrieve $wire objects for every component on the page...\nlet components = Livewire.all()\n```\n\n> [!info]\n> Each of these methods returns a `$wire` object representing the component's state in Livewire.\n>

\n> You can learn more about these objects in [the `$wire` documentation](#the-wire-object).\n\n### Interacting with events\n\nIn addition to dispatching and listening for events from individual components in PHP, the global `Livewire` object allows you to interact with [Livewire's event system](/docs/4.x/events) from anywhere in your application:\n\n```js\n// Dispatch an event to any Livewire components listening...\nLivewire.dispatch('post-created', { postId: 2 })\n\n// Dispatch an event to a given Livewire component by name...\nLivewire.dispatchTo('dashboard', 'post-created', { postId: 2 })\n\n// Listen for events dispatched from Livewire components...\nLivewire.on('post-created', ({ postId }) => {\n    // ...\n})\n```\n\nIn certain scenarios, you might need to unregister global Livewire events. For instance, when working with Alpine components and `wire:navigate`, multiple listeners may be registered as `init` is called when navigating between pages. To address this, utilize the `destroy` function, automatically invoked by Alpine. Loop through all your listeners within this function to unregister them and prevent any unwanted accumulation.\n\n```js\nAlpine.data('MyComponent', () => ({\n    listeners: [],\n    init() {\n        this.listeners.push(\n            Livewire.on('post-created', (options) => {\n                // Do something...\n            })\n        );\n    },\n    destroy() {\n        this.listeners.forEach((listener) => {\n            listener();\n        });\n    }\n}));\n```\n### Using lifecycle hooks\n\nLivewire allows you to hook into various parts of its global lifecycle using `Livewire.hook()`:\n\n```js\n// Register a callback to execute on a given internal Livewire hook...\nLivewire.hook('component.init', ({ component, cleanup }) => {\n    // ...\n})\n```\n\nMore information about Livewire's JavaScript hooks can be [found below](#javascript-hooks).\n\n### Registering custom directives\n\nLivewire allows you to register custom directives using `Livewire.directive()`.\n\nBelow is an example of a custom `wire:confirm` directive that uses JavaScript's `confirm()` dialog to confirm or cancel an action before it is sent to the server:\n\n```html\n<button wire:confirm=\"Are you sure?\" wire:click=\"delete\">Delete post</button>\n```\n\nHere is the implementation of `wire:confirm` using `Livewire.directive()`:\n\n```js\nLivewire.directive('confirm', ({ el, directive, component, cleanup }) => {\n    let content =  directive.expression\n\n    // The \"directive\" object gives you access to the parsed directive.\n    // For example, here are its values for: wire:click.prevent=\"deletePost(1)\"\n    //\n    // directive.raw = wire:click.prevent\n    // directive.value = \"click\"\n    // directive.modifiers = ['prevent']\n    // directive.expression = \"deletePost(1)\"\n\n    let onClick = e => {\n        if (! confirm(content)) {\n            e.preventDefault()\n            e.stopImmediatePropagation()\n        }\n    }\n\n    el.addEventListener('click', onClick, { capture: true })\n\n    // Register any cleanup code inside `cleanup()` in the case\n    // where a Livewire component is removed from the DOM while\n    // the page is still active.\n    cleanup(() => {\n        el.removeEventListener('click', onClick)\n    })\n})\n```\n\n---\n\n## Components Navbar > Profile switcher\nComponents Navbar | livewire/flux@2.x | Source: https://fluxui.dev/components/navbar#livewire/flux\n\n
Profile switcher

\n\n_[Truncated]_"}]


The docs confirm the switch needs a live model update if the label should reflect the new state immediately. I’m making that targeted Blade change, then I’ll rerun the affected checks and repeat the browser save path.


Input:
*** Begin Patch
*** Update File: /Users/fabianwesner/Herd/shop/resources/views/livewire/admin/discounts/form.blade.php
@@
-            <flux:switch wire:model="isActive" label="{{ $isActive ? 'Active' : 'Disabled' }}" align="left" />
+            <flux:switch wire:model.live="isActive" label="{{ $isActive ? 'Active' : 'Disabled' }}" align="left" />
*** End Patch


Success. Updated the following files:
M /Users/fabianwesner/Herd/shop/resources/views/livewire/admin/discounts/form.blade.php

@@ -144,3 +144,3 @@
         <div class="rounded-lg border border-zinc-200 bg-white p-5 dark:border-zinc-700 dark:bg-zinc-900">
-            <flux:switch wire:model="isActive" label="{{ $isActive ? 'Active' : 'Disabled' }}" align="left" />
+            <flux:switch wire:model.live="isActive" label="{{ $isActive ? 'Active' : 'Disabled' }}" align="left" />
         </div>


Output: {"output":"Success. Updated the following files:\nM /Users/fabianwesner/Herd/shop/resources/views/livewire/admin/discounts/form.blade.php\n","metadata":{"exit_code":0,"duration_seconds":0.0}}


php artisan test --compact tests/Feature/Admin/DiscountManagementTest.php


php artisan route:list --except-vendor | rg "admin/discounts|admin\.discounts"


Output:
Chunk ID: 9ede1c
Wall time: 0.2187 seconds
Process exited with code 0
Original token count: 5
Output:
{"result":"pass"}


/bin/zsh
-lc
vendor/bin/pint --dirty --format agent


> build
> vite build

vite v7.3.1 building client environment for production...
transforming...
✓ 2 modules transformed.
Generated an empty chunk: "app".
rendering chunks...
computing gzip size...
public/build/manifest.json              0.33 kB │ gzip:  0.17 kB
public/build/assets/app-BrGbi8qr.css  226.28 kB │ gzip: 31.05 kB
public/build/assets/app-l0sNRNKZ.js     0.00 kB │ gzip:  0.02 kB
✓ built in 330ms


Output:
Chunk ID: de8d25
Wall time: 3.2310 seconds
Process exited with code 0
Original token count: 18
Output:

  ........

  Tests:    8 passed (53 assertions)
  Duration: 3.00s


Output:
Chunk ID: 1dee41
Wall time: 0.6537 seconds
Process exited with code 0
Original token count: 105
Output:

> build
> vite build

vite v7.3.1 building client environment for production...
transforming...
✓ 2 modules transformed.
Generated an empty chunk: "app".
rendering chunks...
computing gzip size...
public/build/manifest.json              0.33 kB │ gzip:  0.17 kB
public/build/assets/app-BrGbi8qr.css  226.28 kB │ gzip: 31.05 kB
public/build/assets/app-l0sNRNKZ.js     0.00 kB │ gzip:  0.02 kB
✓ built in 330ms


Output:
Chunk ID: 3a110c
Wall time: 0.1708 seconds
Process exited with code 1
Original token count: 0
Output:


php artisan test --compact tests/Feature/Admin/DiscountManagementTest.php

  ........

  Tests:    8 passed (53 assertions)
  Duration: 3.00s


The switch binding patch is covered by the discount feature test and asset build. The route-list filter returned no lines with that exact `rg` pattern, so I’m checking the route names directly before going back to the browser.


php artisan route:list --name=admin.discounts


rg -n "admin\.discounts|admin/discounts|Discounts" routes/web.php resources/views/layouts/app/sidebar.blade.php


rg -n "admin\.discounts|admin/discounts|Discounts" routes/web.php resources/views/layouts/app/sidebar.blade.php

rg -n "admin\\.discounts|admin/discounts|Discounts" routes/web.php resources/views/layouts/app/sidebar.blade.php

Question: admin\.discounts|admin/discounts|Discounts

resources/views/layouts/app/sidebar.blade.php:43:                    <flux:sidebar.item icon="tag" :href="route('admin.discounts.index')" :current="request()->routeIs('admin.discounts.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:44:                        {{ __('Discounts') }}
routes/web.php:10:use App\Livewire\Admin\Discounts\Form as AdminDiscountForm;
routes/web.php:11:use App\Livewire\Admin\Discounts\Index as AdminDiscountsIndex;
routes/web.php:68:    Route::livewire('discounts', AdminDiscountsIndex::class)->name('discounts.index');


Output:
Chunk ID: 0ba4e1
Wall time: 0.0363 seconds
Process exited with code 0
Original token count: 83
Output:

  GET|HEAD       admin/discounts admin.discounts.index › Livewire\Mechanisms …
  GET|HEAD       admin/discounts/create admin.discounts.create › Livewire\Mec…
  GET|HEAD       admin/discounts/{discount}/edit admin.discounts.edit › Livew…

                                                            Showing [3] routes


Output:
Chunk ID: d165e1
Wall time: 0.0390 seconds
Process exited with code 0
Original token count: 458
Output:

  GET|HEAD   admin admin.dashboard › Livewire\Mechanisms › LivewirePageContro…
  GET|HEAD   admin/collections admin.collections.index › Livewire\Mechanisms …
  GET|HEAD   admin/collections/create admin.collections.create › Livewire\Mec…
  GET|HEAD   admin/collections/{collection}/edit admin.collections.edit › Liv…
  GET|HEAD   admin/customers admin.customers.index › Livewire\Mechanisms › Li…
  GET|HEAD   admin/customers/{customer} admin.customers.show › Livewire\Mecha…
  GET|HEAD   admin/discounts admin.discounts.index › Livewire\Mechanisms › Li…
  GET|HEAD   admin/discounts/create admin.discounts.create › Livewire\Mechani…
  GET|HEAD   admin/discounts/{discount}/edit admin.discounts.edit › Livewire\…
  GET|HEAD   admin/inventory admin.inventory.index › Livewire\Mechanisms › Li…
  GET|HEAD   admin/login admin.login › Livewire\Mechanisms › LivewirePageCont…
  POST       admin/logout ....................................... admin.logout
  GET|HEAD   admin/orders admin.orders.index › Livewire\Mechanisms › Livewire…
  GET|HEAD   admin/orders/{order} admin.orders.show › Livewire\Mechanisms › L…
  GET|HEAD   admin/products admin.products.index › Livewire\Mechanisms › Live…
  GET|HEAD   admin/products/create admin.products.create › Livewire\Mechanism…
  GET|HEAD   admin/products/{product}/edit admin.products.edit › Livewire\Mec…
  GET|HEAD   api/admin/v1/stores/{store}/orders api.admin.v1.orders.index › A…
  GET|HEAD   api/admin/v1/stores/{store}/orders/{order} api.admin.v1.orders.s…
  POST       api/admin/v1/stores/{store}/orders/{order}/fulfillments api.admi…
  POST       api/admin/v1/stores/{store}/orders/{order}/refunds api.admin.v1.…

                                                           Showing [21] routes


Output:
Chunk ID: ed6053
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 141
Output:
resources/views/layouts/app/sidebar.blade.php:43:                    <flux:sidebar.item icon="tag" :href="route('admin.discounts.index')" :current="request()->routeIs('admin.discounts.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:44:                        {{ __('Discounts') }}
routes/web.php:10:use App\Livewire\Admin\Discounts\Form as AdminDiscountForm;
routes/web.php:11:use App\Livewire\Admin\Discounts\Index as AdminDiscountsIndex;
routes/web.php:68:    Route::livewire('discounts', AdminDiscountsIndex::class)->name('discounts.index');


php artisan route:list --name=admin.discounts

  GET|HEAD       admin/discounts admin.discounts.index › Livewire\Mechanisms …
  GET|HEAD       admin/discounts/create admin.discounts.create › Livewire\Mec…
  GET|HEAD       admin/discounts/{discount}/edit admin.discounts.edit › Livew…

                                                            Showing [3] routes


/bin/zsh
-lc
php artisan route:list --path=admin

  GET|HEAD   admin admin.dashboard › Livewire\Mechanisms › LivewirePageContro…
  GET|HEAD   admin/collections admin.collections.index › Livewire\Mechanisms …
  GET|HEAD   admin/collections/create admin.collections.create › Livewire\Mec…
  GET|HEAD   admin/collections/{collection}/edit admin.collections.edit › Liv…
  GET|HEAD   admin/customers admin.customers.index › Livewire\Mechanisms › Li…
  GET|HEAD   admin/customers/{customer} admin.customers.show › Livewire\Mecha…
  GET|HEAD   admin/discounts admin.discounts.index › Livewire\Mechanisms › Li…
  GET|HEAD   admin/discounts/create admin.discounts.create › Livewire\Mechani…
  GET|HEAD   admin/discounts/{discount}/edit admin.discounts.edit › Livewire\…
  GET|HEAD   admin/inventory admin.inventory.index › Livewire\Mechanisms › Li…
  GET|HEAD   admin/login admin.login › Livewire\Mechanisms › LivewirePageCont…
  POST       admin/logout ....................................... admin.logout
  GET|HEAD   admin/orders admin.orders.index › Livewire\Mechanisms › Livewire…
  GET|HEAD   admin/orders/{order} admin.orders.show › Livewire\Mechanisms › L…
  GET|HEAD   admin/products admin.products.index › Livewire\Mechanisms › Live…
  GET|HEAD   admin/products/create admin.products.create › Livewire\Mechanism…
  GET|HEAD   admin/products/{product}/edit admin.products.edit › Livewire\Mec…
  GET|HEAD   api/admin/v1/stores/{store}/orders api.admin.v1.orders.index › A…
  GET|HEAD   api/admin/v1/stores/{store}/orders/{order} api.admin.v1.orders.s…
  POST       api/admin/v1/stores/{store}/orders/{order}/fulfillments api.admi…
  POST       api/admin/v1/stores/{store}/orders/{order}/refunds api.admin.v1.…

                                                           Showing [21] routes


### Ran Playwright code
```js
await page.goto('http://shop.test/admin/discounts/create');
```
### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Create discount](http://shop.test/admin/discounts/create)
### Page
- Page URL: http://shop.test/admin/discounts/create
- Page Title: Create discount
### Snapshot
- [Snapshot](.playwright-mcp/page-2026-05-04T02-28-17-683Z.yml)
### Events
- New console entries: .playwright-mcp/console-2026-05-04T02-28-17-516Z.log#L1


Output:
Wall time: 0.1700 seconds
Output:
[{"type":"text","text":"### Ran Playwright code\n```js\nawait page.goto('http://shop.test/admin/discounts/create');\n```\n### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Create discount](http://shop.test/admin/discounts/create)\n### Page\n- Page URL: http://shop.test/admin/discounts/create\n- Page Title: Create discount\n### Snapshot\n- [Snapshot](.playwright-mcp/page-2026-05-04T02-28-17-683Z.yml)\n### Events\n- New console entries: .playwright-mcp/console-2026-05-04T02-28-17-516Z.log#L1"}]


### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Create discount](http://shop.test/admin/discounts/create)
### Page
- Page URL: http://shop.test/admin/discounts/create
- Page Title: Create discount
### Snapshot
```yaml
- generic [active] [ref=e1]:
  - generic [ref=e2]:
    - link "Shop" [ref=e4] [cursor=pointer]:
      - /url: http://shop.test/admin
      - img [ref=e6]
      - generic [ref=e8]: Shop
    - navigation [ref=e9]:
      - generic [ref=e10]:
        - generic [ref=e12]: Platform
        - link "Dashboard" [ref=e15] [cursor=pointer]:
          - /url: http://shop.test/admin
          - img [ref=e17]
          - generic [ref=e19]: Dashboard
      - generic [ref=e20]:
        - generic [ref=e22]: Products
        - generic [ref=e23]:
          - link "Products" [ref=e25] [cursor=pointer]:
            - /url: http://shop.test/admin/products
            - img [ref=e27]
            - generic [ref=e29]: Products
          - link "Collections" [ref=e31] [cursor=pointer]:
            - /url: http://shop.test/admin/collections
            - img [ref=e33]
            - generic [ref=e35]: Collections
          - link "Inventory" [ref=e37] [cursor=pointer]:
            - /url: http://shop.test/admin/inventory
            - img [ref=e39]
            - generic [ref=e41]: Inventory
      - generic [ref=e42]:
        - generic [ref=e44]: Operations
        - generic [ref=e45]:
          - link "Orders" [ref=e47] [cursor=pointer]:
            - /url: http://shop.test/admin/orders
            - img [ref=e49]
            - generic [ref=e51]: Orders
          - link "Customers" [ref=e53] [cursor=pointer]:
            - /url: http://shop.test/admin/customers
            - img [ref=e55]
            - generic [ref=e57]: Customers
          - link "Discounts" [ref=e59] [cursor=pointer]:
            - /url: http://shop.test/admin/discounts
            - img [ref=e61]
            - generic [ref=e64]: Discounts
    - navigation [ref=e66]:
      - link "Repository" [ref=e68] [cursor=pointer]:
        - /url: https://github.com/laravel/livewire-starter-kit
        - img [ref=e70]
        - generic [ref=e75]: Repository
      - link "Documentation" [ref=e77] [cursor=pointer]:
        - /url: https://laravel.com/docs/starter-kits#livewire
        - img [ref=e79]
        - generic [ref=e81]: Documentation
    - button "AA Acme Admin" [ref=e83]:
      - generic [ref=e86]: AA
      - generic [ref=e87]: Acme Admin
      - img [ref=e89]
  - generic [ref=e93]:
    - generic [ref=e94]:
      - generic [ref=e95]:
        - generic [ref=e96]: Create discount
        - paragraph [ref=e97]: Configure the promotion type, value, eligibility, limits, and dates.
      - link "Discounts" [ref=e98] [cursor=pointer]:
        - /url: http://shop.test/admin/discounts
        - img [ref=e99]
        - generic [ref=e101]: Discounts
    - generic [ref=e102]:
      - generic [ref=e104]:
        - generic [ref=e105]: Type
        - radiogroup "Type" [ref=e106]:
          - generic [ref=e107]:
            - radio "Discount code" [checked] [ref=e108]
            - generic [ref=e111]: Discount code
            - generic [ref=e112]: Customers enter a code at checkout
          - generic [ref=e113]:
            - radio "Automatic discount" [ref=e114]
            - generic [ref=e116]: Automatic discount
            - generic [ref=e117]: Applied automatically at checkout
      - generic [ref=e118]:
        - generic [ref=e119]: Code
        - generic [ref=e120]:
          - generic [ref=e122]:
            - generic [ref=e123]: Discount code
            - textbox "Discount code" [ref=e125]:
              - /placeholder: SUMMER20
          - button "Generate" [ref=e127]:
            - img [ref=e129]
            - generic [ref=e132]: Generate
      - generic [ref=e133]:
        - generic [ref=e134]: Value
        - generic [ref=e135]:
          - generic [ref=e136]:
            - generic [ref=e137]: Value type
            - radiogroup "Value type" [ref=e138]:
              - generic [ref=e139]:
                - radio "Percentage" [checked] [ref=e140]
                - generic [ref=e143]: Percentage
              - generic [ref=e144]:
                - radio "Fixed amount" [ref=e145]
                - generic [ref=e147]: Fixed amount
              - generic [ref=e148]:
                - radio "Free shipping" [ref=e149]
                - generic [ref=e151]: Free shipping
          - generic [ref=e153]:
            - generic [ref=e154]: Percentage
            - spinbutton "Percentage" [ref=e156]: "10"
      - generic [ref=e157]:
        - generic [ref=e158]: Conditions
        - generic [ref=e159]:
          - generic [ref=e161]:
            - generic [ref=e162]: Minimum purchase amount
            - generic [ref=e163]: Leave empty for no minimum
            - spinbutton "Minimum purchase amount" [ref=e165]
          - generic [ref=e166]:
            - generic [ref=e168]:
              - generic [ref=e169]: Specific products
              - generic [ref=e170]:
                - generic
                - textbox "Specific products" [ref=e171]:
                  - /placeholder: Search products...
            - generic [ref=e174]:
              - generic [ref=e175]: Specific collections
              - generic [ref=e176]:
                - generic
                - textbox "Specific collections" [ref=e177]:
                  - /placeholder: Search collections...
      - generic [ref=e179]:
        - generic [ref=e180]: Usage limits
        - generic [ref=e181]:
          - generic [ref=e182]:
            - generic [ref=e183]: Total usage limit
            - spinbutton "Total usage limit" [ref=e185]
          - generic [ref=e187]:
            - checkbox "Limit to one use per customer" [ref=e188]
            - generic [ref=e190]: Limit to one use per customer
      - generic [ref=e191]:
        - generic [ref=e192]: Active dates
        - generic [ref=e193]:
          - generic [ref=e194]:
            - generic [ref=e195]: Start date
            - textbox "Start date" [ref=e197]: 2026-05-04T02:28
          - generic [ref=e198]:
            - generic [ref=e199]: End date
            - generic [ref=e200]: Leave empty for no end date
            - textbox "End date" [ref=e202]
      - generic [ref=e204]:
        - switch "Disabled" [ref=e205]
        - generic [ref=e207]: Disabled
      - generic [ref=e209]:
        - link "Discard" [ref=e210] [cursor=pointer]:
          - /url: http://shop.test/admin/discounts
        - button "Save" [ref=e211]:
          - img [ref=e213]
          - generic [ref=e216]: Save
```


Output:
Wall time: 0.0364 seconds
Output:
[{"type":"text","text":"### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Create discount](http://shop.test/admin/discounts/create)\n### Page\n- Page URL: http://shop.test/admin/discounts/create\n- Page Title: Create discount\n### Snapshot\n```yaml\n- generic [active] [ref=e1]:\n  - generic [ref=e2]:\n    - link \"Shop\" [ref=e4] [cursor=pointer]:\n      - /url: http://shop.test/admin\n      - img [ref=e6]\n      - generic [ref=e8]: Shop\n    - navigation [ref=e9]:\n      - generic [ref=e10]:\n        - generic [ref=e12]: Platform\n        - link \"Dashboard\" [ref=e15] [cursor=pointer]:\n          - /url: http://shop.test/admin\n          - img [ref=e17]\n          - generic [ref=e19]: Dashboard\n      - generic [ref=e20]:\n        - generic [ref=e22]: Products\n        - generic [ref=e23]:\n          - link \"Products\" [ref=e25] [cursor=pointer]:\n            - /url: http://shop.test/admin/products\n            - img [ref=e27]\n            - generic [ref=e29]: Products\n          - link \"Collections\" [ref=e31] [cursor=pointer]:\n            - /url: http://shop.test/admin/collections\n            - img [ref=e33]\n            - generic [ref=e35]: Collections\n          - link \"Inventory\" [ref=e37] [cursor=pointer]:\n            - /url: http://shop.test/admin/inventory\n            - img [ref=e39]\n            - generic [ref=e41]: Inventory\n      - generic [ref=e42]:\n        - generic [ref=e44]: Operations\n        - generic [ref=e45]:\n          - link \"Orders\" [ref=e47] [cursor=pointer]:\n            - /url: http://shop.test/admin/orders\n            - img [ref=e49]\n            - generic [ref=e51]: Orders\n          - link \"Customers\" [ref=e53] [cursor=pointer]:\n            - /url: http://shop.test/admin/customers\n            - img [ref=e55]\n            - generic [ref=e57]: Customers\n          - link \"Discounts\" [ref=e59] [cursor=pointer]:\n            - /url: http://shop.test/admin/discounts\n            - img [ref=e61]\n            - generic [ref=e64]: Discounts\n    - navigation [ref=e66]:\n      - link \"Repository\" [ref=e68] [cursor=pointer]:\n        - /url: https://github.com/laravel/livewire-starter-kit\n        - img [ref=e70]\n        - generic [ref=e75]: Repository\n      - link \"Documentation\" [ref=e77] [cursor=pointer]:\n        - /url: https://laravel.com/docs/starter-kits#livewire\n        - img [ref=e79]\n        - generic [ref=e81]: Documentation\n    - button \"AA Acme Admin\" [ref=e83]:\n      - generic [ref=e86]: AA\n      - generic [ref=e87]: Acme Admin\n      - img [ref=e89]\n  - generic [ref=e93]:\n    - generic [ref=e94]:\n      - generic [ref=e95]:\n        - generic [ref=e96]: Create discount\n        - paragraph [ref=e97]: Configure the promotion type, value, eligibility, limits, and dates.\n      - link \"Discounts\" [ref=e98] [cursor=pointer]:\n        - /url: http://shop.test/admin/discounts\n        - img [ref=e99]\n        - generic [ref=e101]: Discounts\n    - generic [ref=e102]:\n      - generic [ref=e104]:\n        - generic [ref=e105]: Type\n        - radiogroup \"Type\" [ref=e106]:\n          - generic [ref=e107]:\n            - radio \"Discount code\" [checked] [ref=e108]\n            - generic [ref=e111]: Discount code\n            - generic [ref=e112]: Customers enter a code at checkout\n          - generic [ref=e113]:\n            - radio \"Automatic discount\" [ref=e114]\n            - generic [ref=e116]: Automatic discount\n            - generic [ref=e117]: Applied automatically at checkout\n      - generic [ref=e118]:\n        - generic [ref=e119]: Code\n        - generic [ref=e120]:\n          - generic [ref=e122]:\n            - generic [ref=e123]: Discount code\n            - textbox \"Discount code\" [ref=e125]:\n              - /placeholder: SUMMER20\n          - button \"Generate\" [ref=e127]:\n            - img [ref=e129]\n            - generic [ref=e132]: Generate\n      - generic [ref=e133]:\n        - generic [ref=e134]: Value\n        - generic [ref=e135]:\n          - generic [ref=e136]:\n            - generic [ref=e137]: Value type\n            - radiogroup \"Value type\" [ref=e138]:\n              - generic [ref=e139]:\n                - radio \"Percentage\" [checked] [ref=e140]\n                - generic [ref=e143]: Percentage\n              - generic [ref=e144]:\n                - radio \"Fixed amount\" [ref=e145]\n                - generic [ref=e147]: Fixed amount\n              - generic [ref=e148]:\n                - radio \"Free shipping\" [ref=e149]\n                - generic [ref=e151]: Free shipping\n          - generic [ref=e153]:\n            - generic [ref=e154]: Percentage\n            - spinbutton \"Percentage\" [ref=e156]: \"10\"\n      - generic [ref=e157]:\n        - generic [ref=e158]: Conditions\n        - generic [ref=e159]:\n          - generic [ref=e161]:\n            - generic [ref=e162]: Minimum purchase amount\n            - generic [ref=e163]: Leave empty for no minimum\n            - spinbutton \"Minimum purchase amount\" [ref=e165]\n          - generic [ref=e166]:\n            - generic [ref=e168]:\n              - generic [ref=e169]: Specific products\n              - generic [ref=e170]:\n                - generic\n                - textbox \"Specific products\" [ref=e171]:\n                  - /placeholder: Search products...\n            - generic [ref=e174]:\n              - generic [ref=e175]: Specific collections\n              - generic [ref=e176]:\n                - generic\n                - textbox \"Specific collections\" [ref=e177]:\n                  - /placeholder: Search collections...\n      - generic [ref=e179]:\n        - generic [ref=e180]: Usage limits\n        - generic [ref=e181]:\n          - generic [ref=e182]:\n            - generic [ref=e183]: Total usage limit\n            - spinbutton \"Total usage limit\" [ref=e185]\n          - generic [ref=e187]:\n            - checkbox \"Limit to one use per customer\" [ref=e188]\n            - generic [ref=e190]: Limit to one use per customer\n      - generic [ref=e191]:\n        - generic [ref=e192]: Active dates\n        - generic [ref=e193]:\n          - generic [ref=e194]:\n            - generic [ref=e195]: Start date\n            - textbox \"Start date\" [ref=e197]: 2026-05-04T02:28\n          - generic [ref=e198]:\n            - generic [ref=e199]: End date\n            - generic [ref=e200]: Leave empty for no end date\n            - textbox \"End date\" [ref=e202]\n      - generic [ref=e204]:\n        - switch \"Disabled\" [ref=e205]\n        - generic [ref=e207]: Disabled\n      - generic [ref=e209]:\n        - link \"Discard\" [ref=e210] [cursor=pointer]:\n          - /url: http://shop.test/admin/discounts\n        - button \"Save\" [ref=e211]:\n          - img [ref=e213]\n          - generic [ref=e216]: Save\n```"}]


### Ran Playwright code
```js
await page.getByRole('textbox', { name: 'Discount code' }).fill('e2esmoke');
await page.getByRole('spinbutton', { name: 'Percentage' }).fill('15');
await page.getByRole('spinbutton', { name: 'Minimum purchase amount' }).fill('25');
await page.getByRole('spinbutton', { name: 'Total usage limit' }).fill('3');
await page.getByRole('checkbox', { name: 'Limit to one use per customer' }).setChecked(true);
```


Output:
Wall time: 0.1751 seconds
Output:
[{"type":"text","text":"### Ran Playwright code\n```js\nawait page.getByRole('textbox', { name: 'Discount code' }).fill('e2esmoke');\nawait page.getByRole('spinbutton', { name: 'Percentage' }).fill('15');\nawait page.getByRole('spinbutton', { name: 'Minimum purchase amount' }).fill('25');\nawait page.getByRole('spinbutton', { name: 'Total usage limit' }).fill('3');\nawait page.getByRole('checkbox', { name: 'Limit to one use per customer' }).setChecked(true);\n```"}]


### Ran Playwright code
```js
await page.getByRole('switch', { name: 'Disabled' }).click();
```
### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Create discount](http://shop.test/admin/discounts/create)
### Page
- Page URL: http://shop.test/admin/discounts/create
- Page Title: Create discount
### Snapshot
- [Snapshot](.playwright-mcp/page-2026-05-04T02-28-35-545Z.yml)


Output:
Wall time: 2.0773 seconds
Output:
[{"type":"text","text":"### Ran Playwright code\n```js\nawait page.getByRole('switch', { name: 'Disabled' }).click();\n```\n### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Create discount](http://shop.test/admin/discounts/create)\n### Page\n- Page URL: http://shop.test/admin/discounts/create\n- Page Title: Create discount\n### Snapshot\n- [Snapshot](.playwright-mcp/page-2026-05-04T02-28-35-545Z.yml)"}]


### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Create discount](http://shop.test/admin/discounts/create)
### Page
- Page URL: http://shop.test/admin/discounts/create
- Page Title: Create discount
### Snapshot
```yaml
- generic [ref=e204]:
  - switch "Active" [checked] [active] [ref=e219]
  - generic [ref=e207]: Active
```


Output:
Wall time: 0.0101 seconds
Output:
[{"type":"text","text":"### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Create discount](http://shop.test/admin/discounts/create)\n### Page\n- Page URL: http://shop.test/admin/discounts/create\n- Page Title: Create discount\n### Snapshot\n```yaml\n- generic [ref=e204]:\n  - switch \"Active\" [checked] [active] [ref=e219]\n  - generic [ref=e207]: Active\n```"}]


### Error
Error: Ref e211 not found in the current page snapshot. Try capturing new snapshot.


Output:
Wall time: 0.0024 seconds
Output:
[{"type":"text","text":"### Error\nError: Ref e211 not found in the current page snapshot. Try capturing new snapshot."}]


### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Create discount](http://shop.test/admin/discounts/create)
### Page
- Page URL: http://shop.test/admin/discounts/create
- Page Title: Create discount
### Snapshot
```yaml
- generic [ref=e1]:
  - generic [ref=e2]:
    - link "Shop" [ref=e4] [cursor=pointer]:
      - /url: http://shop.test/admin
      - img [ref=e6]
      - generic [ref=e8]: Shop
    - navigation [ref=e9]:
      - generic [ref=e10]:
        - generic [ref=e12]: Platform
        - link "Dashboard" [ref=e15] [cursor=pointer]:
          - /url: http://shop.test/admin
          - img [ref=e17]
          - generic [ref=e19]: Dashboard
      - generic [ref=e20]:
        - generic [ref=e22]: Products
        - generic [ref=e23]:
          - link "Products" [ref=e25] [cursor=pointer]:
            - /url: http://shop.test/admin/products
          - link "Collections" [ref=e31] [cursor=pointer]:
            - /url: http://shop.test/admin/collections
          - link "Inventory" [ref=e37] [cursor=pointer]:
            - /url: http://shop.test/admin/inventory
      - generic [ref=e42]:
        - generic [ref=e44]: Operations
        - generic [ref=e45]:
          - link "Orders" [ref=e47] [cursor=pointer]:
            - /url: http://shop.test/admin/orders
          - link "Customers" [ref=e53] [cursor=pointer]:
            - /url: http://shop.test/admin/customers
          - link "Discounts" [ref=e59] [cursor=pointer]:
            - /url: http://shop.test/admin/discounts
    - navigation [ref=e66]:
      - link "Repository" [ref=e68] [cursor=pointer]:
        - /url: https://github.com/laravel/livewire-starter-kit
        - img [ref=e70]
        - generic [ref=e75]: Repository
      - link "Documentation" [ref=e77] [cursor=pointer]:
        - /url: https://laravel.com/docs/starter-kits#livewire
        - img [ref=e79]
        - generic [ref=e81]: Documentation
    - button "AA Acme Admin" [ref=e83]:
      - generic [ref=e86]: AA
      - generic [ref=e87]: Acme Admin
      - img [ref=e89]
  - generic [ref=e93]:
    - generic [ref=e94]:
      - generic [ref=e95]:
        - generic [ref=e96]: Create discount
        - paragraph [ref=e97]: Configure the promotion type, value, eligibility, limits, and dates.
      - link "Discounts" [ref=e98] [cursor=pointer]:
        - /url: http://shop.test/admin/discounts
        - img [ref=e99]
        - generic [ref=e101]: Discounts
    - generic [ref=e102]:
      - generic [ref=e104]:
        - generic [ref=e105]: Type
        - radiogroup "Type" [ref=e106]:
          - generic [ref=e107]
          - generic [ref=e113]
      - generic [ref=e118]:
        - generic [ref=e119]: Code
        - generic [ref=e120]:
          - generic [ref=e122]
          - button "Generate" [ref=e127]
      - generic [ref=e133]:
        - generic [ref=e134]: Value
        - generic [ref=e135]:
          - generic [ref=e136]
          - generic [ref=e153]
      - generic [ref=e157]:
        - generic [ref=e158]: Conditions
        - generic [ref=e159]:
          - generic [ref=e161]
          - generic [ref=e166]
      - generic [ref=e179]:
        - generic [ref=e180]: Usage limits
        - generic [ref=e181]:
          - generic [ref=e182]
          - generic [ref=e187]
      - generic [ref=e191]:
        - generic [ref=e192]: Active dates
        - generic [ref=e193]:
          - generic [ref=e194]
          - generic [ref=e198]
      - generic [ref=e204]:
        - switch "Active" [checked] [active] [ref=e219]
        - generic [ref=e207]: Active
      - generic [ref=e209]:
        - link "Discard" [ref=e210] [cursor=pointer]:
          - /url: http://shop.test/admin/discounts
        - button "Save" [ref=e211]:
          - img [ref=e213]
          - generic [ref=e216]: Save
```


Output:
Wall time: 0.0152 seconds
Output:
[{"type":"text","text":"### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Create discount](http://shop.test/admin/discounts/create)\n### Page\n- Page URL: http://shop.test/admin/discounts/create\n- Page Title: Create discount\n### Snapshot\n```yaml\n- generic [ref=e1]:\n  - generic [ref=e2]:\n    - link \"Shop\" [ref=e4] [cursor=pointer]:\n      - /url: http://shop.test/admin\n      - img [ref=e6]\n      - generic [ref=e8]: Shop\n    - navigation [ref=e9]:\n      - generic [ref=e10]:\n        - generic [ref=e12]: Platform\n        - link \"Dashboard\" [ref=e15] [cursor=pointer]:\n          - /url: http://shop.test/admin\n          - img [ref=e17]\n          - generic [ref=e19]: Dashboard\n      - generic [ref=e20]:\n        - generic [ref=e22]: Products\n        - generic [ref=e23]:\n          - link \"Products\" [ref=e25] [cursor=pointer]:\n            - /url: http://shop.test/admin/products\n          - link \"Collections\" [ref=e31] [cursor=pointer]:\n            - /url: http://shop.test/admin/collections\n          - link \"Inventory\" [ref=e37] [cursor=pointer]:\n            - /url: http://shop.test/admin/inventory\n      - generic [ref=e42]:\n        - generic [ref=e44]: Operations\n        - generic [ref=e45]:\n          - link \"Orders\" [ref=e47] [cursor=pointer]:\n            - /url: http://shop.test/admin/orders\n          - link \"Customers\" [ref=e53] [cursor=pointer]:\n            - /url: http://shop.test/admin/customers\n          - link \"Discounts\" [ref=e59] [cursor=pointer]:\n            - /url: http://shop.test/admin/discounts\n    - navigation [ref=e66]:\n      - link \"Repository\" [ref=e68] [cursor=pointer]:\n        - /url: https://github.com/laravel/livewire-starter-kit\n        - img [ref=e70]\n        - generic [ref=e75]: Repository\n      - link \"Documentation\" [ref=e77] [cursor=pointer]:\n        - /url: https://laravel.com/docs/starter-kits#livewire\n        - img [ref=e79]\n        - generic [ref=e81]: Documentation\n    - button \"AA Acme Admin\" [ref=e83]:\n      - generic [ref=e86]: AA\n      - generic [ref=e87]: Acme Admin\n      - img [ref=e89]\n  - generic [ref=e93]:\n    - generic [ref=e94]:\n      - generic [ref=e95]:\n        - generic [ref=e96]: Create discount\n        - paragraph [ref=e97]: Configure the promotion type, value, eligibility, limits, and dates.\n      - link \"Discounts\" [ref=e98] [cursor=pointer]:\n        - /url: http://shop.test/admin/discounts\n        - img [ref=e99]\n        - generic [ref=e101]: Discounts\n    - generic [ref=e102]:\n      - generic [ref=e104]:\n        - generic [ref=e105]: Type\n        - radiogroup \"Type\" [ref=e106]:\n          - generic [ref=e107]\n          - generic [ref=e113]\n      - generic [ref=e118]:\n        - generic [ref=e119]: Code\n        - generic [ref=e120]:\n          - generic [ref=e122]\n          - button \"Generate\" [ref=e127]\n      - generic [ref=e133]:\n        - generic [ref=e134]: Value\n        - generic [ref=e135]:\n          - generic [ref=e136]\n          - generic [ref=e153]\n      - generic [ref=e157]:\n        - generic [ref=e158]: Conditions\n        - generic [ref=e159]:\n          - generic [ref=e161]\n          - generic [ref=e166]\n      - generic [ref=e179]:\n        - generic [ref=e180]: Usage limits\n        - generic [ref=e181]:\n          - generic [ref=e182]\n          - generic [ref=e187]\n      - generic [ref=e191]:\n        - generic [ref=e192]: Active dates\n        - generic [ref=e193]:\n          - generic [ref=e194]\n          - generic [ref=e198]\n      - generic [ref=e204]:\n        - switch \"Active\" [checked] [active] [ref=e219]\n        - generic [ref=e207]: Active\n      - generic [ref=e209]:\n        - link \"Discard\" [ref=e210] [cursor=pointer]:\n          - /url: http://shop.test/admin/discounts\n        - button \"Save\" [ref=e211]:\n          - img [ref=e213]\n          - generic [ref=e216]: Save\n```"}]


### Ran Playwright code
```js
await page.getByRole('button', { name: 'Save' }).click();
```
### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Create discount](http://shop.test/admin/discounts/create)
### Page
- Page URL: http://shop.test/admin/discounts/create
- Page Title: Create discount
### Snapshot
- [Snapshot](.playwright-mcp/page-2026-05-04T02-28-54-357Z.yml)


Output:
Wall time: 2.0715 seconds
Output:
[{"type":"text","text":"### Ran Playwright code\n```js\nawait page.getByRole('button', { name: 'Save' }).click();\n```\n### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Create discount](http://shop.test/admin/discounts/create)\n### Page\n- Page URL: http://shop.test/admin/discounts/create\n- Page Title: Create discount\n### Snapshot\n- [Snapshot](.playwright-mcp/page-2026-05-04T02-28-54-357Z.yml)"}]


### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Create discount](http://shop.test/admin/discounts/create)
### Page
- Page URL: http://shop.test/admin/discounts/create
- Page Title: Create discount
### Snapshot
```yaml
- generic [active] [ref=e1]:
  - generic [ref=e2]:
    - link "Shop" [ref=e4] [cursor=pointer]:
      - /url: http://shop.test/admin
      - img [ref=e6]
      - generic [ref=e8]: Shop
    - navigation [ref=e9]:
      - generic [ref=e10]:
        - generic [ref=e12]: Platform
        - link "Dashboard" [ref=e15] [cursor=pointer]:
          - /url: http://shop.test/admin
          - img [ref=e17]
          - generic [ref=e19]: Dashboard
      - generic [ref=e20]:
        - generic [ref=e22]: Products
        - generic [ref=e23]:
          - link "Products" [ref=e25] [cursor=pointer]:
            - /url: http://shop.test/admin/products
            - img [ref=e27]
            - generic [ref=e29]: Products
          - link "Collections" [ref=e31] [cursor=pointer]:
            - /url: http://shop.test/admin/collections
            - img [ref=e33]
            - generic [ref=e35]: Collections
          - link "Inventory" [ref=e37] [cursor=pointer]:
            - /url: http://shop.test/admin/inventory
            - img [ref=e39]
            - generic [ref=e41]: Inventory
      - generic [ref=e42]:
        - generic [ref=e44]: Operations
        - generic [ref=e45]:
          - link "Orders" [ref=e47] [cursor=pointer]:
            - /url: http://shop.test/admin/orders
            - img [ref=e49]
            - generic [ref=e51]: Orders
          - link "Customers" [ref=e53] [cursor=pointer]:
            - /url: http://shop.test/admin/customers
            - img [ref=e55]
            - generic [ref=e57]: Customers
          - link "Discounts" [ref=e59] [cursor=pointer]:
            - /url: http://shop.test/admin/discounts
            - img [ref=e61]
            - generic [ref=e64]: Discounts
    - navigation [ref=e66]:
      - link "Repository" [ref=e68] [cursor=pointer]:
        - /url: https://github.com/laravel/livewire-starter-kit
        - img [ref=e70]
        - generic [ref=e75]: Repository
      - link "Documentation" [ref=e77] [cursor=pointer]:
        - /url: https://laravel.com/docs/starter-kits#livewire
        - img [ref=e79]
        - generic [ref=e81]: Documentation
    - button "AA Acme Admin" [ref=e83]:
      - generic [ref=e86]: AA
      - generic [ref=e87]: Acme Admin
      - img [ref=e89]
  - generic [ref=e93]:
    - generic [ref=e94]:
      - generic [ref=e95]:
        - generic [ref=e96]: Edit discount
        - paragraph [ref=e97]: Configure the promotion type, value, eligibility, limits, and dates.
      - link "Discounts" [ref=e98] [cursor=pointer]:
        - /url: http://shop.test/admin/discounts
        - img [ref=e99]
        - generic [ref=e101]: Discounts
    - generic [ref=e220]:
      - img [ref=e222]
      - generic [ref=e225]: Discount saved
    - generic [ref=e102]:
      - generic [ref=e104]:
        - generic [ref=e105]: Type
        - radiogroup "Type" [ref=e106]:
          - generic [ref=e107]:
            - radio "Discount code" [checked] [ref=e108]
            - generic [ref=e111]: Discount code
            - generic [ref=e112]: Customers enter a code at checkout
          - generic [ref=e113]:
            - radio "Automatic discount" [ref=e114]
            - generic [ref=e116]: Automatic discount
            - generic [ref=e117]: Applied automatically at checkout
      - generic [ref=e118]:
        - generic [ref=e119]: Code
        - generic [ref=e120]:
          - generic [ref=e122]:
            - generic [ref=e123]: Discount code
            - textbox "Discount code" [ref=e125]:
              - /placeholder: SUMMER20
              - text: E2ESMOKE
          - button "Generate" [ref=e127]:
            - img [ref=e129]
            - generic [ref=e132]: Generate
      - generic [ref=e133]:
        - generic [ref=e134]: Value
        - generic [ref=e135]:
          - generic [ref=e136]:
            - generic [ref=e137]: Value type
            - radiogroup "Value type" [ref=e138]:
              - generic [ref=e139]:
                - radio "Percentage" [checked] [ref=e140]
                - generic [ref=e143]: Percentage
              - generic [ref=e144]:
                - radio "Fixed amount" [ref=e145]
                - generic [ref=e147]: Fixed amount
              - generic [ref=e148]:
                - radio "Free shipping" [ref=e149]
                - generic [ref=e151]: Free shipping
          - generic [ref=e153]:
            - generic [ref=e154]: Percentage
            - spinbutton "Percentage" [ref=e156]: "15"
      - generic [ref=e157]:
        - generic [ref=e158]: Conditions
        - generic [ref=e159]:
          - generic [ref=e161]:
            - generic [ref=e162]: Minimum purchase amount
            - generic [ref=e163]: Leave empty for no minimum
            - spinbutton "Minimum purchase amount" [ref=e165]: "25.00"
          - generic [ref=e166]:
            - generic [ref=e168]:
              - generic [ref=e169]: Specific products
              - generic [ref=e170]:
                - generic
                - textbox "Specific products" [ref=e171]:
                  - /placeholder: Search products...
            - generic [ref=e174]:
              - generic [ref=e175]: Specific collections
              - generic [ref=e176]:
                - generic
                - textbox "Specific collections" [ref=e177]:
                  - /placeholder: Search collections...
      - generic [ref=e179]:
        - generic [ref=e180]: Usage limits
        - generic [ref=e181]:
          - generic [ref=e182]:
            - generic [ref=e183]: Total usage limit
            - spinbutton "Total usage limit" [ref=e185]: "3"
          - generic [ref=e187]:
            - checkbox "Limit to one use per customer" [checked] [ref=e188]:
              - img [ref=e217]
            - generic [ref=e190]: Limit to one use per customer
      - generic [ref=e191]:
        - generic [ref=e192]: Active dates
        - generic [ref=e193]:
          - generic [ref=e194]:
            - generic [ref=e195]: Start date
            - textbox "Start date" [ref=e197]: 2026-05-04T02:28
          - generic [ref=e198]:
            - generic [ref=e199]: End date
            - generic [ref=e200]: Leave empty for no end date
            - textbox "End date" [ref=e202]
      - generic [ref=e204]:
        - switch "Active" [checked] [ref=e219]
        - generic [ref=e207]: Active
      - generic [ref=e209]:
        - link "Discard" [ref=e210] [cursor=pointer]:
          - /url: http://shop.test/admin/discounts
        - button "Save" [ref=e211]:
          - img [ref=e213]
          - generic [ref=e216]: Save
```


Output:
Wall time: 0.0147 seconds
Output:
[{"type":"text","text":"### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Create discount](http://shop.test/admin/discounts/create)\n### Page\n- Page URL: http://shop.test/admin/discounts/create\n- Page Title: Create discount\n### Snapshot\n```yaml\n- generic [active] [ref=e1]:\n  - generic [ref=e2]:\n    - link \"Shop\" [ref=e4] [cursor=pointer]:\n      - /url: http://shop.test/admin\n      - img [ref=e6]\n      - generic [ref=e8]: Shop\n    - navigation [ref=e9]:\n      - generic [ref=e10]:\n        - generic [ref=e12]: Platform\n        - link \"Dashboard\" [ref=e15] [cursor=pointer]:\n          - /url: http://shop.test/admin\n          - img [ref=e17]\n          - generic [ref=e19]: Dashboard\n      - generic [ref=e20]:\n        - generic [ref=e22]: Products\n        - generic [ref=e23]:\n          - link \"Products\" [ref=e25] [cursor=pointer]:\n            - /url: http://shop.test/admin/products\n            - img [ref=e27]\n            - generic [ref=e29]: Products\n          - link \"Collections\" [ref=e31] [cursor=pointer]:\n            - /url: http://shop.test/admin/collections\n            - img [ref=e33]\n            - generic [ref=e35]: Collections\n          - link \"Inventory\" [ref=e37] [cursor=pointer]:\n            - /url: http://shop.test/admin/inventory\n            - img [ref=e39]\n            - generic [ref=e41]: Inventory\n      - generic [ref=e42]:\n        - generic [ref=e44]: Operations\n        - generic [ref=e45]:\n          - link \"Orders\" [ref=e47] [cursor=pointer]:\n            - /url: http://shop.test/admin/orders\n            - img [ref=e49]\n            - generic [ref=e51]: Orders\n          - link \"Customers\" [ref=e53] [cursor=pointer]:\n            - /url: http://shop.test/admin/customers\n            - img [ref=e55]\n            - generic [ref=e57]: Customers\n          - link \"Discounts\" [ref=e59] [cursor=pointer]:\n            - /url: http://shop.test/admin/discounts\n            - img [ref=e61]\n            - generic [ref=e64]: Discounts\n    - navigation [ref=e66]:\n      - link \"Repository\" [ref=e68] [cursor=pointer]:\n        - /url: https://github.com/laravel/livewire-starter-kit\n        - img [ref=e70]\n        - generic [ref=e75]: Repository\n      - link \"Documentation\" [ref=e77] [cursor=pointer]:\n        - /url: https://laravel.com/docs/starter-kits#livewire\n        - img [ref=e79]\n        - generic [ref=e81]: Documentation\n    - button \"AA Acme Admin\" [ref=e83]:\n      - generic [ref=e86]: AA\n      - generic [ref=e87]: Acme Admin\n      - img [ref=e89]\n  - generic [ref=e93]:\n    - generic [ref=e94]:\n      - generic [ref=e95]:\n        - generic [ref=e96]: Edit discount\n        - paragraph [ref=e97]: Configure the promotion type, value, eligibility, limits, and dates.\n      - link \"Discounts\" [ref=e98] [cursor=pointer]:\n        - /url: http://shop.test/admin/discounts\n        - img [ref=e99]\n        - generic [ref=e101]: Discounts\n    - generic [ref=e220]:\n      - img [ref=e222]\n      - generic [ref=e225]: Discount saved\n    - generic [ref=e102]:\n      - generic [ref=e104]:\n        - generic [ref=e105]: Type\n        - radiogroup \"Type\" [ref=e106]:\n          - generic [ref=e107]:\n            - radio \"Discount code\" [checked] [ref=e108]\n            - generic [ref=e111]: Discount code\n            - generic [ref=e112]: Customers enter a code at checkout\n          - generic [ref=e113]:\n            - radio \"Automatic discount\" [ref=e114]\n            - generic [ref=e116]: Automatic discount\n            - generic [ref=e117]: Applied automatically at checkout\n      - generic [ref=e118]:\n        - generic [ref=e119]: Code\n        - generic [ref=e120]:\n          - generic [ref=e122]:\n            - generic [ref=e123]: Discount code\n            - textbox \"Discount code\" [ref=e125]:\n              - /placeholder: SUMMER20\n              - text: E2ESMOKE\n          - button \"Generate\" [ref=e127]:\n            - img [ref=e129]\n            - generic [ref=e132]: Generate\n      - generic [ref=e133]:\n        - generic [ref=e134]: Value\n        - generic [ref=e135]:\n          - generic [ref=e136]:\n            - generic [ref=e137]: Value type\n            - radiogroup \"Value type\" [ref=e138]:\n              - generic [ref=e139]:\n                - radio \"Percentage\" [checked] [ref=e140]\n                - generic [ref=e143]: Percentage\n              - generic [ref=e144]:\n                - radio \"Fixed amount\" [ref=e145]\n                - generic [ref=e147]: Fixed amount\n              - generic [ref=e148]:\n                - radio \"Free shipping\" [ref=e149]\n                - generic [ref=e151]: Free shipping\n          - generic [ref=e153]:\n            - generic [ref=e154]: Percentage\n            - spinbutton \"Percentage\" [ref=e156]: \"15\"\n      - generic [ref=e157]:\n        - generic [ref=e158]: Conditions\n        - generic [ref=e159]:\n          - generic [ref=e161]:\n            - generic [ref=e162]: Minimum purchase amount\n            - generic [ref=e163]: Leave empty for no minimum\n            - spinbutton \"Minimum purchase amount\" [ref=e165]: \"25.00\"\n          - generic [ref=e166]:\n            - generic [ref=e168]:\n              - generic [ref=e169]: Specific products\n              - generic [ref=e170]:\n                - generic\n                - textbox \"Specific products\" [ref=e171]:\n                  - /placeholder: Search products...\n            - generic [ref=e174]:\n              - generic [ref=e175]: Specific collections\n              - generic [ref=e176]:\n                - generic\n                - textbox \"Specific collections\" [ref=e177]:\n                  - /placeholder: Search collections...\n      - generic [ref=e179]:\n        - generic [ref=e180]: Usage limits\n        - generic [ref=e181]:\n          - generic [ref=e182]:\n            - generic [ref=e183]: Total usage limit\n            - spinbutton \"Total usage limit\" [ref=e185]: \"3\"\n          - generic [ref=e187]:\n            - checkbox \"Limit to one use per customer\" [checked] [ref=e188]:\n              - img [ref=e217]\n            - generic [ref=e190]: Limit to one use per customer\n      - generic [ref=e191]:\n        - generic [ref=e192]: Active dates\n        - generic [ref=e193]:\n          - generic [ref=e194]:\n            - generic [ref=e195]: Start date\n            - textbox \"Start date\" [ref=e197]: 2026-05-04T02:28\n          - generic [ref=e198]:\n            - generic [ref=e199]: End date\n            - generic [ref=e200]: Leave empty for no end date\n            - textbox \"End date\" [ref=e202]\n      - generic [ref=e204]:\n        - switch \"Active\" [checked] [ref=e219]\n        - generic [ref=e207]: Active\n      - generic [ref=e209]:\n        - link \"Discard\" [ref=e210] [cursor=pointer]:\n          - /url: http://shop.test/admin/discounts\n        - button \"Save\" [ref=e211]:\n          - img [ref=e213]\n          - generic [ref=e216]: Save\n```"}]


### Ran Playwright code
```js
await page.locator('section').getByRole('link', { name: 'Discounts' }).click();
```
### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Discounts](http://shop.test/admin/discounts)
### Page
- Page URL: http://shop.test/admin/discounts
- Page Title: Discounts
### Snapshot
- [Snapshot](.playwright-mcp/page-2026-05-04T02-29-04-414Z.yml)


Output:
Wall time: 2.0859 seconds
Output:
[{"type":"text","text":"### Ran Playwright code\n```js\nawait page.locator('section').getByRole('link', { name: 'Discounts' }).click();\n```\n### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Discounts](http://shop.test/admin/discounts)\n### Page\n- Page URL: http://shop.test/admin/discounts\n- Page Title: Discounts\n### Snapshot\n- [Snapshot](.playwright-mcp/page-2026-05-04T02-29-04-414Z.yml)"}]


### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Discounts](http://shop.test/admin/discounts)
### Page
- Page URL: http://shop.test/admin/discounts
- Page Title: Discounts
### Snapshot
```yaml
- generic [active] [ref=e226]:
  - generic [ref=e227]:
    - link "Shop" [ref=e229] [cursor=pointer]:
      - /url: http://shop.test/admin
      - img [ref=e231]
      - generic [ref=e233]: Shop
    - navigation [ref=e234]:
      - generic [ref=e235]:
        - generic [ref=e237]: Platform
        - link "Dashboard" [ref=e240] [cursor=pointer]:
          - /url: http://shop.test/admin
          - img [ref=e242]
          - generic [ref=e244]: Dashboard
      - generic [ref=e245]:
        - generic [ref=e247]: Products
        - generic [ref=e248]:
          - link "Products" [ref=e250] [cursor=pointer]:
            - /url: http://shop.test/admin/products
            - img [ref=e252]
            - generic [ref=e254]: Products
          - link "Collections" [ref=e256] [cursor=pointer]:
            - /url: http://shop.test/admin/collections
            - img [ref=e258]
            - generic [ref=e260]: Collections
          - link "Inventory" [ref=e262] [cursor=pointer]:
            - /url: http://shop.test/admin/inventory
            - img [ref=e264]
            - generic [ref=e266]: Inventory
      - generic [ref=e267]:
        - generic [ref=e269]: Operations
        - generic [ref=e270]:
          - link "Orders" [ref=e272] [cursor=pointer]:
            - /url: http://shop.test/admin/orders
            - img [ref=e274]
            - generic [ref=e276]: Orders
          - link "Customers" [ref=e278] [cursor=pointer]:
            - /url: http://shop.test/admin/customers
            - img [ref=e280]
            - generic [ref=e282]: Customers
          - link "Discounts" [ref=e284] [cursor=pointer]:
            - /url: http://shop.test/admin/discounts
            - img [ref=e286]
            - generic [ref=e289]: Discounts
    - navigation [ref=e291]:
      - link "Repository" [ref=e293] [cursor=pointer]:
        - /url: https://github.com/laravel/livewire-starter-kit
        - img [ref=e295]
        - generic [ref=e300]: Repository
      - link "Documentation" [ref=e302] [cursor=pointer]:
        - /url: https://laravel.com/docs/starter-kits#livewire
        - img [ref=e304]
        - generic [ref=e306]: Documentation
    - button "AA Acme Admin" [ref=e308]:
      - generic [ref=e311]: AA
      - generic [ref=e312]: Acme Admin
      - img [ref=e314]
  - generic [ref=e318]:
    - generic [ref=e319]:
      - generic [ref=e320]:
        - generic [ref=e321]: Discounts
        - paragraph [ref=e322]: Manage discount codes, automatic promotions, and eligibility rules.
      - link "Create discount" [ref=e323] [cursor=pointer]:
        - /url: http://shop.test/admin/discounts/create
        - img [ref=e324]
        - generic [ref=e326]: Create discount
    - generic [ref=e327]:
      - generic [ref=e328]:
        - generic:
          - img
        - textbox "Search discounts" [ref=e329]:
          - /placeholder: Search discounts...
      - combobox "Status filter" [ref=e331]:
        - option "All statuses" [selected]
        - option "Active"
        - option "Scheduled"
        - option "Expired"
      - combobox "Type filter" [ref=e332]:
        - option "All types" [selected]
        - option "Code"
        - option "Automatic"
    - table [ref=e335]:
      - rowgroup [ref=e336]:
        - row "Code Type Value Usage Status Dates" [ref=e337]:
          - columnheader "Code" [ref=e338]
          - columnheader "Type" [ref=e339]
          - columnheader "Value" [ref=e340]
          - columnheader "Usage" [ref=e341]
          - columnheader "Status" [ref=e342]
          - columnheader "Dates" [ref=e343]
      - rowgroup [ref=e344]:
        - row "E2ESMOKE Code 15% 0 / 3 Active May 4, 2026 - No end" [ref=e345]:
          - cell "E2ESMOKE" [ref=e346]:
            - link "E2ESMOKE" [ref=e347] [cursor=pointer]:
              - /url: http://shop.test/admin/discounts/7/edit
          - cell "Code" [ref=e348]:
            - generic [ref=e349]: Code
          - cell "15%" [ref=e350]
          - cell "0 / 3" [ref=e351]
          - cell "Active" [ref=e352]:
            - generic [ref=e353]: Active
          - cell "May 4, 2026 - No end" [ref=e354]
        - row "FREESHIP Code Free shipping 0 / unlimited Active May 3, 2026 - Jun 4, 2026" [ref=e355]:
          - cell "FREESHIP" [ref=e356]:
            - link "FREESHIP" [ref=e357] [cursor=pointer]:
              - /url: http://shop.test/admin/discounts/3/edit
          - cell "Code" [ref=e358]:
            - generic [ref=e359]: Code
          - cell "Free shipping" [ref=e360]
          - cell "0 / unlimited" [ref=e361]
          - cell "Active" [ref=e362]:
            - generic [ref=e363]: Active
          - cell "May 3, 2026 - Jun 4, 2026" [ref=e364]
        - row "5OFF Code 5.00 EUR 0 / unlimited Active May 3, 2026 - Jun 4, 2026" [ref=e365]:
          - cell "5OFF" [ref=e366]:
            - link "5OFF" [ref=e367] [cursor=pointer]:
              - /url: http://shop.test/admin/discounts/2/edit
          - cell "Code" [ref=e368]:
            - generic [ref=e369]: Code
          - cell "5.00 EUR" [ref=e370]
          - cell "0 / unlimited" [ref=e371]
          - cell "Active" [ref=e372]:
            - generic [ref=e373]: Active
          - cell "May 3, 2026 - Jun 4, 2026" [ref=e374]
        - row "SAVE10 Code 10% 0 / unlimited Active May 3, 2026 - Jun 4, 2026" [ref=e375]:
          - cell "SAVE10" [ref=e376]:
            - link "SAVE10" [ref=e377] [cursor=pointer]:
              - /url: http://shop.test/admin/discounts/1/edit
          - cell "Code" [ref=e378]:
            - generic [ref=e379]: Code
          - cell "10%" [ref=e380]
          - cell "0 / unlimited" [ref=e381]
          - cell "Active" [ref=e382]:
            - generic [ref=e383]: Active
          - cell "May 3, 2026 - Jun 4, 2026" [ref=e384]
```


Output:
Wall time: 0.0171 seconds
Output:
[{"type":"text","text":"### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Discounts](http://shop.test/admin/discounts)\n### Page\n- Page URL: http://shop.test/admin/discounts\n- Page Title: Discounts\n### Snapshot\n```yaml\n- generic [active] [ref=e226]:\n  - generic [ref=e227]:\n    - link \"Shop\" [ref=e229] [cursor=pointer]:\n      - /url: http://shop.test/admin\n      - img [ref=e231]\n      - generic [ref=e233]: Shop\n    - navigation [ref=e234]:\n      - generic [ref=e235]:\n        - generic [ref=e237]: Platform\n        - link \"Dashboard\" [ref=e240] [cursor=pointer]:\n          - /url: http://shop.test/admin\n          - img [ref=e242]\n          - generic [ref=e244]: Dashboard\n      - generic [ref=e245]:\n        - generic [ref=e247]: Products\n        - generic [ref=e248]:\n          - link \"Products\" [ref=e250] [cursor=pointer]:\n            - /url: http://shop.test/admin/products\n            - img [ref=e252]\n            - generic [ref=e254]: Products\n          - link \"Collections\" [ref=e256] [cursor=pointer]:\n            - /url: http://shop.test/admin/collections\n            - img [ref=e258]\n            - generic [ref=e260]: Collections\n          - link \"Inventory\" [ref=e262] [cursor=pointer]:\n            - /url: http://shop.test/admin/inventory\n            - img [ref=e264]\n            - generic [ref=e266]: Inventory\n      - generic [ref=e267]:\n        - generic [ref=e269]: Operations\n        - generic [ref=e270]:\n          - link \"Orders\" [ref=e272] [cursor=pointer]:\n            - /url: http://shop.test/admin/orders\n            - img [ref=e274]\n            - generic [ref=e276]: Orders\n          - link \"Customers\" [ref=e278] [cursor=pointer]:\n            - /url: http://shop.test/admin/customers\n            - img [ref=e280]\n            - generic [ref=e282]: Customers\n          - link \"Discounts\" [ref=e284] [cursor=pointer]:\n            - /url: http://shop.test/admin/discounts\n            - img [ref=e286]\n            - generic [ref=e289]: Discounts\n    - navigation [ref=e291]:\n      - link \"Repository\" [ref=e293] [cursor=pointer]:\n        - /url: https://github.com/laravel/livewire-starter-kit\n        - img [ref=e295]\n        - generic [ref=e300]: Repository\n      - link \"Documentation\" [ref=e302] [cursor=pointer]:\n        - /url: https://laravel.com/docs/starter-kits#livewire\n        - img [ref=e304]\n        - generic [ref=e306]: Documentation\n    - button \"AA Acme Admin\" [ref=e308]:\n      - generic [ref=e311]: AA\n      - generic [ref=e312]: Acme Admin\n      - img [ref=e314]\n  - generic [ref=e318]:\n    - generic [ref=e319]:\n      - generic [ref=e320]:\n        - generic [ref=e321]: Discounts\n        - paragraph [ref=e322]: Manage discount codes, automatic promotions, and eligibility rules.\n      - link \"Create discount\" [ref=e323] [cursor=pointer]:\n        - /url: http://shop.test/admin/discounts/create\n        - img [ref=e324]\n        - generic [ref=e326]: Create discount\n    - generic [ref=e327]:\n      - generic [ref=e328]:\n        - generic:\n          - img\n        - textbox \"Search discounts\" [ref=e329]:\n          - /placeholder: Search discounts...\n      - combobox \"Status filter\" [ref=e331]:\n        - option \"All statuses\" [selected]\n        - option \"Active\"\n        - option \"Scheduled\"\n        - option \"Expired\"\n      - combobox \"Type filter\" [ref=e332]:\n        - option \"All types\" [selected]\n        - option \"Code\"\n        - option \"Automatic\"\n    - table [ref=e335]:\n      - rowgroup [ref=e336]:\n        - row \"Code Type Value Usage Status Dates\" [ref=e337]:\n          - columnheader \"Code\" [ref=e338]\n          - columnheader \"Type\" [ref=e339]\n          - columnheader \"Value\" [ref=e340]\n          - columnheader \"Usage\" [ref=e341]\n          - columnheader \"Status\" [ref=e342]\n          - columnheader \"Dates\" [ref=e343]\n      - rowgroup [ref=e344]:\n        - row \"E2ESMOKE Code 15% 0 / 3 Active May 4, 2026 - No end\" [ref=e345]:\n          - cell \"E2ESMOKE\" [ref=e346]:\n            - link \"E2ESMOKE\" [ref=e347] [cursor=pointer]:\n              - /url: http://shop.test/admin/discounts/7/edit\n          - cell \"Code\" [ref=e348]:\n            - generic [ref=e349]: Code\n          - cell \"15%\" [ref=e350]\n          - cell \"0 / 3\" [ref=e351]\n          - cell \"Active\" [ref=e352]:\n            - generic [ref=e353]: Active\n          - cell \"May 4, 2026 - No end\" [ref=e354]\n        - row \"FREESHIP Code Free shipping 0 / unlimited Active May 3, 2026 - Jun 4, 2026\" [ref=e355]:\n          - cell \"FREESHIP\" [ref=e356]:\n            - link \"FREESHIP\" [ref=e357] [cursor=pointer]:\n              - /url: http://shop.test/admin/discounts/3/edit\n          - cell \"Code\" [ref=e358]:\n            - generic [ref=e359]: Code\n          - cell \"Free shipping\" [ref=e360]\n          - cell \"0 / unlimited\" [ref=e361]\n          - cell \"Active\" [ref=e362]:\n            - generic [ref=e363]: Active\n          - cell \"May 3, 2026 - Jun 4, 2026\" [ref=e364]\n        - row \"5OFF Code 5.00 EUR 0 / unlimited Active May 3, 2026 - Jun 4, 2026\" [ref=e365]:\n          - cell \"5OFF\" [ref=e366]:\n            - link \"5OFF\" [ref=e367] [cursor=pointer]:\n              - /url: http://shop.test/admin/discounts/2/edit\n          - cell \"Code\" [ref=e368]:\n            - generic [ref=e369]: Code\n          - cell \"5.00 EUR\" [ref=e370]\n          - cell \"0 / unlimited\" [ref=e371]\n          - cell \"Active\" [ref=e372]:\n            - generic [ref=e373]: Active\n          - cell \"May 3, 2026 - Jun 4, 2026\" [ref=e374]\n        - row \"SAVE10 Code 10% 0 / unlimited Active May 3, 2026 - Jun 4, 2026\" [ref=e375]:\n          - cell \"SAVE10\" [ref=e376]:\n            - link \"SAVE10\" [ref=e377] [cursor=pointer]:\n              - /url: http://shop.test/admin/discounts/1/edit\n          - cell \"Code\" [ref=e378]:\n            - generic [ref=e379]: Code\n          - cell \"10%\" [ref=e380]\n          - cell \"0 / unlimited\" [ref=e381]\n          - cell \"Active\" [ref=e382]:\n            - generic [ref=e383]: Active\n          - cell \"May 3, 2026 - Jun 4, 2026\" [ref=e384]\n```"}]


### Ran Playwright code
```js
await page.getByRole('textbox', { name: 'Search discounts' }).fill('E2E');
```


Output:
Wall time: 0.0184 seconds
Output:
[{"type":"text","text":"### Ran Playwright code\n```js\nawait page.getByRole('textbox', { name: 'Search discounts' }).fill('E2E');\n```"}]


### Result
Waited for 1
### Ran Playwright code
```js
await new Promise(f => setTimeout(f, 1 * 1000));
```
### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Discounts](http://shop.test/admin/discounts)
### Page
- Page URL: http://shop.test/admin/discounts
- Page Title: Discounts
### Snapshot
- [Snapshot](.playwright-mcp/page-2026-05-04T02-29-17-321Z.yml)


Output:
Wall time: 1.0151 seconds
Output:
[{"type":"text","text":"### Result\nWaited for 1\n### Ran Playwright code\n```js\nawait new Promise(f => setTimeout(f, 1 * 1000));\n```\n### Open tabs\n- 0: [Checkout](http://shop.test/checkout)\n- 1: (current) [Discounts](http://shop.test/admin/discounts)\n### Page\n- Page URL: http://shop.test/admin/discounts\n- Page Title: Discounts\n### Snapshot\n- [Snapshot](.playwright-mcp/page-2026-05-04T02-29-17-321Z.yml)"}]


### Open tabs
- 0: [Checkout](http://shop.test/checkout)
- 1: (current) [Discounts](http://shop.test/admin/discounts)
### Page
- Page URL: http://shop.test/admin/discounts
- Page Title: Discounts
### Snapshot
```yaml
- table [ref=e335]:
  - rowgroup [ref=e336]:
    - row "Code Type Value Usage Status Dates" [ref=e337]:
      - columnheader "Code" [ref=e338]
      - columnheader "Type" [ref=e339]
      - columnheader "Value" [ref=e340]
      - columnheader "Usage" [ref=e341]
      - columnheader "Status" [ref=e342]
      - columnheader "Dates" [ref=e343]
  - rowgroup [ref=e344]:
    - row "E2ESMOKE Code 15% 0 / 3 Active May 4, 2026 - No end" [ref=e345]:
      - cell "E2ESMOKE" [ref=e346]:
        - link "E2ESMOKE" [ref=e347] [cursor=pointer]:
          - /url: http://shop.test/admin/discounts/7/edit
      - cell "Code" [ref=e348]:
        - generic [ref=e349]: Code
      - cell "15%" [ref=e350]
      - cell "0 / 3" [ref=e351]
      - cell "Active" [ref=e352]:
        - generic [ref=e353]: Active
      - cell "May 4, 2026 - No end" [ref=e354]
```