fix: omit redundant unmapped map heading
This commit is contained in:
parent
2af22f6bb2
commit
40776821a6
@ -238,8 +238,7 @@ export function UnmappedItemsPanel({
|
||||
}) {
|
||||
if (visibleUnmappedItems.length === 0 && hasHiddenUnmappedItems) {
|
||||
return (
|
||||
<div className="location-map-unmapped-list">
|
||||
<strong>Unmapped Items</strong>
|
||||
<div className="location-map-unmapped-list" aria-label="Unmapped items">
|
||||
<div className="location-map-zone-empty">
|
||||
<InlineStateAction
|
||||
label="Hidden"
|
||||
@ -257,8 +256,7 @@ export function UnmappedItemsPanel({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="location-map-unmapped-list">
|
||||
<strong>Unmapped Items</strong>
|
||||
<div className="location-map-unmapped-list" aria-label="Unmapped items">
|
||||
<MapItemActionList
|
||||
items={visibleUnmappedItems}
|
||||
onSelectItem={onSelectUnmappedItem}
|
||||
|
||||
@ -899,11 +899,6 @@
|
||||
margin-top: 0.75rem;
|
||||
}
|
||||
|
||||
.location-map-unmapped-list strong {
|
||||
display: block;
|
||||
margin-bottom: 0.45rem;
|
||||
}
|
||||
|
||||
.location-map-list-more {
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
|
||||
@ -3042,7 +3042,8 @@ test("viewer hides unrelated unmapped items while a zone is selected", async ({
|
||||
await page.getByRole("button", { name: "Layers" }).click();
|
||||
await page.getByRole("button", { name: "Unmapped" }).click();
|
||||
await expect(page.locator(".location-map-display-panel")).toBeVisible();
|
||||
await expect(page.getByText("Unmapped Items")).toBeVisible();
|
||||
await expect(page.getByLabel("Unmapped items")).toBeVisible();
|
||||
await expect(page.getByText("Unmapped Items")).toHaveCount(0);
|
||||
await expect(page.getByText("loose batteries")).toBeVisible();
|
||||
|
||||
await page.locator('[data-object-key="1531"]').locator("rect").first().click();
|
||||
@ -3050,12 +3051,13 @@ test("viewer hides unrelated unmapped items while a zone is selected", async ({
|
||||
await expect(page.getByRole("button", { name: "Layers, 1 changed" })).toHaveAttribute("aria-expanded", "false");
|
||||
await expect(page.locator(".location-map-display-panel")).toHaveCount(0);
|
||||
await expect(page.getByText("french bread")).toBeVisible();
|
||||
await expect(page.getByText("Unmapped Items")).toHaveCount(0);
|
||||
await expect(page.getByLabel("Unmapped items")).toHaveCount(0);
|
||||
await expect(page.getByText("loose batteries")).toHaveCount(0);
|
||||
|
||||
await page.locator(".location-map-background").click({ position: { x: 8, y: 8 } });
|
||||
await expect(page.locator(".location-map-sheet-header strong")).toHaveText("Map Details");
|
||||
await expect(page.getByText("Unmapped Items")).toBeVisible();
|
||||
await expect(page.getByLabel("Unmapped items")).toBeVisible();
|
||||
await expect(page.getByText("Unmapped Items")).toHaveCount(0);
|
||||
await expect(page.getByText("loose batteries")).toBeVisible();
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user