Keep worker slot size stable during placement

This commit is contained in:
coyotte508 2026-11-02 08:45:01 +00:00
commit 9e0087d776
2 changed files with 10 additions and 8 deletions

View file

@ -77,6 +77,9 @@ try {
(s) => host.emit("state", s),
E.stripSecret(original, 0),
);
const idleSlot = await page.locator("span.worker-slot").first().boundingBox();
assert.equal(idleSlot.width, 32);
assert.equal(idleSlot.height, 32);
await page.locator('.offer[data-plantation-info="quarry"]').click();
assert.match(await page.locator(".modal-body").innerText(), /carrière/i);
assert.equal(await page.evaluate(() => played.length), 0);
@ -553,6 +556,9 @@ try {
s.players[0].reserve = { w: 1, c: 0 };
await page.evaluate((s) => host.emit("state", s), E.stripSecret(s, 0));
await page.locator("[data-confirm-assign]").waitFor({ state: "visible" });
const activeSlot = await page.locator("[data-slot]").first().boundingBox();
assert.equal(activeSlot.width, idleSlot.width, "placement keeps slot width");
assert.equal(activeSlot.height, idleSlot.height, "placement keeps slot height");
const reserveCount = page.locator(
'.player-strip [data-player="0"] .player-card-reserve .metric',
);

View file

@ -760,20 +760,16 @@ body:has(.pr-game) {
display: inline-flex;
align-items: center;
justify-content: center;
width: 25px;
min-height: 23px !important;
height: 23px;
width: 32px;
min-height: 32px !important;
height: 32px;
flex-shrink: 0;
border: 1px solid var(--line);
border-radius: 50%;
font-size: 13px;
padding: 0;
background: var(--paper);
}
.pr-game button.worker-slot {
width: 32px;
height: 32px;
min-height: 32px !important;
}
.pr-game .worker-slot.c {
border-color: #bd8e39;
}