Download the PHP package joshhanley/livewire-dusk-testbench without Composer

On this page you can find all versions of the php package joshhanley/livewire-dusk-testbench. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package livewire-dusk-testbench

Livewire Dusk Testbench

Livewire Dusk Testbench is a convenience wrapper around Orchestral Testbench Dusk to make testing Livewire components in your package using Laravel Dusk easier.

The code was developed by Caleb Porzio for testing Livewire itself, and packaged up by Josh Hanley for use by others.

Getting Started

It's recommended you read the documentation of these packages before going through this document:

Installation

To install through composer, run the following command from terminal:

Upgrading from V2 of this package

Old test structure:

New test structure:

Usage

To use this package you need to:

Then you are ready to start testing.

There are other configuration options you can override depending on your needs.

Setup Browser TestCase

To use Livewire Dusk Testbench, all you need to do is extend LivewireDuskTestbench\TestCase instead of Orchestra\Testbench\Dusk\TestCase in your dusk tests.

Or configure this in your base browser testcase:

Register Package Service Providers

Register your package services providers in $packageProviders property to ensure they are loaded for testing:

Setup Layout Views

To add other packages to your app layout for testing with, such as AlpineJS, you will need to create a custom layout.

Create your own app layout by creating a views/components/layouts folder somewhere in your package and add a app.blade.php file inside the layouts folder.

Populate your app layout as required.

Then set your base view folder by overridding viewsDirectory method to return a path to the views folder you created.

For Example

A good location to store your views folder and app layout would be in your Dusk browser tests folder.

In the root of your package, create the following directories and file tests/Browser/views/components/layouts/app.blade.php

Then in your tests/Browser/TestCase.php file add:

Livewire Dusk Macros

Livewire comes with a bunch of Dusk macros which you can use.

Check them out in the Livewire source in 'livewire/src/Features/SupportTesting/DuskBrowserMacros.php'.

Demo Package

A demo package has been setup which gives a sample of how this package can be used. Check it out here

Livewire Package Demo

Possible Overrides

Below is a list of some of the settings you can override inside your browser TestCase file to suit your testing needs. Listed below are the defaults:

Troubleshooting

This is just a convenience wrapper around Orchestral Testbench Dusk to make testing Livewire Components in your package easier.

Consult the documentation for the relevant packages for troubleshooting.


All versions of livewire-dusk-testbench with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
livewire/livewire Version ^3.1|dev-master
orchestra/testbench-dusk Version ^8.0|^9.0
psy/psysh Version ^0.11.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package joshhanley/livewire-dusk-testbench contains the following files

Loading the files please wait ....