-
-
Save uno-de-piera/94f24472a7c360ddadebad448c7d83dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function testDatatablesPagination() | |
{ | |
factory(User::class, 10)->create(); | |
$userToLogin = User::find(2); | |
$userFirstOnNextPage = User::find(8); | |
$this->browse(function (Browser $browser) use($userToLogin, $userFirstOnNextPage) | |
{ | |
$browser->loginAs($userToLogin) | |
->visit('/users/datatables') | |
->pause(1000) //peticiones ajax | |
->with('.table', function (Browser $table) use ($userToLogin) | |
{ | |
$table->assertSee($userToLogin->email); | |
}) | |
->assertSee('Siguiente') | |
->clickLink('Siguiente') | |
->pause(1000) | |
->assertSee($userFirstOnNextPage->email); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment