From b44af60e3104258e7c53f0b41734b70319cb84a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Francisco=20Ign=C3=A1cio=20Fontoura=20Solla?=
Date: Sun, 2 Aug 2026 01:09:18 -0300
Subject: [PATCH] Update home padding tests for slot-level horizontal inset.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Scroll container no longer carries px-4 in compact InĂcio mode; layout slots own the gutter.
---
tests/unit/campaignHomeLayout.unit.spec.tsx | 16 +++++++++++++++-
.../campaignQuickActionsDrawer.unit.spec.tsx | 3 ++-
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/tests/unit/campaignHomeLayout.unit.spec.tsx b/tests/unit/campaignHomeLayout.unit.spec.tsx
index aee45f74..0dc9f6b3 100644
--- a/tests/unit/campaignHomeLayout.unit.spec.tsx
+++ b/tests/unit/campaignHomeLayout.unit.spec.tsx
@@ -20,16 +20,30 @@ describe('CampaignHomeLayout', () => {
expect(actions?.closest('[data-slot="home-dock"]')).not.toBeNull()
})
- it('bleeds home-actions edge-to-edge on mobile (compensates scroll p-4)', () => {
+ it('bleeds home-actions edge-to-edge on mobile with inner gutter padding', () => {
const { container } = render(Actions block
} />)
const actions = container.querySelector('[data-slot="home-actions"]')
expect(actions?.className).toContain('-mx-4')
expect(actions?.className).toContain('w-[calc(100%+2rem)]')
+ expect(actions?.className).toContain('px-4')
expect(actions?.className).toContain('md:mx-0')
expect(actions?.className).toContain('md:w-auto')
})
+ it('insets summary and search slots horizontally on mobile', () => {
+ const { container } = render(
+ Actions block}
+ searchSlot={Search
}
+ summarySlot={Summary
}
+ />,
+ )
+
+ expect(container.querySelector('[data-slot="home-summary"]')?.className).toContain('mx-4')
+ expect(container.querySelector('[data-slot="home-search"]')?.className).toContain('mx-4')
+ })
+
it('does not clip horizontal bleed on the actions retraction shell', () => {
const { container } = render(Actions block} />)
diff --git a/tests/unit/campaignQuickActionsDrawer.unit.spec.tsx b/tests/unit/campaignQuickActionsDrawer.unit.spec.tsx
index 6c9db69c..a1fc41eb 100644
--- a/tests/unit/campaignQuickActionsDrawer.unit.spec.tsx
+++ b/tests/unit/campaignQuickActionsDrawer.unit.spec.tsx
@@ -439,8 +439,9 @@ describe('CampaignContentScroll quick-actions direction (B105)', () => {
const scrollport = document.querySelector('[data-slot="campaign-content-scroll"]')
expect(scrollport?.getAttribute('data-home-compact-bottom-padding')).toBe('true')
+ expect(scrollport?.className).toContain('pt-4')
expect(scrollport?.className).toContain('pb-2')
- expect(scrollport?.className).toContain('px-4')
+ expect(scrollport?.className).not.toContain('px-4')
expect(scrollport?.className).not.toContain(' p-4')
})