diff --git a/src/modules/event/steps/data/inscription.steps.ts b/src/modules/event/steps/data/inscription.steps.ts index 571ce31..c6f1338 100644 --- a/src/modules/event/steps/data/inscription.steps.ts +++ b/src/modules/event/steps/data/inscription.steps.ts @@ -8,10 +8,13 @@ import type { FestipodWorld } from '../../../../shared/support/world'; // --- Setup --- Given('un événement {string} existe', async function (this: FestipodWorld, eventTitle: string) { - // Ensure wallet has data (seed if empty) - await this.appFrame!.evaluate(() => { + // Ensure wallet has data (seed if empty). AWAITED, and given a budget that + // matches what seeding costs once every entity is its own document: the seed + // opens five of them, and opening a document takes seconds. The previous 10 s + // was calibrated when seeding meant adding rows to an already-open graph. + await this.appFrame!.evaluate(async () => { const td = (window as any).__testData; - if (td.events.size === 0) td.loadTestData(); + if (td.events.size === 0) await td.loadTestData(); }); // Wait for event to appear await this.appFrame!.waitForFunction( @@ -20,7 +23,7 @@ Given('un événement {string} existe', async function (this: FestipodWorld, eve return [...td.events].some((e: any) => e.title === title); }, eventTitle, - { timeout: 10000 }, + { timeout: 75000 }, ); });