Skip to content

Commit 4ccf6a3

Browse files
spec
1 parent 37625e2 commit 4ccf6a3

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/compass-global-writes/src/plugin-title.spec.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ import { PluginTitle } from './plugin-title';
44
import { render, screen } from '@mongodb-js/testing-library-compass';
55

66
describe('PluginTitle', function () {
7-
it('Renders a warning', function () {
8-
render(<PluginTitle showWarning={true} />);
7+
it('Renders a warning when showError', function () {
8+
render(<PluginTitle showError={true} showWarning={false} />);
9+
expect(screen.getByLabelText('warning')).to.be.visible;
10+
});
11+
12+
it('Renders a warning when showWarning', function () {
13+
render(<PluginTitle showError={false} showWarning={true} />);
914
expect(screen.getByLabelText('warning')).to.be.visible;
1015
});
1116

1217
it('Does not render a warning', function () {
13-
render(<PluginTitle showWarning={false} />);
18+
render(<PluginTitle showError={false} showWarning={false} />);
1419
expect(screen.queryByLabelText('warning')).not.to.exist;
1520
});
1621
});

0 commit comments

Comments
 (0)