fix(ci): repair format + android tests
This commit is contained in:
@@ -30,7 +30,7 @@ class BridgeSessionTest {
|
|||||||
val session =
|
val session =
|
||||||
BridgeSession(
|
BridgeSession(
|
||||||
scope = scope,
|
scope = scope,
|
||||||
onConnected = { _, _ -> connected.complete(Unit) },
|
onConnected = { _, _, _ -> connected.complete(Unit) },
|
||||||
onDisconnected = { /* ignore */ },
|
onDisconnected = { /* ignore */ },
|
||||||
onEvent = { _, _ -> /* ignore */ },
|
onEvent = { _, _ -> /* ignore */ },
|
||||||
onInvoke = { BridgeSession.InvokeResult.ok(null) },
|
onInvoke = { BridgeSession.InvokeResult.ok(null) },
|
||||||
@@ -97,7 +97,7 @@ class BridgeSessionTest {
|
|||||||
val session =
|
val session =
|
||||||
BridgeSession(
|
BridgeSession(
|
||||||
scope = scope,
|
scope = scope,
|
||||||
onConnected = { _, _ -> connected.complete(Unit) },
|
onConnected = { _, _, _ -> connected.complete(Unit) },
|
||||||
onDisconnected = { /* ignore */ },
|
onDisconnected = { /* ignore */ },
|
||||||
onEvent = { _, _ -> /* ignore */ },
|
onEvent = { _, _ -> /* ignore */ },
|
||||||
onInvoke = { BridgeSession.InvokeResult.ok(null) },
|
onInvoke = { BridgeSession.InvokeResult.ok(null) },
|
||||||
@@ -167,7 +167,7 @@ class BridgeSessionTest {
|
|||||||
val session =
|
val session =
|
||||||
BridgeSession(
|
BridgeSession(
|
||||||
scope = scope,
|
scope = scope,
|
||||||
onConnected = { _, _ -> connected.complete(Unit) },
|
onConnected = { _, _, _ -> connected.complete(Unit) },
|
||||||
onDisconnected = { /* ignore */ },
|
onDisconnected = { /* ignore */ },
|
||||||
onEvent = { _, _ -> /* ignore */ },
|
onEvent = { _, _ -> /* ignore */ },
|
||||||
onInvoke = { throw IllegalStateException("FOO_BAR: boom") },
|
onInvoke = { throw IllegalStateException("FOO_BAR: boom") },
|
||||||
@@ -239,7 +239,7 @@ class BridgeSessionTest {
|
|||||||
val session =
|
val session =
|
||||||
BridgeSession(
|
BridgeSession(
|
||||||
scope = scope,
|
scope = scope,
|
||||||
onConnected = { _, _ -> connected.countDown() },
|
onConnected = { _, _, _ -> connected.countDown() },
|
||||||
onDisconnected = { /* ignore */ },
|
onDisconnected = { /* ignore */ },
|
||||||
onEvent = { _, _ -> /* ignore */ },
|
onEvent = { _, _ -> /* ignore */ },
|
||||||
onInvoke = { BridgeSession.InvokeResult.ok(null) },
|
onInvoke = { BridgeSession.InvokeResult.ok(null) },
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class SessionFiltersTest {
|
|||||||
ChatSessionEntry(key = "recent-2", updatedAtMs = recent2),
|
ChatSessionEntry(key = "recent-2", updatedAtMs = recent2),
|
||||||
)
|
)
|
||||||
|
|
||||||
val result = resolveSessionChoices("main", sessions, nowMs = now).map { it.key }
|
val result = resolveSessionChoices("main", sessions, mainSessionKey = "main", nowMs = now).map { it.key }
|
||||||
assertEquals(listOf("main", "recent-1", "recent-2"), result)
|
assertEquals(listOf("main", "recent-1", "recent-2"), result)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ class SessionFiltersTest {
|
|||||||
val recent = now - 10 * 60 * 1000L
|
val recent = now - 10 * 60 * 1000L
|
||||||
val sessions = listOf(ChatSessionEntry(key = "main", updatedAtMs = recent))
|
val sessions = listOf(ChatSessionEntry(key = "main", updatedAtMs = recent))
|
||||||
|
|
||||||
val result = resolveSessionChoices("custom", sessions, nowMs = now).map { it.key }
|
val result = resolveSessionChoices("custom", sessions, mainSessionKey = "main", nowMs = now).map { it.key }
|
||||||
assertEquals(listOf("main", "custom"), result)
|
assertEquals(listOf("main", "custom"), result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,4 +97,3 @@ describe("browser server-context ensureTabAvailable", () => {
|
|||||||
expect(second.targetId).toBe("A");
|
expect(second.targetId).toBe("A");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ function createProfileContext(
|
|||||||
if (lastResolved && lastResolved !== "AMBIGUOUS") return lastResolved;
|
if (lastResolved && lastResolved !== "AMBIGUOUS") return lastResolved;
|
||||||
// Prefer a real page tab first (avoid service workers/background targets).
|
// Prefer a real page tab first (avoid service workers/background targets).
|
||||||
const page = candidates.find((t) => (t.type ?? "page") === "page");
|
const page = candidates.find((t) => (t.type ?? "page") === "page");
|
||||||
return page ?? (candidates.at(0) ?? null);
|
return page ?? candidates.at(0) ?? null;
|
||||||
};
|
};
|
||||||
|
|
||||||
const chosen = targetId ? resolveById(targetId) : pickDefault();
|
const chosen = targetId ? resolveById(targetId) : pickDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user