35 lines
1.0 KiB
PHP
35 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AdminPlatformOrderReceiptSummaryCardShouldHaveGoAddPaymentReceiptLinkTest 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_paid_no_receipt_summary_card_should_have_go_add_payment_receipt_link(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$res = $this->get('/admin/platform-orders');
|
|
$res->assertOk();
|
|
|
|
$html = (string) $res->getContent();
|
|
$this->assertStringContainsString('data-role="po-summary-link-go-add-payment-receipt"', $html);
|
|
$this->assertStringContainsString('href="#add-payment-receipt"', $html);
|
|
$this->assertStringContainsString('去补回执', $html);
|
|
}
|
|
}
|