You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: original-en/dusk.md
+12-14
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ To get started, you should install [Google Chrome](https://www.google.com/chrome
64
64
composer require laravel/dusk --dev
65
65
```
66
66
67
-
> [!WARNING]
67
+
> [!WARNING]
68
68
> If you are manually registering Dusk's service provider, you should **never** register it in your production environment, as doing so could lead to arbitrary users being able to authenticate with your application.
69
69
70
70
After installing the Dusk package, execute the `dusk:install` Artisan command. The `dusk:install` command will create a `tests/Browser` directory, an example Dusk test, and install the Chrome Driver binary for your operating system:
@@ -75,7 +75,7 @@ php artisan dusk:install
75
75
76
76
Next, set the `APP_URL` environment variable in your application's `.env` file. This value should match the URL you use to access your application in a browser.
77
77
78
-
> [!NOTE]
78
+
> [!NOTE]
79
79
> If you are using [Laravel Sail](/docs/{{version}}/sail) to manage your local development environment, please also consult the Sail documentation on [configuring and running Dusk tests](/docs/{{version}}/sail#laravel-dusk).
> Dusk requires the `chromedriver` binaries to be executable. If you're having problems running Dusk, you should ensure the binaries are executable using the following command: `chmod -R 0755 vendor/laravel/dusk/bin/`.
102
102
103
103
<aname="using-other-browsers"></a>
@@ -185,7 +185,7 @@ class ExampleTest extends DuskTestCase
185
185
}
186
186
```
187
187
188
-
> [!WARNING]
188
+
> [!WARNING]
189
189
> SQLite in-memory databases may not be used when executing Dusk tests. Since the browser executes within its own process, it will not be able to access the in-memory databases of other processes.
190
190
191
191
<aname="reset-truncation"></a>
@@ -224,7 +224,7 @@ class ExampleTest extends DuskTestCase
224
224
225
225
By default, this trait will truncate all tables except the `migrations` table. If you would like to customize the tables that should be truncated, you may define a `$tablesToTruncate` property on your test class:
226
226
227
-
> [!NOTE]
227
+
> [!NOTE]
228
228
> If you are using Pest, you should define properties or methods on the base `DuskTestCase` class or on any class your test file extends.
229
229
230
230
```php
@@ -299,7 +299,7 @@ The `dusk` command accepts any argument that is normally accepted by the Pest /
299
299
php artisan dusk --group=foo
300
300
```
301
301
302
-
> [!NOTE]
302
+
> [!NOTE]
303
303
> If you are using [Laravel Sail](/docs/{{version}}/sail) to manage your local development environment, please consult the Sail documentation on [configuring and running Dusk tests](/docs/{{version}}/sail#laravel-dusk).
> The attach function requires the `Zip` PHP extension to be installed and enabled on your server.
816
814
817
815
<aname="pressing-buttons"></a>
@@ -850,7 +848,7 @@ if ($browser->seeLink($linkText)) {
850
848
}
851
849
```
852
850
853
-
> [!WARNING]
851
+
> [!WARNING]
854
852
> These methods interact with jQuery. If jQuery is not available on the page, Dusk will automatically inject it into the page so it is available for the test's duration.
855
853
856
854
<aname="using-the-keyboard"></a>
@@ -868,7 +866,7 @@ Another valuable use case for the `keys` method is sending a "keyboard shortcut"
868
866
$browser->keys('.app', ['{command}', 'j']);
869
867
```
870
868
871
-
> [!NOTE]
869
+
> [!NOTE]
872
870
> All modifier keys such as `{command}` are wrapped in `{}` characters, and match the constants defined in the `Facebook\WebDriver\WebDriverKeys` class, which can be [found on GitHub](https://github.com/php-webdriver/php-webdriver/blob/master/lib/WebDriverKeys.php).
873
871
874
872
<aname="fluent-keyboard-interactions"></a>
@@ -2510,7 +2508,7 @@ class ExampleTest extends DuskTestCase
2510
2508
<aname="continuous-integration"></a>
2511
2509
## Continuous Integration
2512
2510
2513
-
> [!WARNING]
2511
+
> [!WARNING]
2514
2512
> Most Dusk continuous integration configurations expect your Laravel application to be served using the built-in PHP development server on port 8000. Therefore, before continuing, you should ensure that your continuous integration environment has an `APP_URL` environment variable value of `http://127.0.0.1:8000`.
0 commit comments