33 lines
967 B
PHP
33 lines
967 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AdminPlatformOrderReceiptSummaryCardShouldContainBothForwardAndBackLinksTest 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_contain_both_forward_and_back_links(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$res = $this->get('/admin/platform-orders');
|
|
$res->assertOk();
|
|
|
|
$html = (string) $res->getContent();
|
|
$this->assertMatchesRegularExpression('/data-role="po-summary-card-paid-no-receipt"[\s\S]*?po-summary-link-no-receipt-orders[\s\S]*?po-summary-link-view-receipt-orders/u', $html);
|
|
}
|
|
}
|