Repository navigation
test: replace fragile string assertions with precise checks - #1162
Merged
Merged
Conversation
parse rendered markup with the dom and assert textContent instead of stripping tags with a regex, use replaceAll where every occurrence of an escaped character is expected, and assert the exact custom emoji urls returned for a catalog instead of a url prefix. Co-authored-by: cid <d9f92a72922bf45c17379a47d64dae84b6020397c2d5a52b5317d512068cd9d3@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Kalvin Chau <[email protected]>
wesbillman
reviewed
Oct 15, 2026
wesbillman
left a comment
Collaborator
There was a problem hiding this comment.
🤖 Carl, an automated reviewer, commenting via Wes's GitHub account.
No blockers. Each replacement is at least as strict as the original: textContent compares the decoded visible text (no fixture changes value under decoding), every replaceAll fixture has exactly one occurrence so expectations are byte-identical, and the emoji URL list is strictly stronger than the old negative check. Mutation checks: InlineLink truncation off-by-one fails 2 tests; a native emoji gaining a URL fails the new emoji assertion but passed the old one. All 15 listed alerts map to changed lines. One optional nit inline.
wesbillman
approved these changes
Oct 15, 2026
collapse carriage returns and consecutive newlines to one space in the composer expectation, matching the production mention link formatter. Co-authored-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz> Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
johnmatthewtennant
added a commit
that referenced
this pull request
Oct 15, 2026
* origin/main: perf(css): replace wide :has() anchors with owner-set data attributes (#1180) fix(goose): share an MCP server pool and harden session lifecycle (#1142) test(browser): hold reading focus until the unread baseline is observed (#1182) Refine the profile menu and open status editing immediately (#1172) unify session naming, workspace and lifetime settings (#1079) perf(messages): stop forcing a layout on every action bar position frame (#1184) test(browser): prepare fixture dependencies once per run (#1126) test: replace fragile string assertions with precise checks (#1162) test: keep thread fixture errors out of http responses (#1163) feat: upgrade tauri and native plugins (#1169) test: pass native menu scripts to eval as arguments (#1160) test: cover shared link url policy (#1165) test: preserve literal text across markdown comment projection (#1164) test: pin html escaping of clipboard link labels (#1166) Preserve linked text pasted from other apps (#1069) fix(messages): keep the reader's message in place when a thread reply and layout change land together (#1130) Signed-off-by: John Tennant <[email protected]> # Conflicts: # src/bundled/channels/ChannelBody.tsx # src/bundled/channels/ConversationTab.tsx
johnmatthewtennant
pushed a commit
that referenced
this pull request
Oct 15, 2026
* commit 'f2595b8df20c9e6e91f79e77b52b700137063a49': (25 commits) Add community leave and device removal settings (#954) perf(css): replace wide :has() anchors with owner-set data attributes (#1180) fix(goose): share an MCP server pool and harden session lifecycle (#1142) test(browser): hold reading focus until the unread baseline is observed (#1182) Refine the profile menu and open status editing immediately (#1172) unify session naming, workspace and lifetime settings (#1079) perf(messages): stop forcing a layout on every action bar position frame (#1184) test(browser): prepare fixture dependencies once per run (#1126) test: replace fragile string assertions with precise checks (#1162) test: keep thread fixture errors out of http responses (#1163) feat: upgrade tauri and native plugins (#1169) test: pass native menu scripts to eval as arguments (#1160) test: cover shared link url policy (#1165) test: preserve literal text across markdown comment projection (#1164) test: pin html escaping of clipboard link labels (#1166) Preserve linked text pasted from other apps (#1069) fix(messages): keep the reader's message in place when a thread reply and layout change land together (#1130) separate session sharing from explicit channel conversion (#1070) feat(goose): bundle goose-acp with the app (#1110) feat(agents): answer unmentioned messages in one-to-one DMs (#1173) ... Signed-off-by: Sol <49aa1f65411fd096d2e2ec144f1e7aa36fdc76d1b907cfdf7be000c66f9d3b8e@buzz.block.builderlab.xyz>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves code-scanning alert 1, code-scanning alert 3, code-scanning alert 4, code-scanning alert 5, code-scanning alert 7, code-scanning alert 8, code-scanning alert 11, code-scanning alert 13, code-scanning alert 14, code-scanning alert 19, code-scanning alert 20, code-scanning alert 30, code-scanning alert 32, code-scanning alert 35, code-scanning alert 36. All changes are in tests.
InlineLink,MessageRowandMessageMarkdowntests no longer strip tags with/<[^>]+>/g. They parse the rendered markup into a detached element and asserttextContent, which also decodes entities the way users see them.InlineLink.test.tsxnow runs under jsdom.replaceAllinstead ofreplace. This affectscomposer-document,mention-draft,selection-copyandMessageMarkdown.MessageComposermirrors production's/[\r\n]+/gcollapse to one space. Current fixtures contain one occurrence each, so the expected values are unchanged.emoji-searchnow asserts the exact set of custom emoji URLs returned for a catalog, replacing a URL-prefix check. It now also catches duplicate or extra URLs.Verification
vitest runon the eight changed test files: 625/625 passed.pnpm typecheckandbiome check --error-on-warningson the changed files pass.