Skip to content

Commit e09d1b6

Browse files
committed
chore: add not vertical test
1 parent 860f035 commit e09d1b6

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('Toolbar', () => {
5454
</ToolbarContent>
5555
</Toolbar>
5656
);
57-
expect(screen.getByTestId('toolbar')).not.toHaveClass('pf-m-no-padding');
57+
expect(screen.getByTestId('toolbar')).not.toHaveClass(styles.modifiers.noPadding);
5858
});
5959

6060
it(`should render toolbar with ${styles.modifiers.noPadding} class when hasNoPadding is true`, () => {
@@ -206,6 +206,20 @@ describe('Toolbar', () => {
206206
});
207207
});
208208

209+
it(`Renders toolbar without ${styles.modifiers.vertical} by default`, () => {
210+
render(
211+
<Toolbar data-testid="Toolbar-test-is-not-vertical">
212+
<ToolbarContent>
213+
<ToolbarItem>Test</ToolbarItem>
214+
<ToolbarItem>Test 2</ToolbarItem>
215+
<ToolbarItem variant="separator" />
216+
<ToolbarItem>Test 3 </ToolbarItem>
217+
</ToolbarContent>
218+
</Toolbar>
219+
);
220+
expect(screen.getByTestId('Toolbar-test-is-not-vertical')).not.toHaveClass(styles.modifiers.vertical);
221+
});
222+
209223
it('Renders with class ${styles.modifiers.vertical} when isVertical is true', () => {
210224
const items = (
211225
<Fragment>

0 commit comments

Comments
 (0)