mirror of
https://github.com/fsolla/teqo.git
synced 2026-12-04 23:33:06 +00:00
Update home padding tests for slot-level horizontal inset.
Scroll container no longer carries px-4 in compact Início mode; layout slots own the gutter.
This commit is contained in:
parent
5952c1e51a
commit
b44af60e31
2 changed files with 17 additions and 2 deletions
|
|
@ -20,16 +20,30 @@ describe('CampaignHomeLayout', () => {
|
||||||
expect(actions?.closest('[data-slot="home-dock"]')).not.toBeNull()
|
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(<CampaignHomeLayout actions={<p>Actions block</p>} />)
|
const { container } = render(<CampaignHomeLayout actions={<p>Actions block</p>} />)
|
||||||
|
|
||||||
const actions = container.querySelector('[data-slot="home-actions"]')
|
const actions = container.querySelector('[data-slot="home-actions"]')
|
||||||
expect(actions?.className).toContain('-mx-4')
|
expect(actions?.className).toContain('-mx-4')
|
||||||
expect(actions?.className).toContain('w-[calc(100%+2rem)]')
|
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:mx-0')
|
||||||
expect(actions?.className).toContain('md:w-auto')
|
expect(actions?.className).toContain('md:w-auto')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('insets summary and search slots horizontally on mobile', () => {
|
||||||
|
const { container } = render(
|
||||||
|
<CampaignHomeLayout
|
||||||
|
actions={<p>Actions block</p>}
|
||||||
|
searchSlot={<p>Search</p>}
|
||||||
|
summarySlot={<p>Summary</p>}
|
||||||
|
/>,
|
||||||
|
)
|
||||||
|
|
||||||
|
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', () => {
|
it('does not clip horizontal bleed on the actions retraction shell', () => {
|
||||||
const { container } = render(<CampaignHomeLayout actions={<p>Actions block</p>} />)
|
const { container } = render(<CampaignHomeLayout actions={<p>Actions block</p>} />)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -439,8 +439,9 @@ describe('CampaignContentScroll quick-actions direction (B105)', () => {
|
||||||
|
|
||||||
const scrollport = document.querySelector('[data-slot="campaign-content-scroll"]')
|
const scrollport = document.querySelector('[data-slot="campaign-content-scroll"]')
|
||||||
expect(scrollport?.getAttribute('data-home-compact-bottom-padding')).toBe('true')
|
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('pb-2')
|
||||||
expect(scrollport?.className).toContain('px-4')
|
expect(scrollport?.className).not.toContain('px-4')
|
||||||
expect(scrollport?.className).not.toContain(' p-4')
|
expect(scrollport?.className).not.toContain(' p-4')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue