diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 874918a..c72f3d8 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -110,6 +110,7 @@ 摘要概览 工具区 订单列表 + 回顶部
diff --git a/tests/Feature/AdminPlatformOrderIndexPageJumpLinksShouldIncludeBackToTopShortcutTest.php b/tests/Feature/AdminPlatformOrderIndexPageJumpLinksShouldIncludeBackToTopShortcutTest.php new file mode 100644 index 0000000..aeb52f9 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderIndexPageJumpLinksShouldIncludeBackToTopShortcutTest.php @@ -0,0 +1,35 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_platform_orders_page_jump_links_should_include_back_to_top_shortcut(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin/platform-orders'); + $res->assertOk(); + + $html = (string) $res->getContent(); + $this->assertStringContainsString('data-role="po-page-jump-top"', $html); + $this->assertStringContainsString('aria-label="回到页面顶部"', $html); + $this->assertStringContainsString('href="#po-page-top"', $html); + $this->assertStringContainsString('>回顶部<', $html); + } +}