Skip to content

Commit b397e96

Browse files
author
Shaw
committed
chore: commit lockfile and adapter updates
1 parent 6440797 commit b397e96

3 files changed

Lines changed: 97 additions & 0 deletions

File tree

bun.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/benchmarks/orchestrator/tests/test_adapter_discovery.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ def test_cross_matrix_validation_constructs_all_compatible_cells(
598598
monkeypatch.setattr(orchestrator_adapters, "_has_gaia_official_dataset", lambda: True)
599599
monkeypatch.setattr(orchestrator_adapters, "_has_hyperliquid_live_backend", lambda: True)
600600
monkeypatch.setattr(orchestrator_adapters, "_has_terminal_bench_docker_backend", lambda: True)
601+
monkeypatch.setattr(orchestrator_adapters, "_has_swe_bench_docker_backend", lambda: True)
601602
monkeypatch.setattr(orchestrator_adapters, "_has_hermes_sandbox_backend", lambda: True)
602603
monkeypatch.setattr(orchestrator_adapters, "_vision_language_compatible_harnesses", lambda: ("eliza", "hermes", "openclaw"))
603604
report = build_cross_matrix_report(
@@ -731,6 +732,11 @@ def test_direct_and_native_rows_keep_truthful_matrix_compatibility(
731732
"_has_hermes_sandbox_backend",
732733
lambda: True,
733734
)
735+
monkeypatch.setattr(
736+
orchestrator_adapters,
737+
"_has_swe_bench_docker_backend",
738+
lambda: True,
739+
)
734740
monkeypatch.setattr(
735741
orchestrator_adapters,
736742
"_has_gauntlet_real_surfpool_backend",
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import { expect, type Page, test } from "playwright/test";
2+
3+
async function installCheckoutMocks(page: Page) {
4+
const requests: Array<{ url: string; body: unknown }> = [];
5+
6+
await page.route("https://api.elizacloud.ai/**", async (route) => {
7+
const request = route.request();
8+
const url = new URL(request.url());
9+
let body: unknown = null;
10+
try {
11+
body = request.postDataJSON();
12+
} catch {
13+
body = null;
14+
}
15+
requests.push({ url: request.url(), body });
16+
17+
if (url.pathname === "/api/auth/steward-session") {
18+
return route.fulfill({
19+
json: { success: true, user: { id: "steward-user-1" } },
20+
});
21+
}
22+
23+
if (url.pathname === "/api/stripe/create-checkout-session") {
24+
return route.fulfill({
25+
json: {
26+
url: "http://127.0.0.1:4455/checkout/success?sku=elizaos-phone",
27+
},
28+
});
29+
}
30+
31+
return route.fulfill({
32+
json: { success: true },
33+
});
34+
});
35+
36+
return requests;
37+
}
38+
39+
test("checkout product picker, color swatches, email login, and Stripe handoff are wired", async ({
40+
page,
41+
}) => {
42+
const requests = await installCheckoutMocks(page);
43+
44+
await page.goto("/checkout?sku=elizaos-usb");
45+
await expect(page.getByRole("heading", { name: "ElizaOS USB" })).toBeVisible();
46+
47+
await page.getByRole("button", { name: /ElizaOS Phone/i }).click();
48+
await expect(page).toHaveURL(/\/checkout\?sku=elizaos-phone$/);
49+
await expect(page.getByRole("heading", { name: "ElizaOS Phone" })).toBeVisible();
50+
51+
await page.getByRole("button", { name: "Select Black" }).click();
52+
53+
await page.getByRole("button", { name: "Email link" }).click();
54+
await expect(page.getByText("Enter your email first.")).toBeVisible();
55+
56+
await page
57+
.getByPlaceholder("you@example.com")
58+
.fill("checkout-controls@example.com");
59+
await page.getByRole("button", { name: "Email link" }).click();
60+
await expect(page.getByText("Check your inbox.")).toBeVisible();
61+
62+
await page.goto(
63+
"/checkout?sku=elizaos-phone#token=steward-token-1&refreshToken=refresh-token-1",
64+
);
65+
await expect(page.getByRole("button", { name: "Pay deposit" })).toBeVisible();
66+
await page.getByRole("button", { name: "Pay deposit" }).click();
67+
await expect(page).toHaveURL(/\/checkout\/success\?sku=elizaos-phone$/);
68+
69+
const sessionRequest = requests.find(
70+
(request) => new URL(request.url).pathname === "/api/auth/steward-session",
71+
);
72+
expect(sessionRequest?.body).toMatchObject({
73+
token: "steward-token-1",
74+
refreshToken: "refresh-token-1",
75+
});
76+
77+
const checkoutRequest = requests.find(
78+
(request) =>
79+
new URL(request.url).pathname === "/api/stripe/create-checkout-session",
80+
);
81+
expect(checkoutRequest?.body).toMatchObject({
82+
hardwareSku: "elizaos-phone",
83+
hardwareColor: "Black",
84+
returnUrl: "billing",
85+
});
86+
});

0 commit comments

Comments
 (0)