File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
packages/compass-global-writes/src Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,18 @@ import { PluginTitle } from './plugin-title';
44import { render , screen } from '@mongodb-js/testing-library-compass' ;
55
66describe ( '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} ) ;
You can’t perform that action at this time.
0 commit comments