Download the PHP package pikanji/dusktests-plugin without Composer
On this page you can find all versions of the php package pikanji/dusktests-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pikanji/dusktests-plugin
More information about pikanji/dusktests-plugin
Files in pikanji/dusktests-plugin
Package dusktests-plugin
Short Description Enables to write test using Laravel's Dusk test framework.
License MIT
Informations about the package dusktests-plugin
OctoberCMS Laravel Dusk Plugin
日本語版はこちら
This plugin enables to use Laravel Dusk test framework in OctoberCMS projects.
Usage
Installation
Installation options are;
- OctoberCMS UI (not yet available now)
- Composer
- Manual
git clone
With Composer
Execute below at the root of your project:
Manual Git Clone
Although composer is still required to install dependencies, you can install this plugin without adding it to your composer.json.
In the plugins directory of your project, create pikanji
directory and simply execute git clone
in it.
Execute below at the root of your project.
Executing Tests
Dusk comes with example test (tests/Browser/ExampleTest.php
). You can test setup by running this test.
Fix Example Test
ExampleTest.php checks if a string "Laravel" is found in the loaded web page. Assuming that your are using fresh copy of demo theme, change "Laravel" to "October CMS" in ExampleTest.php to let the test pass.
Run Tests
Assuming you are running your web server on your local machine for testing and Chrome browser is installed, execute below at the root of your project. If you are running web server on Docker container see here in addition to this instruction.
Test could be very slow. Leave it for a couple minutes to see if it has progress.
Screenshots are stored in tests/Browser/screenshots
by default. There might be some configuration to change it.
Extending Timeout
If you get timeout error, you can try extending timeout like below in tests/DuskTestCase.php
.
In my case, 1 minute was not enough. So, I made it 3 minutes.
Using Docker Container
See here in addition to this instruction.
All versions of dusktests-plugin with dependencies
composer/installers Version ~1.0
october/system Version >=1.0.420
laravel/dusk Version ^2.0