Skip to content

Commit eeb34aa

Browse files
committed
test(web): restore config layout appearance contract
1 parent 2704afc commit eeb34aa

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

src/web-ui/src/infrastructure/config/components/common/ConfigPageLayout.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe('ConfigPageLayout', () => {
120120
expect(row?.querySelector('.bitfun-config-page-row__control')).toBeNull();
121121
});
122122

123-
it('preserves design-system component ownership while forwarding feature-owned parts', () => {
123+
it('forwards feature-owned layout contracts while preserving nested design-system ownership', () => {
124124
act(() => {
125125
root.render(
126126
<ConfigPageLayout
@@ -150,8 +150,8 @@ describe('ConfigPageLayout', () => {
150150
const contentElement = container.querySelector('[data-testid="feature-content"]');
151151
const sectionElement = container.querySelector('[data-testid="feature-section"]');
152152

153-
expect(rootElement?.getAttribute('data-bf-component')).toBe('scroll-area');
154-
expect(rootElement?.getAttribute('data-bf-part')).toBe('viewport');
153+
expect(rootElement?.getAttribute('data-bf-component')).toBe('model-settings');
154+
expect(rootElement?.getAttribute('data-bf-part')).toBe('root');
155155
expect(contentElement?.getAttribute('data-bf-component')).toBe('model-settings');
156156
expect(contentElement?.getAttribute('data-bf-part')).toBe('providerSelection');
157157
expect(sectionElement?.getAttribute('data-bf-component')).toBe('form-section');

src/web-ui/src/infrastructure/config/components/common/ConfigPageLayout.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ export const ConfigPageLayout: React.FC<ConfigPageLayoutProps> = ({
1616
...props
1717
}) => {
1818
return (
19-
<ScrollArea
20-
className={`bitfun-config-page-layout ${className}`}
21-
{...props}
22-
data-bf-component="scroll-area"
23-
data-bf-part="viewport"
24-
>
19+
<ScrollArea className={`bitfun-config-page-layout ${className}`} data-bf-component="config" data-bf-part="root" {...props}>
2520
{children}
2621
{/* Real DOM spacer: keeps a guaranteed blank tail at the end of the scroll range. */}
2722
<div className="bitfun-config-page-layout__scroll-end-spacer" aria-hidden="true" />

0 commit comments

Comments
 (0)