Add some tests for image attachments (#9080)

Some extra tests for https://github.com/openai/codex/pull/8950
This commit is contained in:
charley-oai
2026-01-12 13:41:50 -08:00
committed by GitHub
parent 5dfa780f3d
commit d7cdcfc302
5 changed files with 280 additions and 0 deletions
@@ -2780,6 +2780,18 @@ mod tests {
}
}
#[test]
fn image_placeholder_snapshots() {
snapshot_composer_state("image_placeholder_single", false, |composer| {
composer.attach_image(PathBuf::from("/tmp/image1.png"));
});
snapshot_composer_state("image_placeholder_multiple", false, |composer| {
composer.attach_image(PathBuf::from("/tmp/image1.png"));
composer.attach_image(PathBuf::from("/tmp/image2.png"));
});
}
#[test]
fn slash_popup_model_first_for_mo_ui() {
use ratatui::Terminal;
@@ -0,0 +1,14 @@
---
source: tui/src/bottom_pane/chat_composer.rs
assertion_line: 2116
expression: terminal.backend()
---
" "
" [Image #1][Image #2] "
" "
" "
" "
" "
" "
" "
" 100% context left "
@@ -0,0 +1,14 @@
---
source: tui/src/bottom_pane/chat_composer.rs
assertion_line: 2116
expression: terminal.backend()
---
" "
" [Image #1] "
" "
" "
" "
" "
" "
" "
" 100% context left "