[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MF892EZSP2DGRBFTZYTN5X":3,"skill-same:01M6MF892EZSP2DGRBFTZYTN5X":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":56,"ownerHtmlUrl":57,"ownerBlogUrl":58,"ownerDescription":59,"updatedAt":60,"install":61,"resources":74},"01M6MF892EZSP2DGRBFTZYTN5X","cometchat-angular-v5-testing",null,"Test an Angular app that embeds CometChat — what to mock vs exercise for real, TestBed setup for standalone kit components, avoiding real network in unit tests, and a two-account manual pass for realtime. Triggers: 'write tests for my chat', 'mock cometchat in jest', 'testbed cometchat', 'my tests hang', 'e2e test the chat'.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fcometchat\u002Fcometchat-skills\u002Fskills\u002Fcometchat-angular-v5-testing\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"angular","cometchat angular v5 testing","testing","cometchat","e2e playwright","manual","for","vitest","angular testing","my","verified","network","write","jest","components","exercise","kit","write tests","e2e test","standalone","app","unit","2026-11-10 10:12:30",false,"---\nname: cometchat-angular-v5-testing\ndescription: \"Test an Angular app that embeds CometChat — what to mock vs exercise for real, TestBed setup for standalone kit components, avoiding real network in unit tests, and a two-account manual pass for realtime. Triggers: 'write tests for my chat', 'mock cometchat in jest', 'testbed cometchat', 'my tests hang', 'e2e test the chat'.\"\nlicense: \"MIT\"\ncompatibility: \"@cometchat\u002Fchat-uikit-angular ^5 (5.1.0–5.2.2 verified); Angular 17-21; Jest \u002F Karma \u002F Vitest \u002F Playwright\"\nmetadata:\n  author: \"CometChat\"\n  version: \"1.0.0\"\n  tags: \"cometchat angular testing v5 testbed jest mock e2e playwright\"\n---\n\n> **Ground truth:** `@cometchat\u002Fchat-uikit-angular@5` (5.1.0–5.2.2 verified). **The Angular UI Kit docs have no testing page** — the strategy here is the pack's own, and is labelled as such rather than presented as documented (a tracked DOCS GAP). Any kit symbol a test mocks must still exist in the `angular-v5` catalog, and its real shape comes from the component's `.md` twin via `cometchat-angular-v5-core\u002Freferences\u002Fdocs-map.md` — mock the API the kit actually exposes, never one invented to fit the test.\n\n## Companion skills (read first)\n- `cometchat-angular-v5-core` — init\u002Flogin lifecycle, which is what makes tests hang if unmocked.\n\n## Use this skill when\nWriting tests for a component that renders kit components, or diagnosing tests that hang or fail on network.\n\n## Decide what you are testing\n| Testing | Approach |\n| --- | --- |\n| **Your** logic — selection, routing, state | Unit test with CometChat **mocked** |\n| Kit component internals | Don't. It is a third-party dependency with its own tests |\n| Your app's chat flow end-to-end | Playwright against a real dev app, two accounts |\n| Realtime delivery | Manual, two browsers. Not automatable cheaply |\n\nThe common mistake is unit-testing kit internals. Test the seam: given a click, does your component set the right active chat?\n\n## Mock CometChat in unit tests\nKit components open sockets and call the API at construction. Left real, tests hang, fail offline, and pollute a live app with test data.\n\n```ts\n\u002F\u002F src\u002Ftesting\u002Fcometchat.mock.ts\nexport const cometChatUIKitMock = {\n  initFromSettings: jest.fn().mockResolvedValue({}),\n  login: jest.fn().mockResolvedValue({ getUid: () => 'test-uid' }),\n  loginWithAuthToken: jest.fn().mockResolvedValue({ getUid: () => 'test-uid' }),\n  logout: jest.fn().mockResolvedValue(undefined),\n  getLoggedInUser: jest.fn().mockReturnValue({ getUid: () => 'test-uid' }),\n  isInitialized: jest.fn().mockReturnValue(true),\n  isCallingEnabled: jest.fn().mockReturnValue(false),\n};\n```\nPoint the module at it (Jest):\n```ts\njest.mock('@cometchat\u002Fchat-uikit-angular', () => ({\n  ...jest.requireActual('@cometchat\u002Fchat-uikit-angular'),\n  CometChatUIKit: cometChatUIKitMock,\n}));\n```\nKeep `requireActual` so real component classes and `ChatStateService` still exist — you want your own wiring exercised, only the network faked.\n\n## TestBed with standalone kit components\nThey are standalone, so they go in `imports`, exactly as in the app:\n```ts\nimport { TestBed } from '@angular\u002Fcore\u002Ftesting';\nimport { ChatComponent } from '.\u002Fchat.component';\n\nbeforeEach(async () => {\n  await TestBed.configureTestingModule({ imports: [ChatComponent] }).compileComponents();\n});\n```\nIf a test fails with \"is not a known element\", the component under test is missing it from its own `imports` — a real bug the test just caught, not a test problem.\n\n## Prefer testing ChatStateService over the DOM\nAssert state, not kit markup. Kit internals change between releases; your wiring should not.\n```ts\nit('sets the active group when a group conversation is clicked', () => {\n  const fixture = TestBed.createComponent(ChatComponent);\n  const cmp = fixture.componentInstance;\n\n  \u002F\u002F Mock the SHAPE the kit actually emits: a Conversation whose subject is a Group.\n  \u002F\u002F Handing open() a bare { getGuid } instead lets a duck-typing bug pass the test\n  \u002F\u002F while every group chat throws \"getUid is not a function\" in the browser.\n  const group = new CometChat.Group('g1', 'Team', CometChat.GROUP_TYPE.PUBLIC);\n  const conversation = { getConversationType: () => 'group', getConversationWith: () => group };\n\n  cmp.open(conversation as unknown as CometChat.Conversation);\n  expect(cmp.chatState.getActiveGroup()).toBeTruthy();\n  expect(cmp.chatState.getActiveUser()).toBeFalsy();      \u002F\u002F the group must NOT land in the user slot\n});\n```\n> **Mock the emitted shape, not the shape your code happens to check.** A mock built backwards from the implementation can only confirm the implementation — including its bugs. `(itemClick)` emits a `Conversation`; a test that passes anything else is not exercising the wiring.\n\n## E2E with Playwright\nUse a real dev app and two seeded users. What is worth asserting:\n- The conversation list renders rows\n- Clicking one opens header + list + composer\n- Sending text makes it appear\n- **No console errors** — the kit fails quietly, so this catches a lot\n- **Nothing collapsed** — assert the message list's height is non-zero; a zero-height pane is the most common silent break\n\n```ts\nconst box = await page.locator('cometchat-message-list').boundingBox();\nexpect(box!.height).toBeGreaterThan(100);\n```\nSeed users and conversations through the REST API in setup, not the UI.\n\n## Not worth automating\nRealtime delivery between two clients, calls (needs media permissions and two peers), and push (needs a real device and a backgrounded app). Verify these manually and say so in the test plan rather than writing brittle automation.\n\n## Common pitfalls\n1. **Unmocked CometChat in unit tests** → hangs, flakes, offline failures.\n2. **Mocking the whole module** without `requireActual` → your own wiring never runs.\n3. **Asserting kit DOM internals** → breaks on every kit release.\n4. **Tests against a production app** → real users, real data.\n5. **No zero-height assertion in E2E** → the most common visual break goes unnoticed.\n6. **No teardown in tests** → leaked listeners bleed across specs.\n\n## Verify it works\nUnit tests pass offline · no test opens a real socket · a missing `imports` entry fails a test · E2E asserts non-zero height and no console errors · manual checks are documented, not faked.\n","> **Ground truth:** `@cometchat\u002Fchat-uikit-angular@5` (5.1.0–5.2.2 verified). **The Angular UI Kit docs have no testing page** — the strategy here is the pack's own, and is labelled as such rather than presented as documented (a tracked DOCS GAP). Any kit symbol a test mocks must still exist in the `angular-v5` catalog, and its real shape comes from the component's `.md` twin via `cometchat-angular-v5-core\u002Freferences\u002Fdocs-map.md` — mock the API the kit actually exposes, never one invented to fit the test.\n\n## Companion skills (read first)\n- `cometchat-angular-v5-core` — init\u002Flogin lifecycle, which is what makes tests hang if unmocked.\n\n## Use this skill when\nWriting tests for a component that renders kit components, or diagnosing tests that hang or fail on network.\n\n## Decide what you are testing\n| Testing | Approach |\n| --- | --- |\n| **Your** logic — selection, routing, state | Unit test with CometChat **mocked** |\n| Kit component internals | Don't. It is a third-party dependency with its own tests |\n| Your app's chat flow end-to-end | Playwright against a real dev app, two accounts |\n| Realtime delivery | Manual, two browsers. Not automatable cheaply |\n\nThe common mistake is unit-testing kit internals. Test the seam: given a click, does your component set the right active chat?\n\n## Mock CometChat in unit tests\nKit components open sockets and call the API at construction. Left real, tests hang, fail offline, and pollute a live app with test data.\n\n```ts\n\u002F\u002F src\u002Ftesting\u002Fcometchat.mock.ts\nexport const cometChatUIKitMock = {\n  initFromSettings: jest.fn().mockResolvedValue({}),\n  login: jest.fn().mockResolvedValue({ getUid: () => 'test-uid' }),\n  loginWithAuthToken: jest.fn().mockResolvedValue({ getUid: () => 'test-uid' }),\n  logout: jest.fn().mockResolvedValue(undefined),\n  getLoggedInUser: jest.fn().mockReturnValue({ getUid: () => 'test-uid' }),\n  isInitialized: jest.fn().mockReturnValue(true),\n  isCallingEnabled: jest.fn().mockReturnValue(false),\n};\n```\nPoint the module at it (Jest):\n```ts\njest.mock('@cometchat\u002Fchat-uikit-angular', () => ({\n  ...jest.requireActual('@cometchat\u002Fchat-uikit-angular'),\n  CometChatUIKit: cometChatUIKitMock,\n}));\n```\nKeep `requireActual` so real component classes and `ChatStateService` still exist — you want your own wiring exercised, only the network faked.\n\n## TestBed with standalone kit components\nThey are standalone, so they go in `imports`, exactly as in the app:\n```ts\nimport { TestBed } from '@angular\u002Fcore\u002Ftesting';\nimport { ChatComponent } from '.\u002Fchat.component';\n\nbeforeEach(async () => {\n  await TestBed.configureTestingModule({ imports: [ChatComponent] }).compileComponents();\n});\n```\nIf a test fails with \"is not a known element\", the component under test is missing it from its own `imports` — a real bug the test just caught, not a test problem.\n\n## Prefer testing ChatStateService over the DOM\nAssert state, not kit markup. Kit internals change between releases; your wiring should not.\n```ts\nit('sets the active group when a group conversation is clicked', () => {\n  const fixture = TestBed.createComponent(ChatComponent);\n  const cmp = fixture.componentInstance;\n\n  \u002F\u002F Mock the SHAPE the kit actually emits: a Conversation whose subject is a Group.\n  \u002F\u002F Handing open() a bare { getGuid } instead lets a duck-typing bug pass the test\n  \u002F\u002F while every group chat throws \"getUid is not a function\" in the browser.\n  const group = new CometChat.Group('g1', 'Team', CometChat.GROUP_TYPE.PUBLIC);\n  const conversation = { getConversationType: () => 'group', getConversationWith: () => group };\n\n  cmp.open(conversation as unknown as CometChat.Conversation);\n  expect(cmp.chatState.getActiveGroup()).toBeTruthy();\n  expect(cmp.chatState.getActiveUser()).toBeFalsy();      \u002F\u002F the group must NOT land in the user slot\n});\n```\n> **Mock the emitted shape, not the shape your code happens to check.** A mock built backwards from the implementation can only confirm the implementation — including its bugs. `(itemClick)` emits a `Conversation`; a test that passes anything else is not exercising the wiring.\n\n## E2E with Playwright\nUse a real dev app and two seeded users. What is worth asserting:\n- The conversation list renders rows\n- Clicking one opens header + list + composer\n- Sending text makes it appear\n- **No console errors** — the kit fails quietly, so this catches a lot\n- **Nothing collapsed** — assert the message list's height is non-zero; a zero-height pane is the most common silent break\n\n```ts\nconst box = await page.locator('cometchat-message-list').boundingBox();\nexpect(box!.height).toBeGreaterThan(100);\n```\nSeed users and conversations through the REST API in setup, not the UI.\n\n## Not worth automating\nRealtime delivery between two clients, calls (needs media permissions and two peers), and push (needs a real device and a backgrounded app). Verify these manually and say so in the test plan rather than writing brittle automation.\n\n## Common pitfalls\n1. **Unmocked CometChat in unit tests** → hangs, flakes, offline failures.\n2. **Mocking the whole module** without `requireActual` → your own wiring never runs.\n3. **Asserting kit DOM internals** → breaks on every kit release.\n4. **Tests against a production app** → real users, real data.\n5. **No zero-height assertion in E2E** → the most common visual break goes unnoticed.\n6. **No teardown in tests** → leaked listeners bleed across specs.\n\n## Verify it works\nUnit tests pass offline · no test opens a real socket · a missing `imports` entry fails a test · E2E asserts non-zero height and no console errors · manual checks are documented, not faked.\n",{"name":5,"license":15,"metadata":46,"description":7,"compatibility":50},{"tags":47,"author":48,"version":49},"cometchat angular testing v5 testbed jest mock e2e playwright","CometChat","1.0.0","@cometchat\u002Fchat-uikit-angular ^5 (5.1.0–5.2.2 verified); Angular 17-21; Jest \u002F Karma \u002F Vitest \u002F Playwright","main","cebc3dce495d7eb80d3b1d5841f877a4a92e162d","plugins\u002Fcometchat\u002Fcometchat-skills\u002Fskills\u002Fcometchat-angular-v5-testing",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill cometchat-angular-v5-testing",{"tool":67,"command":68},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill cometchat-angular-v5-testing",{"tool":70,"command":71},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill cometchat-angular-v5-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fcometchat\u002Fcometchat-skills\u002Fskills\u002Fcometchat-angular-v5-testing\u002FSKILL.md",true,[],[76,85,93,101,109,117],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":84},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":84},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":97,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":84},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":105,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":84},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":113,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":84},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":121,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":84},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]