RUN  v4.1.0 E:/Desktop/CICD ✓  unit  src/modules/announcements/schema.test.ts (18 tests) 13ms ✓  unit  src/modules/announcements/is-announcement-visible.test.ts (15 tests) 7ms ❯  unit  src/modules/announcements/components/announcement-card.test.tsx (16 tests | 9 failed) 400ms  × 渲染标题与内容 41ms ✓ 渲染类型 badge(school) 7ms ✓ 未提供 href 时不渲染外层 Link 5ms ✓ isRead=false 时应用 ring-2 ring-primary/40 类名 3ms ✓ isRead=true 时不应用 ring 类名 3ms ✓ isRead=undefined 时不应用 ring 类名 2ms ✓ isRead=false 时渲染未读 badge 3ms ✓ isPinned=true 时渲染已置顶 badge 与 Pin 图标 fill 6ms  × canManage=true 时渲染置顶按钮 144ms  × canManage=false 时不渲染置顶按钮 30ms  × 点击置顶按钮调用 service.togglePin 30ms  × togglePin 返回失败时回滚 isPinned 并显示 toast.error 20ms  × togglePin 抛错时回滚并显示 toast.error 27ms  × 置顶按钮支持 Enter 键触发 27ms  × 置顶按钮支持 Space 键触发 23ms  × 置顶按钮在 toggling 时禁用 26ms node.exe : At line:1 char:1 + & "C:\Program Files\nodejs/node.exe" "C:\Program Files\nodejs/node_mo ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 9 ⎯⎯⎯⎯⎯⎯⎯  FAIL   unit  src/modules/announcements/components/announcement-card.test.tsx[2 m > AnnouncementCard > 基础渲染 > 渲染标题与内容 Error: Invalid Chai property: toBeInTheDocument  ❯ src/modules/announcements/components/announcement-card.test.tsx:128:41 126| const service = createMockService() 127| renderCard(service) 128| expect(screen.getByText("测试公告标题")).toBe InTheDocument()  | ^ 129| expect(screen.getByText("测试公告内容")).toBe InTheDocument() 130| }) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/9]⎯  FAIL   unit  src/modules/announcements/components/announcement-card.test.tsx[2 m > AnnouncementCard > isPinned 视觉与交互 > canManage=true 时渲染置顶按钮 TestingLibraryElementError: Found multiple elements with the role "button" and name "actions.pin" Here are the matching elements: Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       (If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAl lByText`)). Ignored nodes: comments, script, style  
    测试公告标题    status.published  
    测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
    测试公告标题    status.published  
    测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
  [3...  ❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19  ❯ getElementError node_modules/@testing-library/dom/dist/query-helpers.js:20:35  ❯ getMultipleElementsFoundError node_modules/@testing-library/dom/dist/query-helpers.js:23:10[ 39m  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:55:13  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19  ❯ src/modules/announcements/components/announcement-card.test.tsx:194:32 192| const service = createMockService() 193| renderCard(service) 194| const pinButton = screen.getByRole("button", { name: "actions.pi…  | ^ 195| expect(pinButton).toBeInTheDocument() 196| }) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/9]⎯  FAIL   unit  src/modules/announcements/components/announcement-card.test.tsx[2 m > AnnouncementCard > isPinned 视觉与交互 > canManage=false 时不渲染置顶按钮 TestingLibraryElementError: Found multiple elements with the role "button" and name "actions.pin" Here are the matching elements: Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       (If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAl lByText`)). Ignored nodes: comments, script, style  
    测试公告标题    status.published  
 
   测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
    测试公告标题    status.published  
    测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
  [3...  ❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19  ❯ getElementError node_modules/@testing-library/dom/dist/query-helpers.js:20:35  ❯ getMultipleElementsFoundError node_modules/@testing-library/dom/dist/query-helpers.js:23:10[ 39m  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:55:13  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19  ❯ src/modules/announcements/components/announcement-card.test.tsx:205:21 203| </AnnouncementsServiceProvider> 204| ) 205| expect(screen.queryByRole("button", { name: "actions.pin" })).to…  | ^ 206| }) 207| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/9]⎯  FAIL   unit  src/modules/announcements/components/announcement-card.test.tsx[2 m > AnnouncementCard > isPinned 视觉与交互 > 点击置顶按钮调用 service.togglePin TestingLibraryElementError: Found multiple elements with the role "button" and name "actions.pin" Here are the matching elements: Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       (If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAl lByText`)). Ignored nodes: comments, script, style  
    测试公告标题    status.published  
 
   测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
    测试公告标题    status.published  
    测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
  [3...  ❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19  ❯ getElementError node_modules/@testing-library/dom/dist/query-helpers.js:20:35  ❯ getMultipleElementsFoundError node_modules/@testing-library/dom/dist/query-helpers.js:23:10[ 39m  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:55:13  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19  ❯ src/modules/announcements/components/announcement-card.test.tsx:217:32 215| renderCard(service) 216| 217| const pinButton = screen.getByRole("button", { name: "actions.pi…  | ^ 218| await fireEvent.click(pinButton) 219| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/9]⎯  FAIL   unit  src/modules/announcements/components/announcement-card.test.tsx[2 m > AnnouncementCard > isPinned 视觉与交互 > togglePin 返回失败时回滚 isPinned 并显示 toast.error TestingLibraryElementError: Found multiple elements with the role "button" and name "actions.pin" Here are the matching elements: Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       (If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAl lByText`)). Ignored nodes: comments, script, style  
    测试公告标题    status.published  
 
   测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
    测试公告标题    status.published  
    测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
  [3...  ❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19  ❯ getElementError node_modules/@testing-library/dom/dist/query-helpers.js:20:35  ❯ getMultipleElementsFoundError node_modules/@testing-library/dom/dist/query-helpers.js:23:10[ 39m  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:55:13  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19  ❯ src/modules/announcements/components/announcement-card.test.tsx:233:32 231| renderCard(service) 232| 233| const pinButton = screen.getByRole("button", { name: "actions.pi…  | ^ 234| await fireEvent.click(pinButton) 235| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/9]⎯  FAIL   unit  src/modules/announcements/components/announcement-card.test.tsx[2 m > AnnouncementCard > isPinned 视觉与交互 > togglePin 抛错时回滚并显示 toast.error TestingLibraryElementError: Found multiple elements with the role "button" and name "actions.pin" Here are the matching elements: Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       (If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAl lByText`)). Ignored nodes: comments, script, style  
    测试公告标题    status.published  
 
   测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
    测试公告标题    status.published  
    测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
  [3...  ❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19  ❯ getElementError node_modules/@testing-library/dom/dist/query-helpers.js:20:35  ❯ getMultipleElementsFoundError node_modules/@testing-library/dom/dist/query-helpers.js:23:10[ 39m  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:55:13  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19  ❯ src/modules/announcements/components/announcement-card.test.tsx:245:32 243| renderCard(service) 244| 245| const pinButton = screen.getByRole("button", { name: "actions.pi…  | ^ 246| await fireEvent.click(pinButton) 247| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/9]⎯  FAIL   unit  src/modules/announcements/components/announcement-card.test.tsx[2 m > AnnouncementCard > a11y(P2-1) > 置顶按钮支持 Enter 键触发 TestingLibraryElementError: Found multiple elements with the role "button" and name "actions.pin" Here are the matching elements: Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       (If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAl lByText`)). Ignored nodes: comments, script, style  
    测试公告标题    status.published  
 
   测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
    测试公告标题    status.published  
    测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
  [3...  ❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19  ❯ getElementError node_modules/@testing-library/dom/dist/query-helpers.js:20:35  ❯ getMultipleElementsFoundError node_modules/@testing-library/dom/dist/query-helpers.js:23:10[ 39m  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:55:13  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19  ❯ src/modules/announcements/components/announcement-card.test.tsx:263:32 261| renderCard(service) 262| 263| const pinButton = screen.getByRole("button", { name: "actions.pi…  | ^ 264| await fireEvent.keyDown(pinButton, { key: [ 32m"Enter" }) 265| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[7/9]⎯  FAIL   unit  src/modules/announcements/components/announcement-card.test.tsx[2 m > AnnouncementCard > a11y(P2-1) > 置顶按钮支持 Space 键触发 TestingLibraryElementError: Found multiple elements with the role "button" and name "actions.pin" Here are the matching elements: Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       (If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAl lByText`)). Ignored nodes: comments, script, style  
    测试公告标题    status.published  
 
   测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
    测试公告标题    status.published  
    测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
  [3...  ❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19  ❯ getElementError node_modules/@testing-library/dom/dist/query-helpers.js:20:35  ❯ getMultipleElementsFoundError node_modules/@testing-library/dom/dist/query-helpers.js:23:10[ 39m  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:55:13  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19  ❯ src/modules/announcements/components/announcement-card.test.tsx:278:32 276| renderCard(service) 277| 278| const pinButton = screen.getByRole("button", { name: "actions.pi…  | ^ 279| await fireEvent.keyDown(pinButton, { key: [ 32m" " }) 280| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[8/9]⎯  FAIL   unit  src/modules/announcements/components/announcement-card.test.tsx[2 m > AnnouncementCard > a11y(P2-1) > 置顶按钮在 toggling 时禁用 TestingLibraryElementError: Found multiple elements with the role "button" and name "actions.pin" Here are the matching elements: Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       Ignored nodes: comments, script, style       (If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAl lByText`)). Ignored nodes: comments, script, style  
    测试公告标题    status.published  
 
   测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
    测试公告标题    status.published  
    测试公告内容 

   type.school   meta.publishedAt:{"date":"FMT:2026-06-25T00:00:00.000Z"}   meta.author:{"name":"管理员"}            
  [3...  ❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19  ❯ getElementError node_modules/@testing-library/dom/dist/query-helpers.js:20:35  ❯ getMultipleElementsFoundError node_modules/@testing-library/dom/dist/query-helpers.js:23:10[ 39m  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:55:13  ❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19  ❯ src/modules/announcements/components/announcement-card.test.tsx:290:32 288| renderCard(service) 289| 290| const pinButton = screen.getByRole("button", { name: "actions.pi…  | ^ 291| fireEvent.click(pinButton) 292| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[9/9]⎯