mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-30 21:23:04 +00:00
test(server): await provider discovery before readiness assertion (#6994)
Repeated snapshot reads supersede pending launch resolution and keep readiness loading. Await the refresh RPC before asserting the discovered state.
This commit is contained in:
@@ -124,15 +124,12 @@ test("Antigravity creates an agent and answers a prompt with real agy", async ({
|
||||
try {
|
||||
await client.connect();
|
||||
await client.fetchAgents({ subscribe: {} });
|
||||
await expect
|
||||
.poll(
|
||||
async () => {
|
||||
const snapshot = await client.getProvidersSnapshot({ cwd });
|
||||
return snapshot.entries.find((entry) => entry.provider === "antigravity")?.status;
|
||||
},
|
||||
{ timeout: 30000 },
|
||||
)
|
||||
.toBe("ready");
|
||||
// Snapshot reads start discovery again; await one refresh before checking readiness.
|
||||
await client.refreshProvidersSnapshot({ cwd, providers: ["antigravity"] });
|
||||
const snapshot = await client.getProvidersSnapshot({ cwd });
|
||||
expect(snapshot.entries.find((entry) => entry.provider === "antigravity")?.status).toBe(
|
||||
"ready",
|
||||
);
|
||||
const agent = await client.createAgent({
|
||||
provider: "antigravity",
|
||||
cwd,
|
||||
|
||||
Reference in New Issue
Block a user