@@ -21,7 +21,6 @@ import {
21
21
LOCAL_NOTIFICATION_SETTINGS_PREFIX ,
22
22
MatrixEvent ,
23
23
Room ,
24
- NotificationCountType ,
25
24
PushRuleActionName ,
26
25
TweakName ,
27
26
ConditionKind ,
@@ -31,7 +30,7 @@ import {
31
30
ThreepidMedium ,
32
31
} from "matrix-js-sdk/src/matrix" ;
33
32
import { randomString } from "matrix-js-sdk/src/randomstring" ;
34
- import { act , fireEvent , getByTestId , render , screen , waitFor , within } from "@testing-library/react" ;
33
+ import { act , fireEvent , getByTestId , render , screen , within } from "@testing-library/react" ;
35
34
import { mocked } from "jest-mock" ;
36
35
import userEvent from "@testing-library/user-event" ;
37
36
@@ -900,8 +899,7 @@ describe("<Notifications />", () => {
900
899
user : "@alice:example.org" ,
901
900
ts : 1 ,
902
901
} ) ;
903
- room . addLiveEvents ( [ message ] ) ;
904
- room . setUnreadNotificationCount ( NotificationCountType . Total , 1 ) ;
902
+ await room . addLiveEvents ( [ message ] ) ;
905
903
906
904
const { container } = await getComponentAndWait ( ) ;
907
905
const clearNotificationEl = getByTestId ( container , "clear-notifications" ) ;
@@ -910,10 +908,6 @@ describe("<Notifications />", () => {
910
908
911
909
expect ( clearNotificationEl . className ) . toContain ( "mx_AccessibleButton_disabled" ) ;
912
910
expect ( mockClient . sendReadReceipt ) . toHaveBeenCalled ( ) ;
913
-
914
- await waitFor ( ( ) => {
915
- expect ( clearNotificationEl ) . not . toBeInTheDocument ( ) ;
916
- } ) ;
917
911
} ) ;
918
912
} ) ;
919
913
} ) ;
0 commit comments