Skip to content

Conversation

@aaronranard
Copy link

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

clickAll is a feature to click properties that are generated dynamically from your database and should not be hardcoded
@aaronranard
Copy link
Author

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
Copy link
Author

Gif Example

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