feat: start resume sessions in new flow

This commit is contained in:
Codex
2026-08-06 10:49:25 +08:00
parent 671a9b9419
commit 1c762fd092
18 changed files with 189 additions and 556 deletions
+2 -10
View File
@@ -146,7 +146,7 @@ def test_session_creation_authenticates_and_defaults_account_phone(tmp_path: Pat
assert TOKEN not in json.dumps(profile, ensure_ascii=False)
auth_headers = {"Authorization": f"Bearer {TOKEN}"}
source = event(
phone_selector = event(
client,
session_id,
created,
@@ -154,14 +154,6 @@ def test_session_creation_authenticates_and_defaults_account_phone(tmp_path: Pat
{"accepted": True},
headers=auth_headers,
).json()
phone_selector = event(
client,
session_id,
source,
"select",
{"value": "manual"},
headers=auth_headers,
).json()
data = active_component(phone_selector)["data"]
assert data["has_account_phone"] is True
assert data["masked_phone"] == "134****2384"
@@ -182,7 +174,7 @@ def test_session_creation_authenticates_and_defaults_account_phone(tmp_path: Pat
assert updated["profile"]["phone"] == "13421012384"
assert updated["profile"]["phone_source"] == "account"
assert provider.tokens == [TOKEN, TOKEN, TOKEN, TOKEN]
assert provider.tokens == [TOKEN, TOKEN, TOKEN]
def test_invalid_external_token_does_not_create_session(tmp_path: Path) -> None: