File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,14 @@ const renderPage = async () => {
46
46
47
47
const removeMember = async ( ) => {
48
48
const user = userEvent . setup ( ) ;
49
- // Click on the "More options " button to display the "Remove" option
50
- const moreButtons = await screen . findAllByLabelText ( "More options " ) ;
49
+ // Click on the "Open menu " button to display the "Remove" option
50
+ const menuButtons = await screen . findAllByLabelText ( "Open menu " ) ;
51
51
// get MockUser2
52
- const selectedMoreButton = moreButtons [ 0 ] ;
52
+ const selectedMenuButton = menuButtons [ 0 ] ;
53
53
54
- await user . click ( selectedMoreButton ) ;
54
+ await user . click ( selectedMenuButton ) ;
55
55
56
- const removeButton = screen . getByText ( / R e m o v e / ) ;
56
+ const removeButton = await within ( document . body ) . findByText ( " Remove…" ) ;
57
57
await user . click ( removeButton ) ;
58
58
59
59
const dialog = await within ( document . body ) . findByRole ( "dialog" ) ;
Original file line number Diff line number Diff line change @@ -268,7 +268,9 @@ export const ResetUserPasswordSuccess: Story = {
268
268
spyOn ( API , "updateUserPassword" ) . mockResolvedValue ( ) ;
269
269
270
270
await user . click ( within ( userRow ) . getByLabelText ( "Open menu" ) ) ;
271
- const resetPasswordButton = await within ( document . body ) . findByText ( "Reset password…" ) ;
271
+ const resetPasswordButton = await within ( document . body ) . findByText (
272
+ "Reset password…" ,
273
+ ) ;
272
274
await user . click ( resetPasswordButton ) ;
273
275
274
276
const dialog = await within ( document . body ) . findByRole ( "dialog" ) ;
@@ -292,7 +294,9 @@ export const ResetUserPasswordError: Story = {
292
294
spyOn ( API , "updateUserPassword" ) . mockRejectedValue ( { } ) ;
293
295
294
296
await user . click ( within ( userRow ) . getByLabelText ( "Open menu" ) ) ;
295
- const resetPasswordButton = await within ( document . body ) . findByText ( "Reset password…" ) ;
297
+ const resetPasswordButton = await within ( document . body ) . findByText (
298
+ "Reset password…" ,
299
+ ) ;
296
300
await user . click ( resetPasswordButton ) ;
297
301
298
302
const dialog = await within ( document . body ) . findByRole ( "dialog" ) ;
You can’t perform that action at this time.
0 commit comments