Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/binance-orderbook-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ on:
- "playwright.config.js"
- "src/binance-orderbook-trade/**"
- "scripts/binance-orderbook-trade.user.js"
- "scripts/binance-*.mjs"
- "e2e/binance-orderbook/**"
- "test/unit/binance-*.test.js"
- "test/unit/binance-orderbook-trade/**"
- "test/dom/binance-orderbook-trade/**"
push:
branches:
- main
Expand All @@ -20,7 +24,11 @@ on:
- "playwright.config.js"
- "src/binance-orderbook-trade/**"
- "scripts/binance-orderbook-trade.user.js"
- "scripts/binance-*.mjs"
- "e2e/binance-orderbook/**"
- "test/unit/binance-*.test.js"
- "test/unit/binance-orderbook-trade/**"
- "test/dom/binance-orderbook-trade/**"

permissions:
contents: read
Expand All @@ -37,7 +45,7 @@ jobs:
cache: npm
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npm run test:binance-orderbook-trade
- run: npm run test:binance-orderbook-ui-toolchain
- run: npm run build:binance-orderbook-trade
- run: git diff --exit-code -- scripts/binance-orderbook-trade.user.js
- run: npm run test:ui
Expand Down
5 changes: 4 additions & 1 deletion docs/binance-orderbook-trade-ui-automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ test orders from count changes alone.
lifecycle.
- Add a deterministic Binance Futures fixture with React-style subtree replacement.
- Add scenario data, interaction probes, and the core cancel-current-symbol matrix.
- Run L2 in the PR gate.
- Run the complete Binance orderbook unit/DOM toolchain and L2 in the PR gate.
This includes the Stage 3/4 capture utilities without coupling the gate to
unrelated userscript suites. Changes limited to Stage 3/4 scripts or their unit
tests must still trigger this workflow.

### Stage 2: Expanded Host and Fault Matrix

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"check:m3u8-downloader": "node --check scripts/m3u8-downloader.user.js",
"test": "node --test",
"test:binance-orderbook-trade": "node --test test/unit/binance-orderbook-trade/*.test.js test/dom/binance-orderbook-trade/*.test.js",
"test:binance-orderbook-ui-toolchain": "node --test test/unit/binance-orderbook-trade/*.test.js test/dom/binance-orderbook-trade/*.test.js test/unit/binance-*.test.js",
"test:ui": "playwright test",
"test:ui:headed": "playwright test --headed",
"test:ui:debug": "playwright test --debug"
Expand Down
21 changes: 21 additions & 0 deletions test/unit/binance-ui-workflow.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import assert from 'node:assert/strict';
import { readFile } from 'node:fs/promises';
import test from 'node:test';

const WORKFLOW_PATH = new URL('../../.github/workflows/binance-orderbook-ui.yml', import.meta.url);

test('Binance UI workflow gates the complete deterministic and live test toolchain', async () => {
const workflow = await readFile(WORKFLOW_PATH, 'utf8');

for (const pathPattern of [
'scripts/binance-*.mjs',
'test/unit/binance-*.test.js',
'test/unit/binance-orderbook-trade/**',
'test/dom/binance-orderbook-trade/**',
]) {
assert.ok(workflow.includes(`- "${pathPattern}"`), `Missing workflow path: ${pathPattern}`);
}
assert.match(workflow, /- run: npm run test:binance-orderbook-ui-toolchain\n/);
assert.doesNotMatch(workflow, /- run: npm test\n/);
assert.match(workflow, /- run: npm run test:ui\n/);
});
Loading