Commit e6eb5130 authored by Viral Solani's avatar Viral Solani

Add Log Viewer Tests

parent ec1d8544
<?php //dd(getMenuItems());
<?php //dd(getMenuItems());
?>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
......@@ -111,15 +111,16 @@
</li>
@endauth
</ul>
@permission('view-faq')
</li>
@endauth
@permission('view-faq')
<li class="{{ active_class(Active::checkUriPattern('admin/faqs*')) }}">
<a href="{{ route('admin.faqs.index')}}">
<i class="fa fa-question-circle"></i>
<span>{{ trans('labels.backend.faqs.title') }}</span>
</a>
</li>
@endauth
</li>
@endauth
<li class="{{ active_class(Active::checkUriPattern('admin/log-viewer*')) }} treeview">
......
<?php
namespace Tests\Feature\Backend;
use Tests\BrowserKitTestCase;
/**
* Class LogViewerRouteTest.
*/
class LogViewerRouteTest extends BrowserKitTestCase
{
/** @test **/
public function admin_users_can_see_logviewer_dashboard()
{
$this->actingAs($this->admin)
->visit('/admin/log-viewer')
->see('Log Viewer');
}
/** @test **/
public function admin_users_can_see_logviewer_list()
{
$this->actingAs($this->admin)
->visit('/admin/log-viewer/logs')
->see('Logs');
}
/** @test **/
public function admin_users_can_see_logviewer_single_date()
{
$this->actingAs($this->admin)
->visit('/admin/log-viewer/logs/'.date('Y-m-d'))
->see('Log ['.date('Y-m-d').']');
}
/** @test **/
public function admin_users_can_see_logviewer_single_date_type()
{
$this->actingAs($this->admin)
->visit('/admin/log-viewer/logs/'.date('Y-m-d').'/error')
->see('Log ['.date('Y-m-d').']');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment