Files
clh02467605 9602209113 feat(e2e): integrate e2e package and update test configurations
- Added e2e package as a workspace dependency in pnpm-lock.yaml.
- Updated globalSetup path in vite.config.ts to point to the new e2e package location.
- Enhanced documentation for CLI E2E testing, including architecture layers and triggering conditions.
- Refactored test paths and commands in the documentation to align with the new structure.
- Removed outdated dataset and auth E2E tests to streamline the test suite.
- Updated command references and validation checks in the documentation to reflect recent changes.
2026-07-10 11:46:05 +08:00

53 lines
1.3 KiB
TypeScript

import { dirname, join } from "path";
import { fileURLToPath } from "url";
import {
cliTimeoutPrefix,
cliTimeoutSeconds,
e2eLabelFromMetaUrl,
isConsoleAuthFailure,
makeE2eOutputDir,
parseStdoutJson,
} from "e2e/output";
import { runNodeMain, type RunCliResult } from "e2e/runner";
import {
isBailianE2EEnabled,
isBailianE2EMediaEnabled,
isBailianE2EVideoEnabled,
isChatE2EReady,
isConsoleE2EReady,
isDashScopeE2EReady,
isSearchE2EReady,
} from "e2e/gating";
import { monorepoRoot } from "e2e/monorepo-root";
export {
cliTimeoutPrefix,
cliTimeoutSeconds,
e2eLabelFromMetaUrl,
isBailianE2EEnabled,
isBailianE2EMediaEnabled,
isBailianE2EVideoEnabled,
isChatE2EReady,
isConsoleAuthFailure,
isConsoleE2EReady,
isDashScopeE2EReady,
isSearchE2EReady,
makeE2eOutputDir,
monorepoRoot,
parseStdoutJson,
};
export type { RunCliResult };
/** `packages/cli` 根目录 */
export const cliPackageRoot = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
const mainTs = join(cliPackageRoot, "src", "main.ts");
/** 子进程执行 bl CLI */
export async function runCli(
args: string[],
envOverrides: NodeJS.ProcessEnv = {},
): Promise<RunCliResult> {
return runNodeMain(mainTs, args, { cwd: cliPackageRoot, env: envOverrides });
}