laravel-dusk Questions

4

Solved

I have a Laravel with Sail and I want to make automated test with Laravel Dusk. I followed all the instructions in Dusk Documentation and Sail + Dusk Installation, but when I run the default test I...
Abbey asked 4/1, 2021 at 20:7

4

I am trying to develop a Laravel composer package and run unit tests from within it. After spending the last couple of days reading various outdated and contradictory guides and blogposts, I am com...
Noctambulism asked 2/7, 2017 at 0:30

2

I was wondering why we cannot get the session data when testing with Laravel Dusk ? In any controller in Laravel we can get session data with Session::get('data'); When we are running a Laravel Dus...
Birnbaum asked 12/10, 2021 at 9:6

5

Unfortunately config(['key' => 'newValue']) doesn't work in a Dusk setup (for overriding a config value), presumably because it would change the config of the system running the test rather than...
Mane asked 18/10, 2019 at 12:20

6

I'm using Dusk to do a simple login test. I created a .env.dusk file so that the test uses an alternate database and does not delete the data that was registered on the platform. Archive .env DB...
Advertent asked 27/3, 2017 at 12:40

4

I'm running the example test of Laravel Dusk for browser, but when I execute php artisan dusk I got an error Using: * Ubuntu 18 * Laravel 5.8 * Dusk 5.1 * ChromeDriver 74 * apache2 This is my Dus...
Sonnysonobuoy asked 23/5, 2019 at 15:18

4

Solved

Error when trying to run php artisan dusk. A Chrome version error happened. I Google the error and took a quick look in a couple of websites including Laracasts and the Dusk Github issues.
Hagai asked 28/7, 2020 at 14:2

1

Solved

For the last day or so I've started seeing my Laravel Dusk tests fail on my CI/CD environment (GitHub Actions). Suddenly, running the command that had been working fine all this time: php artisan d...
Cruise asked 25/8, 2023 at 23:18

3

Solved

If I have a link: <a href="/somewhere">Click Me</a> I know I can clickLink based on its text. public function testCanClickLink() { $this->browse(function ($browser) { $browser-...
Tabulator asked 26/2, 2017 at 16:3

3

Solved

I'm trying to use laravel dusk to test for 404 not found error. Specifically when loading an image. After reading the laravel dusk documentation I've found no asserts that could help me test if a 4...
Castera asked 6/8, 2018 at 15:45

8

I have just started using Laravel Dusk to test my project and need some guidance. After I run all the tests available, I want to be able to reset my database back to before I run the tests. (If the...
Shithead asked 9/8, 2018 at 22:50

3

I running tests using PHPUnit 9 and when I do an assertRegExp I get a Warning assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpressi...
Premer asked 9/3, 2020 at 7:45

6

Solved

I'm preparing tests using [Browser Tests (Laravel Dusk)][1] [1]: https://laravel.com/docs/5.4/dusk and I need force click to element which is not see before scroll down browser page. How can defin...
Expiration asked 22/3, 2017 at 12:49

9

Solved

recently upgraded a 5.3 project to 5.4 and all seemed good. Today I started to implement Dusk however had hit an issue when running the example test ☁ footy-finance [5.4] ⚡ php artisan dusk PHPUn...
Curcio asked 3/2, 2017 at 13:15

8

I am getting started using Laravel Dusk for browser testing, and have created a couple of tests to test my login form. I have the following code: class LoginTest extends DuskTestCase { public fun...
Inexpiable asked 4/7, 2017 at 13:1

1

I am running laravel dusk tests. I am trying to determine whether the database has a record which contains a string. Eloquent has a wildcard where clause that performs this activity. i.e. 'like'...
Tana asked 11/9, 2019 at 4:27

4

Solved

I am writing some tests and I want to see whether Dusk correctly fills in the input fields but Dusk doesn't show the browser while running the tests, is there any way to force it to do that?
Horme asked 20/4, 2018 at 9:41

2

Solved

I have an HTML element that is supposed to display only on the first page load. Javascript sets a cookie and the element is not displayed if the cookie is set (PHP checks the cookie and doesn't ren...

2

Solved

I am using Laravel 5.6 and Laravel Dusk 3.0.9. Dusk is pretty handy, but when a test fails on a page where there is some Javascript functionality it can be pretty hard to work out what went wrong....
Veroniqueverras asked 28/7, 2018 at 18:8

2

I have a project which came from laravel 5.1, we have upgraded it accordingly up until 5.6, everything on the application works perfectly fine. When I install dusk and run this on ExampleTest.php: ...
Thicket asked 3/6, 2018 at 17:46

3

Solved

I understand that you can get the text from an element, like this: $text = $browser->text('.selector'); My question is: How can you get the raw HTML content? E.g. the following doesn't work ...
Festination asked 7/5, 2019 at 9:58

2

I'm trying to use Laravel Dusk integrated with Laravel Sail as described in: https://laravel.com/docs/8.x/sail#laravel-dusk I'm facing some problems when it comes to make this work: If a use, a .e...
Marron asked 1/2, 2021 at 13:12

1

My project on the Laravel 5.4 framework and I am using Dusk for browser tests. I have a page that has several sections I'd like to test independently, however I'm running into the problem where I h...
Vuillard asked 20/6, 2017 at 15:59

2

I've just used Laravel Dusk to test a javascript site. Want to reuse the current browser with its session and cookies for some reason (keep me logged in on the site), so I don't need to pass auth ...
Blueprint asked 30/6, 2018 at 1:50

1

I'm trying to alter some config values before each test. However, the browser does not apply them. In my DuskTestCase file: abstract class DuskTestCase extends BaseTestCase { use CreatesApplicat...
Cohort asked 28/1, 2019 at 18:1

© 2022 - 2024 — McMap. All rights reserved.