mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Add some tests for image attachments (#9080)
Some extra tests for https://github.com/openai/codex/pull/8950
This commit is contained in:
@@ -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;
|
||||
|
||||
+14
@@ -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 "
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
---
|
||||
source: tui/src/bottom_pane/chat_composer.rs
|
||||
assertion_line: 2116
|
||||
expression: terminal.backend()
|
||||
---
|
||||
" "
|
||||
"› [Image #1] "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" 100% context left "
|
||||
Reference in New Issue
Block a user