Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.x] Fix stub tests #1014

Merged
merged 1 commit into from
Mar 21, 2022
Merged

[2.x] Fix stub tests #1014

merged 1 commit into from
Mar 21, 2022

Conversation

driesvints
Copy link
Member

This PR fixes some stub tests that got broken with the new browser session changes we did for the upcoming Jetstream release.

Fixes #1013

request()->session()->put([
'password_hash_'.Auth::getDefaultDriver() => Auth::user()->getAuthPassword(),
]);
if (request()->hasSession()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this test ever actually run now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the failing test (test_password_can_be_updated) wasn't asserting this part

Failing test

1) Tests\Feature\UpdatePasswordTest::test_password_can_be_updated
RuntimeException: Session store not set on request.

/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Http/Request.php:524
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/jetstream/src/Http/Livewire/UpdatePasswordForm.php:35
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Container/Util.php:41
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/Users/driesvints/Sites/test-jetstream-tests/vendor/livewire/livewire/src/ComponentConcerns/HandlesActions.php:149
/Users/driesvints/Sites/test-jetstream-tests/vendor/livewire/livewire/src/HydrationMiddleware/PerformActionCalls.php:38
/Users/driesvints/Sites/test-jetstream-tests/vendor/livewire/livewire/src/LifecycleManager.php:89
/Users/driesvints/Sites/test-jetstream-tests/vendor/livewire/livewire/src/Connection/ConnectionHandler.php:13
/Users/driesvints/Sites/test-jetstream-tests/vendor/livewire/livewire/src/Controllers/HttpConnectionHandler.php:20
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:48
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Routing/Route.php:261
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Routing/Route.php:204
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Routing/Router.php:725
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:141
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:116
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Routing/Router.php:727
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Routing/Router.php:702
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Routing/Router.php:666
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Routing/Router.php:655
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:167
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:141
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:116
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:142
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:111
/Users/driesvints/Sites/test-jetstream-tests/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:509
/Users/driesvints/Sites/test-jetstream-tests/vendor/livewire/livewire/src/Testing/TestableLivewire.php:198
/Users/driesvints/Sites/test-jetstream-tests/vendor/livewire/livewire/src/Testing/MakesHttpRequestsWrapper.php:29
/Users/driesvints/Sites/test-jetstream-tests/vendor/livewire/livewire/src/Testing/TestableLivewire.php:199
/Users/driesvints/Sites/test-jetstream-tests/vendor/livewire/livewire/src/Testing/TestableLivewire.php:183
/Users/driesvints/Sites/test-jetstream-tests/vendor/livewire/livewire/src/Testing/Concerns/MakesCallsToComponent.php:143
/Users/driesvints/Sites/test-jetstream-tests/vendor/livewire/livewire/src/Testing/Concerns/MakesCallsToComponent.php:38
/Users/driesvints/Sites/test-jetstream-tests/vendor/livewire/livewire/src/Testing/Concerns/MakesCallsToComponent.php:32
/Users/driesvints/Sites/test-jetstream-tests/tests/Feature/UpdatePasswordTest.php:26

@taylorotwell taylorotwell marked this pull request as draft March 21, 2022 16:10
@driesvints driesvints marked this pull request as ready for review March 21, 2022 16:22
@taylorotwell taylorotwell merged commit 0ae15e6 into 2.x Mar 21, 2022
@taylorotwell taylorotwell deleted the fix-stub-tests branch March 21, 2022 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BrowserSessionsTest and UpdatePasswordTest subbed tests fail
2 participants