Dusk: How can I do a search and check for a value returned from Datatables (yajara)

Posted 11 months ago by SapporoGuy

Here is what I have tried so far

                    ->waitForText('Search')
                    ->type('search', $default_category_name)
                    ->assertInputValue('search', '')
                    ->assertSee($default_category_name);

But would get a textarea error ... wth?

                    ->waitForText('Search')
                    ->script('window.scrollTo(0,document.body.scrollHeight);')
                    ->waitForText('Last')
                    ->click('#data-table-default-category_last')
//                    ->clickLink('Last')
                    ->assertSee($default_category_name);

But would get an array error.

What I am trying to do is a search on a datatables data.

also, why doesn't dusk/phpunit know that a page is actually beyond the resolution (meaning it needs to scroll)?

Thanks

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.