File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
packages/compass-aggregations/src/components/focus-mode Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,8 @@ describe('FocusMode', function () {
1818
1919 it ( 'does not show modal when closed' , async function ( ) {
2020 const store = await renderFocusMode ( ) ;
21- store . dispatch ( disableFocusMode ( ) as any ) ;
22- await waitFor ( ( ) => {
23- expect ( ( ) => {
24- screen . getByTestId ( 'focus-mode-modal' ) ;
25- } ) . to . throw ( ) ;
26- } ) ;
21+ store . dispatch ( disableFocusMode ( ) ) ;
22+ expect ( screen . getByTestId ( 'focus-mode-modal' ) ) . to . be . closed ;
2723 } ) ;
2824
2925 it ( 'shows modal when open' , async function ( ) {
@@ -36,14 +32,12 @@ describe('FocusMode', function () {
3632
3733 it ( 'hides modal when close button is clicked' , async function ( ) {
3834 const store = await renderFocusMode ( ) ;
39- store . dispatch ( enableFocusMode ( 0 ) as any ) ;
35+ store . dispatch ( enableFocusMode ( 0 ) ) ;
4036
4137 await waitFor ( ( ) => {
4238 screen . getByLabelText ( / c l o s e m o d a l / i) . click ( ) ;
4339 } ) ;
4440
45- await waitFor ( ( ) => {
46- expect ( screen . queryByTestId ( 'focus-mode-modal' ) ) . to . not . exist ;
47- } ) ;
41+ expect ( screen . queryByTestId ( 'focus-mode-modal' ) ) . to . be . closed ;
4842 } ) ;
4943} ) ;
You can’t perform that action at this time.
0 commit comments