Skip to content

[Bug]: Browser testing does not work with Laravel Precognition #1579

@pindab0ter

Description

@pindab0ter

What Happened

When browser testing a form in Vue that uses Laravel Precognition, it looks like the precognitive responses are being treated differently than in a non-testing environment, causing the response to be interpreted as a page to be shown:

Image

The same test without Precognition (the error is expected):

Image

How to Reproduce

Download the sample repository, check out the initial commit, run composer install, npm install and vendor/bin/pest. The second commit showcases that the problem is isolated to precognition, as the test passes without it.

Sample Repository

https://github.com/pindab0ter/pest-4-precognition

Pest Version

4.1.4

PHP Version

8.4.14

Operation System

macOS

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions