@@ -99,10 +99,8 @@ export const SuspendUserSuccess: Story = {
99
99
count : 60 ,
100
100
} ) ;
101
101
102
- await user . click ( within ( userRow ) . getByLabelText ( "More options" ) ) ;
103
- const suspendButton = await within ( userRow ) . findByText ( "Suspend" , {
104
- exact : false ,
105
- } ) ;
102
+ await user . click ( within ( userRow ) . getByLabelText ( "Open menu" ) ) ;
103
+ const suspendButton = await within ( document . body ) . findByText ( "Suspend…" ) ;
106
104
await user . click ( suspendButton ) ;
107
105
108
106
const dialog = await within ( document . body ) . findByRole ( "dialog" ) ;
@@ -120,10 +118,8 @@ export const SuspendUserError: Story = {
120
118
}
121
119
spyOn ( API , "suspendUser" ) . mockRejectedValue ( undefined ) ;
122
120
123
- await user . click ( within ( userRow ) . getByLabelText ( "More options" ) ) ;
124
- const suspendButton = await within ( userRow ) . findByText ( "Suspend" , {
125
- exact : false ,
126
- } ) ;
121
+ await user . click ( within ( userRow ) . getByLabelText ( "Open menu" ) ) ;
122
+ const suspendButton = await within ( document . body ) . findByText ( "Suspend…" ) ;
127
123
await user . click ( suspendButton ) ;
128
124
129
125
const dialog = await within ( document . body ) . findByRole ( "dialog" ) ;
@@ -149,10 +145,8 @@ export const DeleteUserSuccess: Story = {
149
145
count : 59 ,
150
146
} ) ;
151
147
152
- await user . click ( within ( userRow ) . getByLabelText ( "More options" ) ) ;
153
- const deleteButton = await within ( userRow ) . findByText ( "Delete" , {
154
- exact : false ,
155
- } ) ;
148
+ await user . click ( within ( userRow ) . getByLabelText ( "Open menu" ) ) ;
149
+ const deleteButton = await within ( document . body ) . findByText ( "Delete…" ) ;
156
150
await user . click ( deleteButton ) ;
157
151
158
152
const dialog = await within ( document . body ) . findByRole ( "dialog" ) ;
@@ -172,10 +166,8 @@ export const DeleteUserError: Story = {
172
166
}
173
167
spyOn ( API , "deleteUser" ) . mockRejectedValue ( { } ) ;
174
168
175
- await user . click ( within ( userRow ) . getByLabelText ( "More options" ) ) ;
176
- const deleteButton = await within ( userRow ) . findByText ( "Delete" , {
177
- exact : false ,
178
- } ) ;
169
+ await user . click ( within ( userRow ) . getByLabelText ( "Open menu" ) ) ;
170
+ const deleteButton = await within ( document . body ) . findByText ( "Delete…" ) ;
179
171
await user . click ( deleteButton ) ;
180
172
181
173
const dialog = await within ( document . body ) . findByRole ( "dialog" ) ;
@@ -220,10 +212,8 @@ export const ActivateUserSuccess: Story = {
220
212
count : 60 ,
221
213
} ) ;
222
214
223
- await user . click ( within ( userRow ) . getByLabelText ( "More options" ) ) ;
224
- const activateButton = await within ( userRow ) . findByText ( "Activate" , {
225
- exact : false ,
226
- } ) ;
215
+ await user . click ( within ( userRow ) . getByLabelText ( "Open menu" ) ) ;
216
+ const activateButton = await within ( document . body ) . findByText ( "Activate…" ) ;
227
217
await user . click ( activateButton ) ;
228
218
229
219
const dialog = await within ( document . body ) . findByRole ( "dialog" ) ;
@@ -242,10 +232,8 @@ export const ActivateUserError: Story = {
242
232
}
243
233
spyOn ( API , "activateUser" ) . mockRejectedValue ( { } ) ;
244
234
245
- await user . click ( within ( userRow ) . getByLabelText ( "More options" ) ) ;
246
- const activateButton = await within ( userRow ) . findByText ( "Activate" , {
247
- exact : false ,
248
- } ) ;
235
+ await user . click ( within ( userRow ) . getByLabelText ( "Open menu" ) ) ;
236
+ const activateButton = await within ( document . body ) . findByText ( "Activate…" ) ;
249
237
await user . click ( activateButton ) ;
250
238
251
239
const dialog = await within ( document . body ) . findByRole ( "dialog" ) ;
@@ -279,11 +267,8 @@ export const ResetUserPasswordSuccess: Story = {
279
267
}
280
268
spyOn ( API , "updateUserPassword" ) . mockResolvedValue ( ) ;
281
269
282
- await user . click ( within ( userRow ) . getByLabelText ( "More options" ) ) ;
283
- const resetPasswordButton = await within ( userRow ) . findByText (
284
- "Reset password" ,
285
- { exact : false } ,
286
- ) ;
270
+ await user . click ( within ( userRow ) . getByLabelText ( "Open menu" ) ) ;
271
+ const resetPasswordButton = await within ( document . body ) . findByText ( "Reset password…" ) ;
287
272
await user . click ( resetPasswordButton ) ;
288
273
289
274
const dialog = await within ( document . body ) . findByRole ( "dialog" ) ;
@@ -306,11 +291,8 @@ export const ResetUserPasswordError: Story = {
306
291
}
307
292
spyOn ( API , "updateUserPassword" ) . mockRejectedValue ( { } ) ;
308
293
309
- await user . click ( within ( userRow ) . getByLabelText ( "More options" ) ) ;
310
- const resetPasswordButton = await within ( userRow ) . findByText (
311
- "Reset password" ,
312
- { exact : false } ,
313
- ) ;
294
+ await user . click ( within ( userRow ) . getByLabelText ( "Open menu" ) ) ;
295
+ const resetPasswordButton = await within ( document . body ) . findByText ( "Reset password…" ) ;
314
296
await user . click ( resetPasswordButton ) ;
315
297
316
298
const dialog = await within ( document . body ) . findByRole ( "dialog" ) ;
0 commit comments