mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
The E2E suite was red because the browser could not load the client JS: requests
for the rspack bundle returned the SPA HTML fallback ("Unexpected token '<'"), so
Meteor never initialised and all ~212 specs timed out in waitForMeteor. The
readiness check only curl-tested the server (HTML 200), not that the client
bundle was being served.
The e2e job now waits until http://localhost:3000/__rspack__/client-rspack.js is
served as JavaScript before running tests, and always prints the rspack/build
lines from wekan-run.log so a genuine build failure (vs a slow start) is
diagnosable. If the bundle never serves as JS it fails fast (~10 min) with the
log instead of running 2h40m of doomed specs.
Reverts the globalSetup browser warm-up (the earlier cold-start hypothesis was
wrong — the bundle genuinely is not served, not merely slow); the CI gate is the
right place. Keeps the waitForMeteor 30s -> 60s bump.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
16 lines
426 B
JavaScript
16 lines
426 B
JavaScript
'use strict';
|
|
|
|
const http = require('http');
|
|
|
|
const BASE_URL = process.env.WEKAN_BASE_URL || 'http://localhost:3000';
|
|
|
|
module.exports = async function globalSetup() {
|
|
const running = await new Promise(resolve => {
|
|
http.get(BASE_URL, () => resolve(true)).on('error', () => resolve(false));
|
|
});
|
|
if (!running) {
|
|
console.log(`\n[playwright] SKIP: WeKan is not running at ${BASE_URL}\n`);
|
|
process.exit(0);
|
|
}
|
|
};
|