Files
openobserve/tests/ui-testing/playwright-tests/assistant/stack/run.mjs
T
Harsh Mahajan 4fc65470e5 feat(ai-assistant): assistant revamp
Web:
- Shell, turn engine and conversation view rebuilt around a single assistant store
- Evidence, approvals, chat history, sharing, doors (Explain/Troubleshoot/Add to chat), settings and credits
- Approval card survives a reload; Escape yields to open menus

Backend:
- Typed AI error envelope, resumable turns and capabilities endpoint
- Org admin controls, chat history records, credits and approval policy
- Query-context evidence and explicit chat mode
- AI migrations registered after main's, as schema versions 129-133

Claude-Session: https://claude.ai/code/session_017PUuNehbpAvsekHyhEBmFt
2026-10-30 13:54:19 +05:30

24 lines
1.3 KiB
JavaScript

// Copyright 2026 OpenObserve Inc.
// Runs the assistant flows declared for ASSISTANT_E2E_MODE, narrowed by ASSISTANT_E2E_GREP; extra arguments go to `playwright test`.
import { spawnSync } from "node:child_process";
import { dirname, join, relative } from "node:path";
import { fileURLToPath } from "node:url";
import { MODE, grepFor, isStack } from "../harness/modes.mjs";
const here = dirname(fileURLToPath(import.meta.url));
const uiTesting = join(here, "..", "..", "..");
const folder = relative(uiTesting, join(here, ".."));
const narrow = process.env.ASSISTANT_E2E_GREP;
// Playwright keeps one --grep, so the title filter joins the mode tag as a second lookahead.
const source = narrow ? `^(?=.*${grepFor(MODE)})(?=.*(?:${narrow}))` : grepFor(MODE);
// The /…/ form keeps the match case-sensitive; Playwright's default "gi" lets "STACK-" match every @stack- tag.
const grep = `/${source}/`;
// A stack flow that passes only on retry is a flake, not green, so stack runs never retry.
const retries = isStack() ? ["--retries=0"] : [];
const args = ["playwright", "test", folder, "--grep", grep, "--workers=1", ...retries, ...process.argv.slice(2)];
console.log(`assistant e2e: ${MODE} → npx ${args.join(" ")}`);
const run = spawnSync("npx", args, { cwd: uiTesting, stdio: "inherit", env: { ...process.env, ASSISTANT_E2E_MODE: MODE } });
process.exit(run.status ?? 1);