Skip to content

Delete Account Test is Failing in Livewire Stubs #749

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

Closed
inmanturbo opened this issue Apr 6, 2021 · 1 comment
Closed

Delete Account Test is Failing in Livewire Stubs #749

inmanturbo opened this issue Apr 6, 2021 · 1 comment

Comments

@inmanturbo
Copy link
Contributor

inmanturbo commented Apr 6, 2021

  • Jetstream Version: 2.3.1
        {
            "name": "laravel/jetstream",
            "version": "v2.3.1",
            "source": {
                "type": "git",
                "url": "https://github.com/laravel/jetstream.git",
                "reference": "39d50ec0dda28ae2077baf9df307509a09307d75"
            },
  • Jetstream Stack: Livewire
  • Uses Teams: no
  • Laravel Version: 8.36.0
  • PHP Version: 7.4.9
  • Database Driver & Version:
    sqlite3 , :memory

Description:

$component = Livewire::test(DeleteUserForm::class)

$request->session()->invalidate();

#742

webpack compiled successfully
jetstream-demo php artisan test

   PASS  Tests\Unit\ExampleTest
   basic test

   WARN  Tests\Feature\ApiTokenPermissionsTest
  - api token permissions can be updated → API support is not enabled.

   PASS  Tests\Feature\AuthenticationTest
   login screen can be rendered
   users can authenticate using the login screen
   users can not authenticate with invalid password

   PASS  Tests\Feature\BrowserSessionsTest
   other browser sessions can be logged out

   WARN  Tests\Feature\CreateApiTokenTest
  - api tokens can be created → API support is not enabled.

   FAIL  Tests\Feature\DeleteAccountTest
   user accounts can be deleted
   correct password must be provided before account can be deleted

   WARN  Tests\Feature\DeleteApiTokenTest
  - api tokens can be deleted → API support is not enabled.

   WARN  Tests\Feature\EmailVerificationTest
  - email verification screen can be rendered → Email verification not enabled.
  - email can be verified → Email verification not enabled.
  - email can not verified with invalid hash → Email verification not enabled.

   PASS  Tests\Feature\ExampleTest
   basic test

   PASS  Tests\Feature\PasswordConfirmationTest
   confirm password screen can be rendered
   password can be confirmed
   password is not confirmed with invalid password

   PASS  Tests\Feature\PasswordResetTest
   reset password link screen can be rendered
   reset password link can be requested
   reset password screen can be rendered
   password can be reset with valid token

   PASS  Tests\Feature\ProfileInformationTest
   current profile information is available
   profile information can be updated

   PASS  Tests\Feature\RegistrationTest
   registration screen can be rendered
   new users can register

   PASS  Tests\Feature\TwoFactorAuthenticationSettingsTest
   two factor authentication can be enabled
   recovery codes can be regenerated
   two factor authentication can be disabled

   PASS  Tests\Feature\UpdatePasswordTest
   password can be updated
   current password must be correct
   new passwords must match

  ---

  • Tests\Feature\DeleteAccountTest > user accounts can be deleted
   RuntimeException 

  Session store not set on request.

  at vendor/laravel/framework/src/Illuminate/Http/Request.php:483
    479▕      */
    480▕     public function session()
    481▕     {
    482▕         if (! $this->hasSession()) {
483            throw new RuntimeException('Session store not set on request.');
    484▕         }
    485▕ 
    486▕         return $this->session;
    487▕     }

      +32 vendor frames 
  33  tests/Feature/DeleteAccountTest.php:26
      Livewire\Testing\TestableLivewire::call()


  Tests:  1 failed, 6 skipped, 24 passed
  Time:   2.01s

Steps To Reproduce:

laravel new jetstream-demo
cd jetstream-demo
composer require laravel/jetstream
php artisan jetstream:install livewire
npm install && npm run dev
vi phpunit.xml
-        <!-- <server name="DB_CONNECTION" value="sqlite"/> -->
-       <!-- <server name="DB_DATABASE" value=":memory:"/> -->
+       <server name="DB_CONNECTION" value="sqlite"/>
+       <server name="DB_DATABASE" value=":memory:"/>
php artisan test
@inmanturbo
Copy link
Contributor Author

I've created a pull request that will fix this issue if accepted:
#750

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

No branches or pull requests

1 participant