Add a smoke test runner, a shared harness, and safer build scripts

- pnpm smoke runs tests/smoke/ in parallel. It starts Vite when nothing
  serves SMOKE_URL, finds an installed Chrome when Playwright has no
  Chromium, and skips a test with a reason when a requirement that the
  test declares with "// @requires" is missing. Logs go to
  output/smoke/logs/.
- tests/smoke/_harness/ holds the Playwright launch, page error
  collection, the Tauri IPC mock with an in-memory workspace, and output
  folders. tabs/order uses it as the first converted test.
- Pin Playwright 1.63.0, the version that browser-runtime uses.
- RUNESTONE_PLUGIN_REPOS names the folder of the sibling plugin
  checkouts for buildPlugins, the menu audit, and the smoke tests.
- buildInstaller restores the version fields after Ctrl+C, keeps the
  backups of each attempt, stops when the browser runtime is not staged,
  and writes the file name instead of absolute paths to host.json.
- buildPlugins clears the staged Table Formulas package before copying.
- plugins/choiceMenus used the wrong Local Autocomplete folder name.
This commit is contained in:
Knotty Wyvern
2026-10-27 19:55:49 -07:00
parent e433bed28e
commit c66ea1ce83
20 changed files with 479 additions and 69 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
// @requires repo:RuneStone_Local_Autocomplete/src
import assert from 'node:assert/strict';
import { readFile, mkdir } from 'node:fs/promises';
import { createRequire } from 'node:module';
@@ -13,7 +14,7 @@ await page.route('**/__choice-audit__', route => route.fulfill({ contentType: 't
await page.route('**/__autocomplete__/*.mjs', async route => {
const name = new URL(route.request().url()).pathname.split('/').pop();
assert.ok(['main.mjs', 'engine.mjs'].includes(name));
await route.fulfill({ contentType: 'application/javascript', body: await readFile(new URL(`../../../../RuneStone_LocalAutocomplete/src/${name}`, import.meta.url), 'utf8') });
await route.fulfill({ contentType: 'application/javascript', body: await readFile(new URL(`../../../../RuneStone_Local_Autocomplete/src/${name}`, import.meta.url), 'utf8') });
});
try {
for (const theme of ['light', 'dark']) for (const width of [1100, 390]) {