mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 09:19:42 +02:00
ci: nightly browser suite; fix stale session-id extraction in browser tests
WIP: the suite still has failures on a clean master that are not fixed here. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
ac94f339ac
commit
ab7e89873f
@@ -123,7 +123,8 @@ describe('OpenCode session initial resize', () => {
|
||||
body: JSON.stringify({ workingDir: '/tmp', name: 'oc-resize-test' }),
|
||||
});
|
||||
const data = await res.json();
|
||||
return data.id ?? data.session?.id;
|
||||
// POST /api/sessions answers in the { success, data: { session } } envelope.
|
||||
return data.data?.session?.id ?? data.id ?? data.session?.id;
|
||||
});
|
||||
|
||||
expect(sessionId).toBeTruthy();
|
||||
@@ -168,7 +169,8 @@ describe('OpenCode session initial resize', () => {
|
||||
body: JSON.stringify({ workingDir: '/tmp', name: 'oc-earlyret-test' }),
|
||||
});
|
||||
const data = await res.json();
|
||||
return data.id ?? data.session?.id;
|
||||
// POST /api/sessions answers in the { success, data: { session } } envelope.
|
||||
return data.data?.session?.id ?? data.id ?? data.session?.id;
|
||||
});
|
||||
|
||||
expect(sessionId).toBeTruthy();
|
||||
@@ -219,7 +221,8 @@ describe('OpenCode session initial resize', () => {
|
||||
body: JSON.stringify({ workingDir: '/tmp', name: 'oc-refresh-test' }),
|
||||
});
|
||||
const data = await res.json();
|
||||
return data.id ?? data.session?.id;
|
||||
// POST /api/sessions answers in the { success, data: { session } } envelope.
|
||||
return data.data?.session?.id ?? data.id ?? data.session?.id;
|
||||
});
|
||||
|
||||
expect(sessionId).toBeTruthy();
|
||||
@@ -287,7 +290,8 @@ describe('OpenCode close modal text', () => {
|
||||
body: JSON.stringify({ workingDir: '/tmp', name: 'oc-close-test', mode: 'opencode' }),
|
||||
});
|
||||
const data = await res.json();
|
||||
return data.id ?? data.session?.id;
|
||||
// POST /api/sessions answers in the { success, data: { session } } envelope.
|
||||
return data.data?.session?.id ?? data.id ?? data.session?.id;
|
||||
});
|
||||
|
||||
expect(sessionId).toBeTruthy();
|
||||
@@ -329,7 +333,8 @@ describe('OpenCode close modal text', () => {
|
||||
body: JSON.stringify({ workingDir: '/tmp', name: 'cc-close-test' }),
|
||||
});
|
||||
const data = await res.json();
|
||||
return data.id ?? data.session?.id;
|
||||
// POST /api/sessions answers in the { success, data: { session } } envelope.
|
||||
return data.data?.session?.id ?? data.id ?? data.session?.id;
|
||||
});
|
||||
|
||||
expect(sessionId).toBeTruthy();
|
||||
|
||||
@@ -69,7 +69,8 @@ async function createSession(page: Page, name: string): Promise<string> {
|
||||
body: JSON.stringify({ workingDir: '/tmp', name: n }),
|
||||
});
|
||||
const data = await res.json();
|
||||
return data.id ?? data.session?.id;
|
||||
// POST /api/sessions answers in the { success, data: { session } } envelope.
|
||||
return data.data?.session?.id ?? data.id ?? data.session?.id;
|
||||
}, name);
|
||||
return result as string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user