diff --git a/tests/Feature/Settings/NavigationTest.php b/tests/Feature/Settings/NavigationTest.php index b8217968..20068c09 100644 --- a/tests/Feature/Settings/NavigationTest.php +++ b/tests/Feature/Settings/NavigationTest.php @@ -83,7 +83,7 @@ class NavigationTest extends FeatureTestCase public function testPerformanceDetailsPageIsAvailable(): void { - $this->loginAs() + $response = $this->loginAs() ->get(route('business.pages.show', [ 'section' => 'financial-operations', 'page' => 'performance-details', @@ -121,6 +121,17 @@ class NavigationTest extends FeatureTestCase ->assertSee('name="match_status"', false) ->assertSee('/workspace/financial-operations/performance-details/export', false) ->assertSeeText('店铺收款匹配订单明细尚未同步,请先执行 store-receipt:order-match:sync。'); + + $html = (string) $response->getContent(); + $offsetPosition = strpos($html, 'data-column-key="offset_amount"'); + $compensationPosition = strpos($html, 'data-column-key="default_compensation_amount"'); + $refundPosition = strpos($html, 'data-column-key="refund_amount"'); + + $this->assertNotFalse($offsetPosition); + $this->assertNotFalse($compensationPosition); + $this->assertNotFalse($refundPosition); + $this->assertLessThan($compensationPosition, $offsetPosition); + $this->assertLessThan($refundPosition, $compensationPosition); } public function testFinancialRiskControlPageIsAvailableBetweenFinancialReports(): void