Cover the real provider switch and share chat Settings and stop checks

- Host test switches AI Provider from chat Settings through the real
  provider commands and checks the new mount keeps chat's context, frame,
  Back to chat and focus on the provider choice.
- Drop the open and minimized branches of the carried presentation: the
  provider choice lives only in Settings, so chat is never open then.
- One showChatSettings helper for the gear and the restore, and one
  isStoppable helper for the live-or-error check in chat and the panel close.
This commit is contained in:
manjunath22466 committed 2026-11-05 00:17:08 +05:30
1 parent 46dde909cc
commit 3577d19513
9 files changed
+99 -58

No files matched your search

+2 -2
View File
@@ -857,13 +857,13 @@ for (const action of ['stop', 'destroy']) {
}
}
test('a provider switch hands chat Settings or chat to the new mount', async (t) => {
test('a provider switch hands chat Settings to the new mount', async (t) => {
const f = compositionFixture(t);
const first = f.facade.provider;
const next = first === 'openai' ? 'gemini' : 'openai';
// Without chat open there is nothing to carry.
assert.equal(f.mounts[0].controls.chatPresentation(), null);
const shown = { view: 'settings', frameWidth: 320, frameHeight: 480 };
const shown = { view: 'settings', frame: { width: 320, height: 480 } };
f.mounts[0].controls.chatPresentation = () => shown;
f.select(next);
await settle();