diff --git a/src/components/container/sticky-bar/sticky-bar.e2e.ts b/src/components/container/sticky-bar/sticky-bar.e2e.ts index 1c2935fc789..a8b589fd476 100644 --- a/src/components/container/sticky-bar/sticky-bar.e2e.ts +++ b/src/components/container/sticky-bar/sticky-bar.e2e.ts @@ -2,7 +2,7 @@ import { assert, fixture, expect } from '@open-wc/testing'; import { setViewport } from '@web/test-runner-commands'; import { html } from 'lit/static-html.js'; -import { waitForCondition } from '../../core/testing'; +import { waitForCondition, waitForLitRender } from '../../core/testing'; import { SbbContainerElement } from '../container'; import { SbbStickyBarElement } from './sticky-bar'; @@ -61,4 +61,26 @@ describe('sbb-sticky-bar', () => { expect(getSettled()).to.equal(true); }); + + it('renders with expanded layout', async () => { + container = await fixture(html` + + + + + + + `); + stickyBar = container.querySelector('sbb-sticky-bar'); + + expect(stickyBar).to.have.attribute('data-expanded'); + }); + + it('expands the sticky-bar when container is expanded', async () => { + container.expanded = true; + + await waitForLitRender(container); + + expect(stickyBar).to.have.attribute('data-expanded'); + }); });