Integrated icon indicating copy to clipboard operation
Integrated copied to clipboard

add clickAll

Open aaronranard opened this issue 8 years ago • 2 comments

clickAll is a feature to click properties that are generated dynamically from your database and should not be hardcoded

aaronranard avatar Jul 27 '16 17:07 aaronranard

If you have elements that are populated dynamically from your database, like confirmations that a user must check, for example, they should not have to be hardcoded into tests.

$this->visit('/confirmations')
     ->clickAll(App\Confirmation::all(), 'label[for={$1}]', 'slug');

In this example, the Confirmation Model would have a slug field which populates the

<label for="{{ $confirmation->slug }}"> 

field.

aaronranard avatar Jul 27 '16 17:07 aaronranard

Gif Example

aaronranard avatar Jul 27 '16 17:07 aaronranard