Skip to content

Commit ded5c6c

Browse files
committed
chore: add toolbar isVertical test
1 parent 88f0e92 commit ded5c6c

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

packages/react-core/src/components/Toolbar/__tests__/Toolbar.test.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,23 @@ describe('Toolbar', () => {
205205
});
206206
});
207207
});
208+
209+
it('Renders with class ${styles.modifiers.vertical} when isVertical is true', () => {
210+
const items = (
211+
<Fragment>
212+
<ToolbarItem>Test</ToolbarItem>
213+
<ToolbarItem>Test 2</ToolbarItem>
214+
<ToolbarItem variant="separator" />
215+
<ToolbarItem>Test 3 </ToolbarItem>
216+
</Fragment>
217+
);
218+
219+
render(
220+
<Toolbar id="toolbar" isVertical data-testid="Toolbar-test-is-vertical">
221+
<ToolbarContent>{items}</ToolbarContent>
222+
</Toolbar>
223+
);
224+
225+
expect(screen.getByTestId('Toolbar-test-is-vertical')).toHaveClass(styles.modifiers.vertical);
226+
});
208227
});

0 commit comments

Comments
 (0)