+
+
平台侧批量改分类会校验所选分类是否属于被勾选商品对应商家;若混选了不同商家的商品,请选择各自可用的分类或先分批处理。
-
+
-
+
-
+{{ $products->links('pagination.admin') }}
+
+
@endsection
diff --git a/tests/Feature/AdminProductsIndexShouldUseListCardAndAdminPaginationTest.php b/tests/Feature/AdminProductsIndexShouldUseListCardAndAdminPaginationTest.php
new file mode 100644
index 0000000..2c996d4
--- /dev/null
+++ b/tests/Feature/AdminProductsIndexShouldUseListCardAndAdminPaginationTest.php
@@ -0,0 +1,40 @@
+seed();
+
+ $this->post('/admin/login', [
+ 'email' => 'platform.admin@demo.local',
+ 'password' => 'Platform@123456',
+ ])->assertRedirect('/admin');
+ }
+
+ public function test_admin_products_index_should_use_list_card_and_admin_pagination(): void
+ {
+ $this->loginAsPlatformAdmin();
+
+ $res = $this->get('/admin/products');
+ $res->assertOk();
+
+ // 护栏:商品列表区域应走统一 List Card 骨架。
+ $res->assertSee('list-card', false);
+ $res->assertSee('list-card-header', false);
+ $res->assertSee('list-card-body', false);
+ $res->assertSee('list-card-table', false);
+
+ // 分页统一:数据量可能不足导致 hasPages=false,因此用扫描型护栏断言。
+ $blade = file_get_contents(resource_path('views/admin/products/index.blade.php'));
+ $this->assertIsString($blade);
+ $this->assertStringContainsString("links('pagination.admin')", $blade);
+ }
+}