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

Allow assertion of available options on a given select element #195

Merged
merged 2 commits into from
Mar 14, 2017

Conversation

deleugpn
Copy link
Contributor

Closes #65.

This PR will allow assertions as follows:

$this->browse(function (Browser $browser) {
    $browser->visit(new HomePage)
        ->assertOptionAvailable('laravel-dusk', '1')
        ->assertOptionsAvailable('laravel-dusk', ['1', ''])
        ->assertOptionNotAvailable('laravel-dusk', '10')
        ->assertOptionsNotAvailable('laravel-dusk', ['10', 'unavailable']);
    });

On a select like this:

<select name="laravel-dusk">
    <option value="1">First</option>
    <option value="">Empty</option>
</select>

@taylorotwell taylorotwell merged commit 7654b3e into laravel:master Mar 14, 2017
@lasselehtinen
Copy link

Awesome, thanks! 👍

@deleugpn deleugpn deleted the assert-options branch April 18, 2017 20:29
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.

3 participants