test: cover unmapped bought map items
This commit is contained in:
parent
8510c1180a
commit
37a7b79cd8
@ -2207,7 +2207,7 @@ test("viewer can buy unmapped map items in place", async ({ page }) => {
|
||||
});
|
||||
await expect(page.locator(".confirm-buy-item-name")).toHaveText("paper plates");
|
||||
await expect(page.getByText("loose batteries")).toHaveCount(0);
|
||||
await expect(page.getByLabel("Map summary").locator(".location-map-overview-row", { hasText: "Unmapped" })).toContainText("1");
|
||||
await expect(page.getByLabel("Map summary").locator(".location-map-overview-row", { hasText: "Unmapped" })).toContainText("1 shown");
|
||||
|
||||
await page.getByRole("button", { name: "Mark as Bought" }).click();
|
||||
|
||||
@ -2219,7 +2219,16 @@ test("viewer can buy unmapped map items in place", async ({ page }) => {
|
||||
});
|
||||
await expect(page.locator(".confirm-buy-modal")).toHaveCount(0);
|
||||
await expect(page.getByText("paper plates")).toHaveCount(0);
|
||||
await expect(page.getByLabel("Map summary").locator(".location-map-overview-row", { hasText: "Unmapped" })).toContainText("0");
|
||||
await expect(page.getByLabel("Map summary").locator(".location-map-overview-row", { hasText: "Unmapped" })).toContainText("0 shown");
|
||||
|
||||
await page.getByRole("button", { name: "Bought" }).click();
|
||||
await expect(page.getByLabel("Map summary").locator(".location-map-overview-row", { hasText: "Unmapped" })).toContainText("2");
|
||||
const looseBatteriesRow = page.getByRole("button", { name: "loose batteries bought" });
|
||||
const paperPlatesRow = page.getByRole("button", { name: "paper plates bought" });
|
||||
await expect(looseBatteriesRow).toBeVisible();
|
||||
await expect(looseBatteriesRow).toBeDisabled();
|
||||
await expect(paperPlatesRow).toBeVisible();
|
||||
await expect(paperPlatesRow).toBeDisabled();
|
||||
});
|
||||
|
||||
test("viewer hides unrelated unmapped items while a zone is selected", async ({ page }) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user