mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-18 00:56:30 +03:00
[codex] Improve CI test coverage (#212)
* Improve CI test coverage * Stabilize live E2E harness * Shard live E2E CI * Cache live E2E CI dependencies * Stabilize live E2E smoke CI * Update generated live browser bundles * Tighten live E2E smoke runtime * Prevent live E2E smoke hangs * Stabilize live E2E CI coverage * Fix stale accept DOM cleanup * Regenerate live browser outputs
This commit is contained in:
@@ -8,7 +8,7 @@ import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { createFakeAgent, findSteerTargetFile, runAgentLoop, STEER_MARKER_ATTR } from './live-e2e/agent.mjs';
|
||||
import { addSteerMarkerToSource, createFakeAgent, findSteerTargetFile, runAgentLoop, STEER_MARKER_ATTR } from './live-e2e/agent.mjs';
|
||||
import { stageFixture, startLiveServer, stopLiveServer, FIXTURES_DIR } from './live-e2e/session.mjs';
|
||||
import { SCRIPTS_DIR } from './live-e2e/session.mjs';
|
||||
|
||||
@@ -49,6 +49,18 @@ describe('live-e2e steer agent handler', () => {
|
||||
assert.match(body, /hero-title/);
|
||||
});
|
||||
|
||||
it('marks JSX template-expression className attributes', () => {
|
||||
const source = [
|
||||
'export default function App() {',
|
||||
' return <h1 className={`hero-title ${styles.heroTitle}`}>Fixture</h1>;',
|
||||
'}',
|
||||
].join('\n');
|
||||
const updated = addSteerMarkerToSource(source);
|
||||
|
||||
assert.match(updated, new RegExp(STEER_MARKER_ATTR + '="e2e"'));
|
||||
assert.match(updated, /className=\{`hero-title \$\{styles\.heroTitle\}`\}/);
|
||||
});
|
||||
|
||||
it('agent loop handles steer POST and writes the marker', async () => {
|
||||
const sourceFile = findSteerTargetFile(tmp);
|
||||
const before = readFileSync(sourceFile, 'utf-8');
|
||||
|
||||
Reference in New Issue
Block a user