test(companion): cover platform connected lifecycle integration
This commit is contained in:
@@ -749,6 +749,17 @@
|
|||||||
],
|
],
|
||||||
"test_status": "pnpm test:run src/companion/platformClients.test.ts src/companion/runtimeClient.test.ts src/companion/heartbeatLoop.test.ts src/companion/platformClients.integration.test.ts + pnpm typecheck passing"
|
"test_status": "pnpm test:run src/companion/platformClients.test.ts src/companion/runtimeClient.test.ts src/companion/heartbeatLoop.test.ts src/companion/platformClients.integration.test.ts + pnpm typecheck passing"
|
||||||
},
|
},
|
||||||
|
"companion-platform-connected-integration-coverage": {
|
||||||
|
"status": "completed",
|
||||||
|
"date": "2026-02-17",
|
||||||
|
"updated": "2026-02-17",
|
||||||
|
"summary": "Added live gateway integration coverage to verify platform `connected` passthrough tracks runtime WebSocket connect/disconnect lifecycle.",
|
||||||
|
"files_modified": [
|
||||||
|
"src/companion/platformClients.integration.test.ts",
|
||||||
|
"docs/plans/state.json"
|
||||||
|
],
|
||||||
|
"test_status": "pnpm test:run src/companion/platformClients.integration.test.ts src/companion/platformClients.test.ts src/companion/runtimeClient.test.ts src/companion/heartbeatLoop.test.ts + pnpm typecheck passing"
|
||||||
|
},
|
||||||
"browser-tools-activation-clarity": {
|
"browser-tools-activation-clarity": {
|
||||||
"status": "completed",
|
"status": "completed",
|
||||||
"date": "2026-02-17",
|
"date": "2026-02-17",
|
||||||
|
|||||||
@@ -108,6 +108,21 @@ function createRuntime(): CompanionRuntimeClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
describe('platform clients integration', () => {
|
describe('platform clients integration', () => {
|
||||||
|
it('platform connected reflects runtime connection lifecycle', async () => {
|
||||||
|
if (!LISTEN_ALLOWED) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const runtime = createRuntime();
|
||||||
|
const client = new IOSCompanionClient({ runtime, nodeId: 'ios-connected-e2e' });
|
||||||
|
|
||||||
|
expect(client.connected).toBe(false);
|
||||||
|
await client.connect();
|
||||||
|
expect(client.connected).toBe(true);
|
||||||
|
client.disconnect();
|
||||||
|
expect(client.connected).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
it('macOS companion wrapper registers and writes status with platform pinning', async () => {
|
it('macOS companion wrapper registers and writes status with platform pinning', async () => {
|
||||||
if (!LISTEN_ALLOWED) {
|
if (!LISTEN_ALLOWED) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user