{"id":13606259,"url":"https://github.com/wintercms/wn-dusk-plugin","last_synced_at":"2026-03-08T01:09:21.127Z","repository":{"id":52802473,"uuid":"344365943","full_name":"wintercms/wn-dusk-plugin","owner":"wintercms","description":"Plugin that provides support for the Laravel Dusk testing paradigm.","archived":false,"fork":false,"pushed_at":"2024-04-11T14:02:31.000Z","size":64,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-11T17:21:02.162Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wintercms.png","metadata":{"funding":{"github":"wintercms","open_collective":"wintercms"},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-03-04T05:56:19.000Z","updated_at":"2022-12-20T14:56:28.000Z","dependencies_parsed_at":"2024-04-15T06:32:34.183Z","dependency_job_id":"2da316fe-21e4-4446-a0d2-b95a33f72f35","html_url":"https://github.com/wintercms/wn-dusk-plugin","commit_stats":{"total_commits":31,"total_committers":5,"mean_commits":6.2,"dds":"0.25806451612903225","last_synced_commit":"e97ff91b46e88262e03e814a47336a5dbad3b7e6"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/wintercms/wn-dusk-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wintercms%2Fwn-dusk-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wintercms%2Fwn-dusk-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wintercms%2Fwn-dusk-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wintercms%2Fwn-dusk-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wintercms","download_url":"https://codeload.github.com/wintercms/wn-dusk-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wintercms%2Fwn-dusk-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260886442,"owners_count":23077206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-08-01T19:01:07.610Z","updated_at":"2026-03-08T01:09:16.103Z","avatar_url":"https://github.com/wintercms.png","language":"PHP","funding_links":["https://github.com/sponsors/wintercms","https://opencollective.com/wintercms"],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Dusk Plugin\n\nIntegrates Laravel Dusk browser testing into Winter CMS, providing Winter CMS and plugin developers with the tools to\nrun automated tests on a fully functional Winter CMS instance through a virtual browser.\n\n\u003e **Note:** This plugin is intended to be used for development purposes only. Configured improperly, it can allow users\n\u003e to circumvent authentication and sign in as any user. This plugin should be specified as a **development dependency** (ie. `require-dev`) only.\n\n## Getting started\n\nTo install the plugin, you may install it through the [Winter CMS Marketplace](https://wintercms.com/plugin/winter-dusk), or you may install it using Composer:\n\n```bash\ncomposer require --dev winter/wn-dusk-plugin\n```\n\nThen, run the migrations to ensure the plugin is enabled:\n\n```bash\nphp artisan winter:up\n```\n\nTo run the browser tests, you must install the Chrome web-driver and have the Google Chrome browser installed on the machine running the tests. The web-driver can be installed by running the following command:\n\n```bash\nphp artisan dusk:chrome-driver\n```\n\n## Running the tests\n\nBy default, the browser tests are configured to run the tests against a website served by the in-built Laravel web server. You may start this server by running the following:\n\n```bash\nphp artisan serve\n```\n\nTo start the browser tests, run:\n\n```bash\nphp artisan dusk\n```\n\nThis will execute all available browser tests in all enabled plugins on your Winter CMS installation. If you would like to run the tests for one plugin only, you may add the plugin code as an argument:\n\n```bash\nphp artisan dusk Acme.Blog\n```\n\nAs a shortcut after running the tests, you may re-run the failed tests by executing the following command:\n\n```bash\nphp artisan dusk:fails\n```\n\n---\n\n## Creating browser tests for your plugin\n\nThe Dusk plugin makes it a breeze to create browser tests for your own plugin.\n\nBrowser test classes should reside in the **tests/browser** folder of your plugin. Each test class file should ended with `Test.php` to indicate it is a class of test cases, and should extend the `Winter\\Dusk\\Classes\\BrowserTestCase` class.\n\nFor example, a blog plugin may wish to create a **BlogTest.php** file with the following content:\n\n```php\n\u003c?php namespace Acme\\Blog\\Tests\\Browser;\n\nuse Winter\\Dusk\\Classes\\BrowserTestCase;\n\nclass BlogTest extends BrowserTestCase\n{\n    public function testPost()\n    {\n        // the test to run\n    }\n}\n```\n\nEach test method in the class should be prefixed with **test** to denote that it is a test case.\n\nTo run the browser tests for your plugin, simply run the following:\n\n```bash\nphp artisan dusk Acme.Blog\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwintercms%2Fwn-dusk-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwintercms%2Fwn-dusk-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwintercms%2Fwn-dusk-plugin/lists"}