Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Created May 31, 2020 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/8f53277d551f83ed6a7dcfb441f76603 to your computer and use it in GitHub Desktop.
Save uno-de-piera/8f53277d551f83ed6a7dcfb441f76603 to your computer and use it in GitHub Desktop.
<?php
namespace Tests\Browser;
use App\User;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/**
* Class DatatablesTest
* @package Tests\Browser
* @group datatables
*/
class DatatablesTest extends DuskTestCase
{
use DatabaseMigrations;
public function testDatatablesCheckLoad()
{
factory(User::class, 10)->create();
$user = User::find(2);
$this->browse(function ($browser) use($user)
{
$browser->loginAs($user)
->visit('/users/datatables')
//->pause(500) //peticiones ajax
->waitForText('Siguiente')
->with('.table', function (Browser $table) use ($user)
{
$table->assertSee($user->email);
});
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment