File: D:/HostingSpaces/SBogers10/liempde.ehbo.today/tests/Browser/Pages/PostSectionTestPage.php
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
use Laravel\Dusk\Page as BasePage;
class PostSectionTestPage extends BasePage
{
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/kms/posts';
}
/**
* 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',
'@confirmYes' => '#confirmBox > div.modal > div.body > div > button.confirm',
'@confirmNo' => '#confirmBox > div.modal > div.body > div > button.cancel',
'@searchInput' => '#entities-search > div.search-field > form > input[type="text"]',
'@saveButton' => '#save-button',
'@generalTab' => '#entity > div.entity-tabs > ul > li:nth-child(1) > a',
'@enTab' => '#entity > div.entity-tabs > ul > li:nth-child(2) > a',
'@deTab' => '#entity > div.entity-tabs > ul > li:nth-child(3) > a',
'@nlTab' => '#entity > div.entity-tabs > ul > li:nth-child(4) > a',
'@sideBar' => '#main-entities-list > ul',
'@activeToggle' => '#OnOff-active-switch',
'@activeToggleInput' => '#OnOff-active',
'@DatePickerDate' => '#DatePicker-date_date',
'@DatePickerHours' => '#DatePicker-date_time_hours',
'@DatePickerMinutes' => '#DatePicker-date_time_minutes',
'@siteInput' => '#AutocompleteInput-site_id-fake'
];
}
}