Files
saasshop/tests/Feature/AdminDashboardPlatformOpsOverviewNorthStarMiniBarsShouldRenderTest.php

36 lines
1.0 KiB
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardPlatformOpsOverviewNorthStarMiniBarsShouldRenderTest 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_platform_ops_overview_should_render_northstar_mini_bars(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="platform-ops-northstar-bars"', $html);
$this->assertStringContainsString('data-role="ops-northstar-active-paid-merchants-bar"', $html);
$this->assertStringContainsString('data-role="ops-northstar-renewal-rate-bar"', $html);
}
}