fix(tours): the lint the paddle work grew, back to the baseline

The region load and obstacle helpers move out of their component files (paddleRegionLoad.ts, paddleObstaclePlace.ts), so those files export components only (react-refresh). TourPlannerMapStage takes the take-from-card rule out into paddlePlaceFromCard and works out the cards' end inset once (complexity 24, back under 20). The tour tests reach list items through at() and must() instead of non-null assertions, a position change in the shaping test is voided rather than left floating, and PLOAD-004 seeds its regions with Promise.all.
This commit is contained in:
Maurice
2026-10-18 23:16:41 +02:00
parent 7e9297d867
commit dcc1c18fa9
12 changed files with 128 additions and 83 deletions
@@ -171,9 +171,11 @@ describe('PaddleRegionLoadService', () => {
});
it('PLOAD-004: holds TREK to a few regions a day and asks the admins for the next', async () => {
for (let i = 0; i < PADDLE_AUTO_REGIONS_PER_DAY; i += 1) {
await insertRow(orm(), PaddleRegions, { id: `auto-${i}`, name: `Auto ${i}`, origin: 'auto', status: 'ready' });
}
await Promise.all(
Array.from({ length: PADDLE_AUTO_REGIONS_PER_DAY }, (_, i) =>
insertRow(orm(), PaddleRegions, { id: `auto-${i}`, name: `Auto ${i}`, origin: 'auto', status: 'ready' }),
),
);
const [answer] = await ask(paddler);
expect(answer).toMatchObject({ state: 'requested', reason: 'limit' });
});