Before we get started tinkering, let's discuss the basic game plan for this mini-series. As part of this discussion, we'll set up a fresh Laravel project and pull in both Cypress and my Laravel integration package.
I'm not yet ready to work on the actual package source code. For now, within a demo application, let's spike out the API that I want to offer. Think of this spiking as a way to tinker around, all while knowing that everything we write will be thrown in the trash.
Now that we've exposed an API endpoint that returns a list of all named routes for our Laravel app, the next step is to create a new Cypress command that makes a request to this endpoint.
In this lesson, we'll override the Cypress
visit command to allow for optionally passing a route name to it. We'll use a technique jokingly referred to as "duck punching" to allow for this.
Now that we fully understand what's required, let's switch over to the
laracasts/cypress package, itself, and begin implementing the new feature.
When making changes to a Composer package, it's always important to manually test your changes locally before tagging a new release. In this episode, I'll show you how to instruct Composer to install a package that is local to your machine.