test(smoke): switch the failing test on in the saved configuration (#1631)

Reruns launch the configuration as it is saved now (#1579), so Rerun Failed Tests dropped the switch the smoke test applied only to the first run and the failing test was skipped. The switched-on configuration is now put into the configuration list before the run.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-06 05:55:56 +08:00
1 джерело 08f2d9756d
коміт 1b4ca3cf1f
1 file changed
+4 -1
+4 -1
Переглянути файл
@@ -200,7 +200,10 @@ async function smoke(language: string) {
}
// Tests, with the intentionally failing one switched on: one failure, located, the rest passed.
const { id, output } = await runToEnd(c.tests.failing(config(c.tests.config)));
// Switched on in the saved configuration, as reruns launch the configuration as it is saved now.
const failing = c.tests.failing(config(c.tests.config));
useRun.setState((s) => ({ configs: s.configs.map((x) => (x.id === failing.id ? failing : x)) }));
const { id, output } = await runToEnd(failing);
const tests = runtime(id)!.tests!;
const log = `\n--- output ---\n${output.slice(-80).join("\n")}`;
expect(tests.counts(), log).toMatchObject({ passed: c.tests.passed, failed: 1 });