app: fix e2e helper server path

This commit is contained in:
Mohamed Boudra
2026-04-10 18:46:39 +00:00
parent de51bba0b2
commit e73747f87d
3 changed files with 6 additions and 18 deletions

View File

@@ -1,6 +1,4 @@
import { expect, type Page } from "@playwright/test";
import path from "node:path";
import { pathToFileURL } from "node:url";
import { randomUUID } from "node:crypto";
import { buildHostWorkspaceRoute } from "../../src/utils/host-routes";
@@ -90,10 +88,8 @@ async function loadDaemonClientConstructor(): Promise<
clientType: "cli";
}) => DaemonClientInstance
> {
const repoRoot = path.resolve(process.cwd(), "../..");
const moduleUrl = pathToFileURL(
path.join(repoRoot, "packages/server/dist/server/server/exports.js"),
).href;
const moduleUrl = new URL("../../../server/dist/server/server/exports.js", import.meta.url)
.href;
const mod = (await import(moduleUrl)) as {
DaemonClient: new (config: {
url: string;

View File

@@ -1,6 +1,4 @@
import { randomUUID } from "node:crypto";
import path from "node:path";
import { pathToFileURL } from "node:url";
import { expect, type Page } from "@playwright/test";
import { buildCreateAgentPreferences, buildSeededHost } from "./daemon-registry";
import { waitForWorkspaceTabsVisible } from "./workspace-tabs";
@@ -70,10 +68,8 @@ async function loadDaemonClientConstructor(): Promise<
clientType: "cli";
}) => ArchiveTabDaemonClient
> {
const repoRoot = path.resolve(process.cwd(), "../..");
const moduleUrl = pathToFileURL(
path.join(repoRoot, "packages/server/dist/server/server/exports.js"),
).href;
const moduleUrl = new URL("../../../server/dist/server/server/exports.js", import.meta.url)
.href;
const mod = (await import(moduleUrl)) as {
DaemonClient: new (config: {
url: string;

View File

@@ -1,6 +1,4 @@
import type { Page } from "@playwright/test";
import path from "node:path";
import { pathToFileURL } from "node:url";
import { randomUUID } from "node:crypto";
import { buildHostWorkspaceRoute } from "../../src/utils/host-routes";
@@ -46,10 +44,8 @@ function getServerId(): string {
async function loadDaemonClientConstructor(): Promise<
new (config: { url: string; clientId: string; clientType: "cli" }) => TerminalPerfDaemonClient
> {
const repoRoot = path.resolve(process.cwd(), "../..");
const moduleUrl = pathToFileURL(
path.join(repoRoot, "packages/server/dist/server/server/exports.js"),
).href;
const moduleUrl = new URL("../../../server/dist/server/server/exports.js", import.meta.url)
.href;
const mod = (await import(moduleUrl)) as {
DaemonClient: new (config: {
url: string;