test(e2e): un échec ne peut plus emporter les suivants, et les bornes sont mesurées
Trois choses, dont une qui explique pourquoi aucun diagnostic n'aboutissait. SIGN_IN_MS valait 180 s alors que la somme de ses propres étapes en faisait 270. La borne englobante se déclenchait donc TOUJOURS avant celle de l'étape en cause, et ne pouvait dire qu'une chose : « bob-… to sign in ». Le message était structurellement condamné à ne rien apprendre — on a cherché des jours une cause que le harnais s'interdisait de nommer. Les bornes englobantes sont maintenant des sommes calculées de leurs étapes. Les parcours sont isolés. La suite déclare ses 7 parcours et leurs 27 vérifications AVANT tout lancement de navigateur, et rend donc toujours 34 lignes — y compris quand le montage meurt, où les parcours non exécutés sont rapportés comme tels. Auparavant le total valait 24, 26 ou 27 selon ce qui mourait : deux exécutions ne mesuraient même pas la même chose. Un échec est contenu, pas absorbé — il reste compté. Et chaque borne est dimensionnée sur une durée MESURÉE, inscrite à côté d'elle dans le code. Le premier rendu d'un acteur prend 4,9 à 7,4 s et vaut 45 s ; la traversée du broker 1,3 à 2,8 s et vaut 75 s. Un nombre nu n'apprend rien et pourrit en silence. Au passage : un walletPage.close() n'avait aucune borne du tout.
This commit is contained in:
@@ -49,10 +49,21 @@ export const WALLET_PASSWORD = "ng-eventually-e2e";
|
||||
const BUILD_MS = 60_000;
|
||||
/** Launching a browser is local too — 30s is Playwright's own default, doubled. */
|
||||
const LAUNCH_MS = 60_000;
|
||||
/** Opening a page in a live browser is instant; a minute means the browser is not answering. */
|
||||
const NEW_PAGE_MS = 60_000;
|
||||
/** The whole wallet export measures ~7s against the real broker; two minutes is a hang. */
|
||||
const EXPORT_MS = 120_000;
|
||||
/**
|
||||
* Opening a page in a live browser is instant — measured 0.0–0.1s over a batch. Bounded at
|
||||
* 10s, which is a hundred times the measurement and still fails while a reader is watching.
|
||||
* Exported because the applicative suite has to know it: a caller that wraps `newPage` in a
|
||||
* TIGHTER bound of its own would fire first and report its own name instead of this one.
|
||||
*/
|
||||
export const NEW_PAGE_MS = 10_000;
|
||||
/**
|
||||
* The whole wallet export measures ~7s against the real broker. Bounded at 60s ≈ 8x.
|
||||
*
|
||||
* Was two minutes, and that cost the batch of 2026-08-16 twice over: the export hung, and the
|
||||
* suite spent two full minutes reaching a verdict it could have reached in one — before dying
|
||||
* without a summary, because this runs in the SETUP, ahead of every journey.
|
||||
*/
|
||||
const EXPORT_MS = 60_000;
|
||||
|
||||
const ENTRY = path.resolve(__dirname, "polyfill-entry.ts");
|
||||
const BUNDLE_OUT = path.resolve(__dirname, ".dist", "polyfill-entry.js");
|
||||
@@ -538,9 +549,27 @@ export async function setupBrokerPage(page: Page, appUrl: string): Promise<Frame
|
||||
// dispatches on it, and stops when a frame is on the application's ORIGIN — an origin the
|
||||
// broker's pages can never be on, whatever they carry in their query string.
|
||||
|
||||
/** One bound for the whole ceremony. Measured healthy: 2.6–3.9s; the newcomer's cold
|
||||
* profile pays a broker session-start on top. Two minutes is a hang, not a slow host. */
|
||||
const BROKER_LOGIN_MS = 120_000;
|
||||
/**
|
||||
* One bound for the whole ceremony — the screens, the clicks, and the application's frame
|
||||
* attaching. Measured 1.3–2.8s for an actor and 1.7s on a cold profile's barrier passage
|
||||
* (2026-08-16, `E2E_TIMINGS=1`). Bounded at 45s ≈ 16x the slowest measured: enough that a
|
||||
* busy host does not manufacture a false diagnosis, little enough
|
||||
* that the rich failure below — the screen, the trail, the frames, the page's own text —
|
||||
* arrives in under a minute instead of after two.
|
||||
*
|
||||
* Exported for the same reason as {@link NEW_PAGE_MS}: this function's failure message is
|
||||
* the most informative one in the harness, and an enclosing bound set below it would replace
|
||||
* that message with "the round-trip timed out" and lose every fact in it.
|
||||
*/
|
||||
export const BROKER_LOGIN_MS = 45_000;
|
||||
/**
|
||||
* What {@link setupBrokerPage} costs at worst: its navigation plus the ceremony. A caller
|
||||
* that wants to MEASURE the round-trip should hand this to `measured` rather than invent a
|
||||
* bound of its own — an enclosure below this number fires before the ceremony can explain
|
||||
* itself, which is the failure mode `notebook.ts` documents at length.
|
||||
*/
|
||||
export const BROKER_ROUND_TRIP_MS = CONTEXT_NAVIGATION_MS + BROKER_LOGIN_MS;
|
||||
|
||||
/** How often the browser re-reads the screen. Not a sleep: it is the interval of a
|
||||
* condition check that runs INSIDE the page, the same mechanism `isVisible` uses. */
|
||||
const SCREEN_POLL_MS = 200;
|
||||
|
||||
Reference in New Issue
Block a user