BlueGit

ict rusty-teams

fix(chat): code block composer test expects the header mark

- Since #145 a code block starts with CODE_HEADER_MARK in the input value; the test asserted the old value and kept main red

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-11-27 · 3 days ago

Hash
bf6052cf9ac5e42d3e1ca7841d240d627a310d98
Parent
024e3bbe
1 file changed +8 −2
crates/app/src/views/composer.rs +8 −2
@@ -4862,7 +4862,10 @@ mod tests {
4862 4862 visual.run_until_parked();
4863 4863 let draft = composer.read_with(&visual, |composer, _| composer.draft.clone());
4864 4864 let dart = teams_core::LineKind::Code(Some("dart".into()));
4865 assert_eq!(draft.lines(), [teams_core::LineKind::Text, dart.clone(), dart]);
4865 assert_eq!(
4866 draft.lines(),
4867 [teams_core::LineKind::Text, dart.clone(), dart]
4868 );
4866 4869 assert_eq!(
4867 4870 draft.to_html(),
4868 4871 "x<pre class=\"language-dart skipProofing\" spellcheck=\"false\"><code>a<br>b</code></pre>"
@@ -5093,7 +5096,10 @@ mod tests {
5093 5096 .cx
5094 5097 .write_to_clipboard(gpui_kit::ClipboardItem::new_string("**x**".to_owned()));
5095 5098 typist.press("ctrl-v");
5096 assert_eq!(typist.value(), ":) **x**");
5099 assert_eq!(
5100 typist.value(),
5101 format!("{}:) **x**", teams_core::CODE_HEADER_MARK)
5102 );
5097 5103 let composer = typist.composer.clone();
5098 5104 assert!(
5099 5105 typist
@@ -4862,7 +4862,10 @@ mod tests {
4862 visual.run_until_parked();
4862 visual.run_until_parked();
4863 let draft = composer.read_with(&visual, |composer, _| composer.draft.clone());
4863 let draft = composer.read_with(&visual, |composer, _| composer.draft.clone());
4864 let dart = teams_core::LineKind::Code(Some("dart".into()));
4864 let dart = teams_core::LineKind::Code(Some("dart".into()));
4865 assert_eq!(draft.lines(), [teams_core::LineKind::Text, dart.clone(), dart]);
4865 assert_eq!(
4866 draft.lines(),
4867 [teams_core::LineKind::Text, dart.clone(), dart]
4868 );
4866 assert_eq!(
4869 assert_eq!(
4867 draft.to_html(),
4870 draft.to_html(),
4868 "x<pre class=\"language-dart skipProofing\" spellcheck=\"false\"><code>a<br>b</code></pre>"
4871 "x<pre class=\"language-dart skipProofing\" spellcheck=\"false\"><code>a<br>b</code></pre>"
@@ -5093,7 +5096,10 @@ mod tests {
5093 .cx
5096 .cx
5094 .write_to_clipboard(gpui_kit::ClipboardItem::new_string("**x**".to_owned()));
5097 .write_to_clipboard(gpui_kit::ClipboardItem::new_string("**x**".to_owned()));
5095 typist.press("ctrl-v");
5098 typist.press("ctrl-v");
5096 assert_eq!(typist.value(), ":) **x**");
5099 assert_eq!(
5100 typist.value(),
5101 format!("{}:) **x**", teams_core::CODE_HEADER_MARK)
5102 );
5097 let composer = typist.composer.clone();
5103 let composer = typist.composer.clone();
5098 assert!(
5104 assert!(
5099 typist
5105 typist