34 lines
951 B
PHP
34 lines
951 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AdminDashboardPaidNoReceiptAriaLabelShouldUsePaidNoReceiptPhraseTest 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_paid_no_receipt_aria_label_should_use_paid_no_receipt_phrase(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$res = $this->get('/admin');
|
|
$res->assertOk();
|
|
|
|
$html = (string) $res->getContent();
|
|
$this->assertStringContainsString('aria-label="进入已付无回执订单集合"', $html);
|
|
$this->assertStringNotContainsString('aria-label="进入无回执订单集合"', $html);
|
|
}
|
|
}
|