Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(e2e): remove skipped port-conflict dialog specs

Steven Enamakel778cacdb8828
diff --git a/app/test/e2e/specs/core-port-conflict-recovery.spec.ts b/app/test/e2e/specs/core-port-conflict-recovery.spec.ts
index 9cb593cae1..db4f68ed30 100644
--- a/app/test/e2e/specs/core-port-conflict-recovery.spec.ts
+++ b/app/test/e2e/specs/core-port-conflict-recovery.spec.ts
@@ -23,14 +23,11 @@
* screen or onboarding) even under a port conflict, which proves the fallback
* path engaged.
*
- * TODO (tracked gap):
- * A visible port-conflict banner / dialog for the end-user has not been
- * implemented (feature gap). When it ships, remove the `.skip` from
- * '4.2.2 — second instance surfaces clear conflict dialog' below and add
- * an assertion for the specific UI text.
+ * A separate dialog assertion is omitted because a second app instance uses
+ * the embedded core's fallback port and the shipped UI does not display a
+ * conflict banner. The startup-integrity assertion below covers the behavior
+ * this E2E harness can observe.
*/
-import net from 'node:net';
-
import { waitForApp } from '../helpers/app-helpers';
import { textExists, waitForText } from '../helpers/element-helpers';
import { startMockServer, stopMockServer } from '../mock-server';
@@ -58,24 +55,6 @@ async function waitForHome(timeout = 25_000): Promise<boolean> {
return false;
}
-/**
- * Create a TCP listener on the given port to simulate an unrelated process
- * occupying that port. Returns a cleanup function that closes the server.
- *
- * Note: this helper runs in the Node test process, not inside the Tauri
- * WebView, so `net` from Node stdlib is available.
- */
-async function bindPort(port: number): Promise<() => Promise<void>> {
- return new Promise((resolve, reject) => {
- const server = net.createServer();
- server.listen(port, '127.0.0.1', () => {
- stepLog(`pre-bound port ${port} to simulate conflict`);
- resolve(() => new Promise<void>((res, rej) => server.close(err => (err ? rej(err) : res()))));
- });
- server.on('error', reject);
- });
-}
-
describe('Core port conflict recovery', () => {
before(async () => {
stepLog('starting mock server');
@@ -110,37 +89,4 @@ describe('Core port conflict recovery', () => {
expect(onHome).toBe(true);
});
- // TODO: Remove .skip when a user-visible port-conflict dialog is implemented.
- // The embedded core currently falls back to a higher port silently (no UI
- // dialog). Once a conflict dialog is added, assert its text here.
- it.skip('4.2.2 — second instance surfaces clear conflict dialog', async () => {
- // Placeholder: bind port 7788 from Node, then trigger a core restart via
- // the Tauri `restart_core_process` command, and assert the UI shows a
- // "port conflict" or "core unavailable" dialog.
- //
- // Gap: the dialog does not yet exist. Filed as a product gap in
- // crates/openhuman-app/src/core_process.rs — the `ListenerKind::Unknown` branch
- // logs the conflict but does not emit a Tauri event that the frontend
- // renders.
- let release: (() => Promise<void>) | undefined;
- try {
- release = await bindPort(DEFAULT_CORE_PORT);
- await browser.execute(() => {
- // Trigger a core restart to exercise the port-conflict path.
- // @ts-ignore — invoke is set by the Tauri runtime
- if (typeof window.__TAURI_INTERNALS__?.invoke === 'function') {
- window.__TAURI_INTERNALS__.invoke('restart_core_process');
- }
- });
- await browser.pause(5_000);
- const hasConflictUI = await waitForText('port conflict', 10_000)
- .then(() => true)
- .catch(() => false);
- // Assert the gap explicitly so CI flags this as a known TODO, not a
- // silent pass.
- expect(hasConflictUI).toBe(true);
- } finally {
- await release?.();
- }
- });
});
diff --git a/app/test/playwright/specs/core-port-conflict-recovery.spec.ts b/app/test/playwright/specs/core-port-conflict-recovery.spec.ts
index 87bd7dfb61..fffbbc7a07 100644
--- a/app/test/playwright/specs/core-port-conflict-recovery.spec.ts
+++ b/app/test/playwright/specs/core-port-conflict-recovery.spec.ts
@@ -15,5 +15,4 @@ test.describe('Core port conflict recovery', () => {
).toBeVisible();
});
- test.skip('second instance surfaces clear conflict dialog once a visible banner exists', async () => {});
});