fix(ci): format the API 1.18 run output test and fit the commit chooser's macOS Close button (#6319)

The Plugins job's rustfmt check failed on `sdk/rust/openidea-plugin/tests/api18_run_output_mode.rs`. Since dialogs on macOS show as sheets (#6208), a dialog without footer buttons gets a Close button and a taller title, so the Git Log commit chooser is taller than `e2e/gitLogCommitChooser.spec.ts` allowed.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-27 10:35:14 +08:00
1 джерело fe76dc4573
коміт 9ed0fd9fa7
2 files changed
+25 -15

No files matched your search

+2 -1
Переглянути файл
@@ -65,7 +65,8 @@ test("Git Log commit choices fit their rows and navigate by keyboard after filte
await expect(filter).toBeFocused();
await expect(options).toHaveCount(2);
const before = (await chooser.boundingBox())!;
expect(before.height).toBeLessThan(200);
// Two rows under the title, and the Close button a macOS sheet without buttons gets.
expect(before.height).toBeLessThan(260);
const first = options.filter({ hasText: firstSubject });
const subject = first.getByText(firstSubject, { exact: true });
const author = first.getByText("Priya Kapoor", { exact: true });
+23 -14
Переглянути файл
@@ -69,10 +69,7 @@ fn output_mode_precedence_and_disallowed_combinations() {
.unwrap();
assert_eq!(
mock.configuration_run_options()
.into_iter()
.map(|(id, _, _, _, mode)| (id, mode))
.collect::<Vec<_>>(),
mock.configuration_run_options().into_iter().map(|(id, _, _, _, mode)| (id, mode)).collect::<Vec<_>>(),
vec![
(id1, OutputMode::Pty),
(id2, OutputMode::Pipes),
@@ -85,34 +82,46 @@ fn output_mode_precedence_and_disallowed_combinations() {
// Debug with None forces pipes; explicit Pty with debug is rejected.
mock.set_user_run_output_override("pty-default", None);
let debug_id = host::start_run_with_options(
"pty-default",
&[],
&RunStartOptions { debug: true, output_mode: None },
)
.unwrap();
let debug_id =
host::start_run_with_options("pty-default", &[], &RunStartOptions { debug: true, output_mode: None }).unwrap();
assert_eq!(mock.configuration_run_options().last().unwrap().0, debug_id);
assert_eq!(mock.configuration_run_options().last().unwrap().4, OutputMode::Pipes);
assert!(matches!(
host::start_run_with_options("pty-default", &[], &RunStartOptions { debug: true, output_mode: Some(OutputMode::Pty) }),
host::start_run_with_options(
"pty-default",
&[],
&RunStartOptions { debug: true, output_mode: Some(OutputMode::Pty) }
),
Err(Error::Invalid(_))
));
// Disallowed combinations: test, stdin redirection, remote target.
assert!(matches!(
host::start_run_with_options("test-pipes", &[], &RunStartOptions { debug: false, output_mode: Some(OutputMode::Pty) }),
host::start_run_with_options(
"test-pipes",
&[],
&RunStartOptions { debug: false, output_mode: Some(OutputMode::Pty) }
),
Err(Error::Invalid(_))
));
mock.set_run_configuration_stdin_file("pipes-default", true);
mock.set_user_run_output_override("pipes-default", None);
assert!(matches!(
host::start_run_with_options("pipes-default", &[], &RunStartOptions { debug: false, output_mode: Some(OutputMode::Pty) }),
host::start_run_with_options(
"pipes-default",
&[],
&RunStartOptions { debug: false, output_mode: Some(OutputMode::Pty) }
),
Err(Error::Invalid(_))
));
mock.set_run_configuration_stdin_file("pipes-default", false);
mock.set_run_configuration_remote_target("pipes-default", true);
assert!(matches!(
host::start_run_with_options("pipes-default", &[], &RunStartOptions { debug: false, output_mode: Some(OutputMode::Pty) }),
host::start_run_with_options(
"pipes-default",
&[],
&RunStartOptions { debug: false, output_mode: Some(OutputMode::Pty) }
),
Err(Error::Invalid(_))
));
}