File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const suspendUser = async (setupActionSpies: () => void) => {
24
24
25
25
// Check if the confirm message is displayed
26
26
const confirmDialog = screen . getByRole ( "dialog" )
27
- expect ( confirmDialog ) . toHaveTextContent ( "Do you want to suspend the user TestUser?" )
27
+ expect ( confirmDialog ) . toHaveTextContent ( ` ${ UsersPageLanguage . suspendDialogMessagePrefix } ${ MockUser . username } ?` )
28
28
29
29
// Setup spies to check the actions after
30
30
setupActionSpies ( )
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { UsersPageView } from "./UsersPageView"
9
9
export const Language = {
10
10
suspendDialogTitle : "Suspend user" ,
11
11
suspendDialogAction : "Suspend" ,
12
+ suspendDialogMessagePrefix : "Do you want to suspend the user" ,
12
13
}
13
14
14
15
export const UsersPage : React . FC = ( ) => {
@@ -56,7 +57,7 @@ export const UsersPage: React.FC = () => {
56
57
} }
57
58
description = {
58
59
< >
59
- Do you want to suspend the user < strong > { userToBeSuspended ?. username } </ strong > ?
60
+ { Language . suspendDialogMessagePrefix } < strong > { userToBeSuspended ?. username } </ strong > ?
60
61
</ >
61
62
}
62
63
/>
You can’t perform that action at this time.
0 commit comments