From 6c52a2c3c48a6a1215b3cf2eba4661033194692a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Thu, 19 Mar 2026 14:08:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E9=A1=B5=E5=86=85=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E5=9B=9E=E9=A1=B6=E9=83=A8=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/platform_orders/index.blade.php | 1 + ...inksShouldIncludeBackToTopShortcutTest.php | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 tests/Feature/AdminPlatformOrderIndexPageJumpLinksShouldIncludeBackToTopShortcutTest.php 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); + } +}