This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import Database from 'better-sqlite3';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { resolve, dirname } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
@@ -8,9 +7,11 @@ import { fileURLToPath } from 'node:url';
|
||||
// agent must call RequestTool). In this LLM-less E2E we seed the engine state
|
||||
// directly into the throwaway DB: a job parked with wait_reason='tool_request'
|
||||
// + a pending tool_request, then drive the inline approval card in the chat.
|
||||
// The DB path is handed off by playwright.config.ts via ui/.e2e-db-path.
|
||||
// The run-scoped DB path is inherited from playwright.config.ts via E2E_TMP.
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const dbPath = readFileSync(resolve(__dirname, '..', '.e2e-db-path'), 'utf-8').trim();
|
||||
const e2eTmp = process.env.E2E_TMP;
|
||||
if (!e2eTmp) throw new Error('E2E_TMP must be set by playwright.config.ts');
|
||||
const dbPath = resolve(e2eTmp, 'e2e.db');
|
||||
|
||||
test('inline tool-approval: the card renders and Approve grants + resolves the request', async ({ page, request }) => {
|
||||
// 1. Create a task (spawns a job).
|
||||
|
||||
Reference in New Issue
Block a user