livewire / livewire

A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
MIT License
21.94k stars 1.5k forks source link

Fix flaky test for cancelling uploads #8471

Closed PerryvanderMeer closed 1 month ago

PerryvanderMeer commented 1 month ago

The test related to cancelling file uploads fails fairly frequently:

https://github.com/livewire/livewire/blob/72e900825c560f0e4e620185b26c5441a8914435/src/Features/SupportFileUploads/BrowserTest.php#L65

Did some digging and the cancel button is only clicked after the file is uploaded (rather than while uploading). A race occurs between uploading and cancelling, resulting in some errors, because uploadItem.request is undefined:

Schermafbeelding 2024-05-21 165622

calebporzio commented 1 month ago

Wow, thanks for digging on that!