mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-20 18:57:17 +03:00
test: isolate submenu timing, server config and terminal colors (#63803)
This commit is contained in:
@@ -1874,6 +1874,9 @@ test("the Windows titlebar menu swaps one submenu for the next as the pointer mo
|
||||
const parents = ["File", "Edit", "View"].map((name) => page.getByRole("menuitem", { name, exact: true }))
|
||||
const submenus = page.locator('[role="menu"].desktop-app-menu-sub')
|
||||
|
||||
// Keep the hover delay from elapsing while Playwright moves the pointer and checks the old submenu.
|
||||
await holdClock(page)
|
||||
|
||||
for (const [index, parent] of parents.entries()) {
|
||||
const box = (await parent.boundingBox())!
|
||||
// Down and to the left, away from the open submenu, so the pointer isn't heading for it.
|
||||
|
||||
@@ -2,6 +2,7 @@ import { expect } from "bun:test"
|
||||
import { Generate } from "@opencode/core/generate"
|
||||
import { makeLocationNode } from "@opencode/util/effect/app-node"
|
||||
import { Effect, Layer } from "effect"
|
||||
import { tmpdirScoped } from "../../core/test/fixture/tmpdir"
|
||||
import { it } from "../../core/test/lib/effect"
|
||||
import { ServerFetch } from "../src/fetch"
|
||||
|
||||
@@ -21,8 +22,10 @@ const generate = makeLocationNode({
|
||||
|
||||
it.live("reports response encoding failures as server errors and request decoding failures as bad requests", () =>
|
||||
Effect.gen(function* () {
|
||||
const config = yield* tmpdirScoped()
|
||||
const handler = yield* ServerFetch.make(
|
||||
{
|
||||
config: { directory: config.path, project: false },
|
||||
database: { path: ":memory:" },
|
||||
fs: { filewatcher: false },
|
||||
models: { fetch: false },
|
||||
|
||||
@@ -55,6 +55,7 @@ it.live("serves turn diffs by user message with range validation", () =>
|
||||
const handler = yield* ServerFetch.make(
|
||||
{
|
||||
app: { version: "test-version" },
|
||||
config: { directory: tmp.path, project: false },
|
||||
database: { path: ":memory:" },
|
||||
fs: { filewatcher: false },
|
||||
models: { fetch: false },
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { expect, spyOn, test } from "bun:test"
|
||||
/** @jsxImportSource @opentui/solid */
|
||||
import { OptimizedBuffer, RGBA } from "@opentui/core"
|
||||
import { setRendererCapabilities } from "@opentui/core/testing"
|
||||
import { testRender } from "@opentui/solid"
|
||||
import { createSignal, Show } from "solid-js"
|
||||
import "../../src/component/go-upsell-art"
|
||||
@@ -38,6 +39,7 @@ test("the art stops every frame when hidden, closed, or still, and leaves nothin
|
||||
const setCell = spyOn(OptimizedBuffer.prototype, "setCell")
|
||||
|
||||
try {
|
||||
setRendererCapabilities(app.renderer, { rgb: false })
|
||||
await app.renderOnce()
|
||||
expect(app.renderer.liveRequestCount).toBe(1)
|
||||
// Each frame is one direct write into the art's own buffer, never a draw call per cell.
|
||||
|
||||
Reference in New Issue
Block a user