fix: label map buy quantity controls
This commit is contained in:
parent
b09edae159
commit
853a30093f
@ -131,6 +131,7 @@ export default function ConfirmBuyModal({
|
||||
onClick={handleDecrement}
|
||||
className="confirm-buy-counter-btn"
|
||||
disabled={quantity <= 1 || isSubmitting}
|
||||
aria-label="Decrease quantity"
|
||||
>
|
||||
-
|
||||
</button>
|
||||
@ -139,12 +140,14 @@ export default function ConfirmBuyModal({
|
||||
value={quantity}
|
||||
readOnly
|
||||
className="confirm-buy-counter-display"
|
||||
aria-label="Quantity to mark bought"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleIncrement}
|
||||
className="confirm-buy-counter-btn"
|
||||
disabled={quantity >= maxQuantity || isSubmitting}
|
||||
aria-label="Increase quantity"
|
||||
>
|
||||
+
|
||||
</button>
|
||||
|
||||
@ -3689,9 +3689,9 @@ test("viewer advances map buy modal after partial quantity buys", async ({ page
|
||||
await page.getByRole("button", { name: "Mark flour bought" }).click();
|
||||
await expect(page.locator(".confirm-buy-item-name")).toHaveText("flour");
|
||||
|
||||
await page.locator(".confirm-buy-counter-btn").first().click();
|
||||
await page.locator(".confirm-buy-counter-btn").first().click();
|
||||
await expect(page.locator(".confirm-buy-counter-display")).toHaveValue("1");
|
||||
await page.getByRole("button", { name: "Decrease quantity" }).click();
|
||||
await page.getByRole("button", { name: "Decrease quantity" }).click();
|
||||
await expect(page.getByRole("spinbutton", { name: "Quantity to mark bought" })).toHaveValue("1");
|
||||
await page.getByRole("button", { name: "Mark as Bought" }).click();
|
||||
|
||||
await expect.poll(() => boughtPayloads.length).toBe(1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user