57a25807af
PR #61 landed while this branch was open. It deleted `harness/tests/pointer.spec.js` and `harness/tests/widgets.spec.js`, split `web/app.js` into app/shell/serial, and added a Node suite under `web/tests/`. Two conflicts, both resolved deliberately rather than by reflex. **`harness/tests/pointer.spec.js` — modify/delete, resolved as DELETE.** The habitual "keep both sides" would resurrect a file #61 removed on purpose. `contract.spec.js` states its own scope as the RenderModel→DOM boundary and the pointer's half of the JS→wasm one, so that is where these assertions belong. Merged in, rather than restored: - the category sidebar is open at launch and `C` still hides it; - a first tile click selects and does NOT touch the document, a second cycles; - the view row and formula row clicks improvise-iioi added, which `contract.spec.js` had no entry for at all. **`context/test-evidence/clients.md` — content, resolved as BOTH SIDES.** The two `pointer.spec.js` subsections are retargeted at the file that exists, with a note saying why restoring the deleted one would have been wrong. The two older `#### … the file's own scope` sections keep their history and gain a forward pointer, because a reader following them would otherwise hunt for a file that is gone. **`web/tests/bundle/wasm_surface.test.js` now names `click_formula` and `click_view`.** That test is an exact `deepEqual` over the page's `client.*` calls and its comment says a new call "has to come and say so". It did: it failed on the merge, which is the mechanism working. It could not have been satisfied earlier — it did not exist when this branch was cut. Two review findings fixed on top, neither a live bug: - **The tile guarantee was overclaimed.** `T` leaves `tile_cat_idx` at 0, so a click on the LEFTMOST tile cycles on the first gesture. "A click never mutates on its own" and "a second click cycles" are both false against that probe. The behaviour is right — a click does what `Enter` does there — so the prose now states the implemented rule, and `t_then_a_click_on_the_leftmost_tile_cycles_it_immediately` names the case and asserts the neighbouring tile answers the same gesture differently. - **`switch_view_at`'s `Option` had no guard on the keyboard side.** Removing the `unwrap_or_default()` makes `Enter` in an empty view panel `Upstream` — gotcha 47's black hole — and passed the whole workspace. That would make membership of the host-needed list state-dependent, which is the one property that list denies. One test closes it. Gates on the merged tree: 1391 Rust tests, 26 + 3 Node tests, 16 Playwright (3 WebKit OPFS skips), clippy -D warnings, fmt, harness fmt + wasm32 clippy, eight wasm crates, comment runs and 513 evidence entries clean. `.beads/` matches gh/main exactly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
46 lines
1.6 KiB
JavaScript
46 lines
1.6 KiB
JavaScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
// The one place a line of web/*.js is executed, and where a change to either
|
|
// file belongs. Why, and why Playwright: context/code/clients.md.
|
|
// Reuse is OPT-IN because adopting another checkout's server tests THAT tree,
|
|
// and the symptom is a result contradicting the file you just read.
|
|
const PORT = process.env.IMPROVISE_HARNESS_PORT ?? "8099";
|
|
const REUSE = process.env.IMPROVISE_HARNESS_REUSE === "1";
|
|
|
|
export default defineConfig({
|
|
testDir: "./tests",
|
|
fullyParallel: false,
|
|
workers: 1,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: 0,
|
|
reporter: process.env.CI ? [["github"], ["list"]] : "list",
|
|
timeout: 60_000,
|
|
use: {
|
|
baseURL: `http://127.0.0.1:${PORT}`,
|
|
trace: "retain-on-failure",
|
|
},
|
|
// Chromium + Firefox run the OPFS battery; WebKit has no OPFS at all and is
|
|
// kept for the day it does. Every other spec is Chromium-only: clients.md.
|
|
projects: [
|
|
{ name: "chromium", use: { ...devices["Desktop Chrome"] } },
|
|
{
|
|
name: "firefox",
|
|
use: { ...devices["Desktop Firefox"] },
|
|
testMatch: /opfs\.spec\.js/,
|
|
},
|
|
{
|
|
name: "webkit",
|
|
use: { ...devices["Desktop Safari"] },
|
|
testMatch: /opfs\.spec\.js/,
|
|
},
|
|
],
|
|
webServer: {
|
|
command: `python3 -m http.server ${PORT} --bind 127.0.0.1 --directory serve`,
|
|
// The APP, not the site root — since improvise-kh8 the root is the landing
|
|
// page, which would answer 200 with no bundle assembled at all.
|
|
url: `http://127.0.0.1:${PORT}/app/index.html`,
|
|
reuseExistingServer: REUSE,
|
|
timeout: 30_000,
|
|
},
|
|
});
|