File: D:/HostingSpaces/ASmits/kemi.nl/app/KommaApp/Shop/Tests/Browser/Pages/CategoriesSectionTestPage.php
<?php
namespace App\KommaApp\Shop\Tests\Browser\Pages;
use Laravel\Dusk\Browser;
use Laravel\Dusk\Page as BasePage;
class CategoriesSectionTestPage extends BasePage
{
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/kms/categories';
}
/**
* Assert that the browser is on the page.
*
* @param Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
$browser->assertPathIs($this->url());
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'@addButton' => '#main-entities-list > a.new-item',
'@deleteButton' => '#entity > div.entity-header > div.entity-buttons > form > input.trash',
'@searchInput' => '#entities-search > div.search-field > form > input[type="text"]',
'@saveButton' => '#save-button',
'@generalTab' => '#entity > div.entity-tabs > ul > li:nth-child(1) > a',
'@nlTab' => '#entity > div.entity-tabs > ul > li:nth-child(2) > a',
'@parentSelect' => '#Select-parent_id-button > span.ui-selectmenu-text',
'@parentSelectLastItem' => '#Select-parent_id-menu > li:last-child > .ui-menu-item-wrapper'
];
}
}