@@ -114,17 +114,17 @@ describe(Agent, () => {
114
114
index ?? 0
115
115
] ;
116
116
117
- await userEvent . type ( textbox , modifiedValue ) ;
117
+ await userEvent . type ( textbox , modifiedValue , { delay : null } ) ;
118
118
}
119
119
120
- await waitFor ( ( ) => screen . getByText ( / S a v i n g | S a v e d / i ) , {
121
- timeout : 2000 ,
122
- } ) ;
123
-
124
- expect ( putSpy ) . toHaveBeenCalledWith (
125
- expect . objectContaining ( {
126
- [ field ] : expect . stringContaining ( modifiedValue ) ,
127
- } )
120
+ await waitFor (
121
+ ( ) =>
122
+ expect ( putSpy ) . toHaveBeenCalledWith (
123
+ expect . objectContaining ( {
124
+ [ field ] : expect . stringContaining ( modifiedValue ) ,
125
+ } )
126
+ ) ,
127
+ { timeout : 1000 }
128
128
) ;
129
129
} ) ;
130
130
@@ -154,7 +154,7 @@ describe(Agent, () => {
154
154
const iconSrc = iconSelections [ 0 ] . getAttribute ( "src" ) ;
155
155
await userEvent . click ( iconSelections [ 0 ] ) ;
156
156
157
- await waitFor ( ( ) => screen . getByText ( / S a v i n g | S a v e d / i ) ) ;
157
+ await waitFor ( ( ) => expect ( putSpy ) . toHaveBeenCalled ( ) , { timeout : 20 } ) ;
158
158
159
159
expect ( putSpy ) . toHaveBeenCalledWith (
160
160
expect . objectContaining ( {
@@ -203,7 +203,7 @@ describe(Agent, () => {
203
203
) . getAllByRole ( "button" ) [ 1 ] ;
204
204
await userEvent . click ( imageDeleteButton ) ;
205
205
206
- await waitFor ( ( ) => screen . getByText ( / S a v i n g | S a v e d / i ) ) ;
206
+ await waitFor ( ( ) => expect ( putSpy ) . toHaveBeenCalled ( ) , { timeout : 20 } ) ;
207
207
208
208
expect ( putSpy ) . toHaveBeenCalledWith (
209
209
expect . objectContaining ( {
0 commit comments