Files
saasshop/tests/Feature/AdminDashboardPlatformOpsOverviewNorthStarTextDetailsShouldBeCollapsibleTest.php

42 lines
1.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardPlatformOpsOverviewNorthStarTextDetailsShouldBeCollapsibleTest 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_platform_ops_overview_northstar_text_details_should_be_collapsible(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$html = (string) $res->getContent();
// Guardrail北极星指标“文字口径”应默认下沉到可折叠 details避免与 mini bars 重复抢版面。
$this->assertStringContainsString('data-role="platform-ops-northstar-details"', $html);
$this->assertStringContainsString('data-storage-key="admin.dashboard.platform_ops_northstar_details"', $html);
$this->assertStringContainsString('北极星指标(文字口径)', $html);
// 文字口径仍需保留关键行(避免后续误删导致运营无法核对)。
$this->assertStringContainsString('近30天已收款', $html);
$this->assertStringContainsString('活跃付费站点', $html);
$this->assertStringContainsString('续费成功率30天', $html);
}
}