Dashboard recent platform orders: add mini chart summary with links
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminDashboardRecentPlatformOrdersMiniBarsShouldRenderTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
protected function loginAsPlatformAdmin(): void
|
||||
{
|
||||
$this->seed();
|
||||
|
||||
$this->post('/admin/login', [
|
||||
'email' => 'platform.admin@demo.local',
|
||||
'password' => 'Platform@123456',
|
||||
])->assertRedirect('/admin');
|
||||
}
|
||||
|
||||
public function test_dashboard_should_render_recent_platform_orders_mini_bars_container(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$html = $this->get('/admin')
|
||||
->assertOk()
|
||||
->getContent();
|
||||
|
||||
$this->assertStringContainsString('data-role="recent-platform-orders-mini-bars"', $html);
|
||||
$this->assertStringContainsString('data-role="recent-platform-orders-mini-meta"', $html);
|
||||
$this->assertStringContainsString('data-points=', $html);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user