Compare commits

...

3 Commits

Author SHA1 Message Date
will.anderson f9a5f93070 Merge pull request 'Stage: fix CI JS corruption from obfuscator stdout + flaky test guards' (#82) from dev into stage
Stage — Build, push & deploy to marketing-stage / deploy-stage (push) Failing after 20m46s
Stage: fix CI JS corruption + flaky test guards
2026-05-11 14:16:48 +00:00
will.anderson 91ecdaf3a5 Merge pull request 'Fix CI JS corruption from obfuscator stdout; clean up flaky test guards' (#81) from fix/stage-ci-paths into dev
Dev — Build & local smoke test / build-smoke (push) Failing after 1m53s
Merge fix/stage-ci-paths: fix CI JS corruption + flaky test guards
2026-05-11 14:16:29 +00:00
will.anderson 61f006f62d Fix CI JS corruption from obfuscator stdout; clean up flaky test guards
Dev — Build & local smoke test / build-smoke (pull_request) Successful in 1m54s
- Strip [javascript-obfuscator-cli] progress line from elc --obfuscate
  output before writing to dist/js/ (was prepended to every compiled JS
  file, causing browser parse errors on stage)
- Remove spurious waitForFunction(signUpWithEmail) guards from
  buyer-name and buyer-email structural tests (pure DOM tests, no auth)
- Switch chat.spec.ts beforeEach to domcontentloaded (SSR elements
  present at DOM ready; networkidle caused cold-start timeouts)
2026-05-11 08:19:30 -05:00
3 changed files with 4 additions and 5 deletions
+2 -1
View File
@@ -207,10 +207,11 @@ jobs:
[ -f "$f" ] || continue
name=$(basename "$f" .el)
echo "Compiling $f..."
"$ELC" --target=js --bundle --minify --obfuscate "$f" > "dist/js/${name}.js" || {
"$ELC" --target=js --bundle --minify --obfuscate "$f" > /tmp/_elc_out.js || {
echo "elc FAILED on $f"
exit 1
}
sed '/^\[javascript-obfuscator/d' /tmp/_elc_out.js > "dist/js/${name}.js"
echo " compiled: $f -> dist/js/${name}.js"
done
rm -f src/js/el_runtime.js
+2 -2
View File
@@ -7,7 +7,7 @@ import { test, expect } from '@playwright/test';
test.describe('Demo chat widget — structure', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/');
await page.waitForLoadState('networkidle');
await page.waitForLoadState('domcontentloaded');
});
test('Demo panel (#neuron-demo-panel) is in the DOM', async ({ page }) => {
@@ -41,7 +41,7 @@ test.describe('Demo chat widget — auth gate', () => {
.forEach(k => localStorage.removeItem(k));
});
await page.reload();
await page.waitForLoadState('networkidle');
await page.waitForLoadState('domcontentloaded');
});
test('Send button is disabled when unauthenticated', async ({ page }) => {
-2
View File
@@ -186,7 +186,6 @@ test('[professional] payment-message div starts hidden', async ({ page }) => {
test('[professional] buyer-name input is present and fillable', async ({ page }) => {
await page.goto('/checkout?plan=professional');
await page.waitForFunction(() => typeof (window as any).signUpWithEmail === 'function', { timeout: 10000 });
await expect(page.locator('#buyer-name')).toBeAttached();
await page.fill('#buyer-name', 'Test User');
expect(await page.locator('#buyer-name').inputValue()).toBe('Test User');
@@ -194,7 +193,6 @@ test('[professional] buyer-name input is present and fillable', async ({ page })
test('[professional] buyer-email input is present and fillable', async ({ page }) => {
await page.goto('/checkout?plan=professional');
await page.waitForFunction(() => typeof (window as any).signUpWithEmail === 'function', { timeout: 10000 });
await expect(page.locator('#buyer-email')).toBeAttached();
await page.fill('#buyer-email', 'test@example.com');
expect(await page.locator('#buyer-email').inputValue()).toBe('test@example.com');