Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply fixes from StyleCI
  • Loading branch information
tabacitu authored and StyleCIBot committed May 7, 2020
commit e6ffff6364fd6baf296a06d0ed832edb7a40d98c
3 changes: 1 addition & 2 deletions tests/Browser/DashboardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Tests\Browser;

use Tests\DuskTestCase;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;

class DashboardTest extends DuskTestCase
{
Expand All @@ -16,5 +16,4 @@ public function test_dashboard_cannot_be_accessed_without_login()
$browser->assertSee('Login');
});
}

}
4 changes: 2 additions & 2 deletions tests/Browser/LoginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Tests\Browser;

use Tests\DuskTestCase;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;

class LoginTest extends DuskTestCase
{
Expand All @@ -15,4 +15,4 @@ public function test_login_form_logs_user_in()
$browser->assertPathIs('/admin/dashboard');
});
}
}
}
16 changes: 7 additions & 9 deletions tests/Browser/PageCrudTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

namespace Tests\Browser;

use Tests\DuskTestCase;
use Laravel\Dusk\Browser;
use Facebook\WebDriver\WebDriverBy;
use App\User;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;

class PageCrudTest extends DuskTestCase
{
public function test_cannot_access_list_operation_without_login()
public function test_cannot_access_list_operation_without_login()
{
$this->browse(function (Browser $browser) {
$browser->visit('/admin/page');
Expand All @@ -19,18 +18,17 @@ public function test_cannot_access_list_operation_without_login()

public function test_page_crud_list_operation()
{

$this->browse(function (Browser $browser) {
$browser->visit('/admin/login');
$browser->visit('/admin/login');
$browser->press('Login');
$browser->clickLink('Pages');
$browser->waitForText('Showing');
$browser->assertSee('Showing');

// count the number of rows in the table tbody
$elements = $browser->driver->findElements(WebDriverBy::cssSelector('#crudTable tbody tr'));
$this->assertCount(10, $elements);

$this->assertCount(10, $elements);
});
}
}
}