File: D:/HostingSpaces/SBogers10/anvil.komma.pro/tests/Browser/Components/backendNavigation.php
<?php
namespace App\KommaApp\Shop\Tests\Browser\Components;
use Laravel\Dusk\Browser;
use Laravel\Dusk\Component as BaseComponent;
class backendNavigation extends BaseComponent
{
/**
* Get the root selector for the component.
*
* @return string
*/
public function selector()
{
return '#sidebar';
}
/**
* Assert that the browser page contains the component.
*
* @param Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
$browser->assertVisible($this->selector());
}
/**
* Get the element shortcuts for the component.
*
* @return array
*/
public function elements()
{
return [
'@dashboardButton' => '> div.navigation > ul > li:nth-child(1) > a',
'@usersButton' => '> div.navigation > ul > li:nth-child(2) > a',
'@pagesButton' => '> div.navigation > ul > li:nth-child(3) > a',
'@productsButton' => '> div.navigation > ul > li:nth-child(4) > a',
'@productGroupsButton' => '> div.navigation > ul > li:nth-child(5) > a',
'@productCompositeButton' => '> div.navigation > ul > li:nth-child(7) > a',
'@logoutButton' => '> form > input.log-out',
];
}
}