update
This commit is contained in:
1 parent
7a3db27ffa
commit
1ba3147ed2
96 files changed
+9400
-6269
No files matched your search
@@ -27,25 +27,31 @@ test("first launch onboarding creates a company and opens the desktop shell", as
|
||||
try {
|
||||
const page = await app.firstWindow();
|
||||
await expect(page.getByText("AgentCompany Desktop")).toBeVisible();
|
||||
await page.getByRole("button", { name: /Custom Setup/i }).click();
|
||||
await page.getByLabel("Company name").fill("Orbit Foundry");
|
||||
await page.getByLabel("Workspace folder").fill(workspaceDir);
|
||||
await page.getByRole("button", { name: /^Continue$/i }).click();
|
||||
const continueButton = page.getByRole("button", { name: /^Continue$/i });
|
||||
await expect(continueButton).toBeEnabled();
|
||||
await continueButton.click();
|
||||
await page.getByLabel("Goal").fill("Launch the company");
|
||||
await page.getByRole("button", { name: /Launch your company/i }).click();
|
||||
await page.getByRole("button", { name: /Launch Company/i }).click();
|
||||
await expect(page.getByRole("heading", { name: /Orbit Foundry is live/i })).toBeVisible();
|
||||
await expect(page.getByText("Initial run")).toBeVisible();
|
||||
await page.getByRole("button", { name: /Open control center/i }).click();
|
||||
|
||||
await expect(page.getByRole("heading", { name: "Dashboard" })).toBeVisible();
|
||||
await expect(page.getByRole("heading", { name: "Runs" })).toBeVisible();
|
||||
// Company name is rendered in a custom dropdown trigger button in the sidebar.
|
||||
await expect(page.locator("aside button", { hasText: "Orbit Foundry" }).first()).toBeVisible();
|
||||
const showConsoleButton = page.getByRole("button", { name: /show console/i });
|
||||
await expect(showConsoleButton).toBeVisible();
|
||||
const hideConsoleButton = page.getByRole("button", { name: /hide console/i });
|
||||
if (await hideConsoleButton.isVisible().catch(() => false)) {
|
||||
await expect(page.getByText("Console", { exact: true })).toBeVisible();
|
||||
await hideConsoleButton.click();
|
||||
await expect(page.getByText("Console", { exact: true })).toBeHidden();
|
||||
} else {
|
||||
await expect(showConsoleButton).toBeVisible();
|
||||
}
|
||||
await showConsoleButton.click();
|
||||
await expect(page.getByText("Console", { exact: true })).toBeVisible();
|
||||
const hideConsoleButton = page.getByRole("button", { name: /hide console/i });
|
||||
await expect(hideConsoleButton).toBeVisible();
|
||||
await hideConsoleButton.click();
|
||||
await expect(page.getByText("Console", { exact: true })).toBeHidden();
|
||||
await expect(showConsoleButton).toBeVisible();
|
||||
} finally {
|
||||
await app.close();
|
||||
await rm(profileDir, { recursive: true, force: true });
|
||||
|
||||
@@ -2,12 +2,13 @@ import { execFileSync } from "node:child_process";
|
||||
|
||||
/**
|
||||
* Playwright globalSetup: build the Electron app from source before E2E tests.
|
||||
* Uses execFileSync (no shell) for safety and deterministic builds.
|
||||
* Uses execFileSync and enables shell mode on Windows so the pnpm shim resolves correctly.
|
||||
*/
|
||||
export default function globalSetup() {
|
||||
execFileSync("pnpm", ["electron-vite", "build"], {
|
||||
stdio: "inherit",
|
||||
cwd: process.cwd(),
|
||||
timeout: 120_000,
|
||||
shell: process.platform === "win32",
|
||||
});
|
||||
}
|
||||
+4
-1
@@ -1,7 +1,10 @@
|
||||
import { createRequire } from "node:module";
|
||||
import { resolve } from "node:path";
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
export function getElectronExecutablePath() {
|
||||
return resolve(process.cwd(), process.platform === "win32" ? "node_modules/.bin/electron.cmd" : "node_modules/.bin/electron");
|
||||
return require("electron");
|
||||
}
|
||||
|
||||
export function getMainEntryPath() {
|
||||
|
||||
@@ -1189,7 +1189,8 @@ describe("Agent Messages", () => {
|
||||
|
||||
db.markMessageRead(msgId, companyId);
|
||||
const messages = db.listAgentMessages(companyId);
|
||||
expect(messages[0].readAt).toBeTruthy();
|
||||
const updatedMessage = messages.find((message) => message.id === msgId);
|
||||
expect(updatedMessage?.readAt).toBeTruthy();
|
||||
});
|
||||
|
||||
it("tracks read state per agent without marking the sender unread", () => {
|
||||
|
||||
@@ -18,7 +18,7 @@ describe("parseEnvBindingText", () => {
|
||||
});
|
||||
|
||||
describe("buildDefaultConnectorRows", () => {
|
||||
it("keeps security-sensitive commands pinned to connector defaults", () => {
|
||||
it("preserves previously saved connector commands", () => {
|
||||
const [codex] = buildDefaultConnectorRows([
|
||||
{
|
||||
id: "codex_local",
|
||||
@@ -29,7 +29,7 @@ describe("buildDefaultConnectorRows", () => {
|
||||
]);
|
||||
|
||||
expect(codex.id).toBe("codex_local");
|
||||
expect(codex.command).toBe("codex");
|
||||
expect(codex.command).toBe("/usr/local/bin/codex");
|
||||
expect(codex.status).toBe("ready");
|
||||
expect(codex.notes).toBe("custom note");
|
||||
expect(codex.capabilityMatrix.structuredTranscript).toBe(true);
|
||||
|
||||
Reference in new issue
Block a user