dimanche 15 octobre 2017

Login test with laravel dusk

I started browser testing with laravel dusk. Using a test database (sqlite), creating a user with a model factory and using the Browser::loginAs method worked. But when I try to simulate a real login, I get an Error:

General error: 1 no such table users.

I have a .env.dusk.local file with and specified DB_CONNECTION=sqlite and DB_DATABASE=:memory: I also tried it with a sqlite file. Then I got the error

Database (tests.sqlite) does not extis.

I've read that the problem could be, dusk and the application open different connections. How should I configure the database connections to get this working?

Aucun commentaire:

Enregistrer un commentaire