Office life: everyone roams, meetings convene in pairs, card follows agent
- The detail card now rides beside the clicked agent (flipping and clamping at viewport edges via a pure cardPositionFor helper) instead of pinning to the top-right corner; it follows a walking agent - Every agent - the CEO and busy agents included - periodically visits the coffee machine, snack bar, and restroom; work status no longer recalls a walker mid-break - The office convenes meetings around the meeting table every few minutes: at least two settled attendees walk over, dwell together on distinct table spots, and head back; a solo office never meets - Meeting spots ship as lane-wired amenities so pathing stays correct by construction; floor-plan invariants (collider-free, reachable) cover them automatically - e2e asserts the card opens beside the sprite, not in a corner
This commit is contained in:
1 parent
e55b8b85b0
commit
c3924af9ac
10 files changed
+206
-36
No files matched your search
@@ -60,6 +60,16 @@ test("the office floor opens agent details on click", async () => {
|
||||
await expect(card.getByText("Chief Executive Officer")).toBeVisible();
|
||||
await expect(card.getByText("Executive", { exact: true })).toBeVisible();
|
||||
|
||||
// The card sits beside the clicked agent, not pinned to a screen corner.
|
||||
const cardBox = await card.boundingBox();
|
||||
expect(cardBox).not.toBeNull();
|
||||
const gapToSprite = Math.min(
|
||||
Math.abs(cardBox!.x - clickX),
|
||||
Math.abs(cardBox!.x + cardBox!.width - clickX),
|
||||
);
|
||||
expect(gapToSprite).toBeLessThan(80);
|
||||
expect(Math.abs(cardBox!.y + cardBox!.height / 2 - clickY)).toBeLessThan(160);
|
||||
|
||||
await page.keyboard.press("Escape");
|
||||
await expect(card).not.toBeVisible();
|
||||
|
||||
|
||||
Reference in new issue
Block a user