Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Laravel Dusk Element Shortcut #109

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

frankyso
Copy link

@frankyso frankyso commented Jul 4, 2021

The Problem

I always use this package when developing with the Laravel framework and bootstrap, it's just a little difficult when making browser testing because to define selectors for text I wrote a fairly long code for the dusk selector like the example below:

Form::text('username', 'Username')->attrs(['dusk' => 'username'])

to generate an input like this

<input dusk="username" name="username">

The Idea

I'm thinking of adding a Laravel Dusk selector to make it easier for us to choose elements that will be used for automated browser testing later.

This PR will add a new function to specify the dusk selector directly into the element. as an example :

Form::text('username', 'Username')->dusk('username');

thank you for this wonderful package 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant