Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit286fde6

Browse files
committed
refactor: extract dialog message to Language
1 parent0067770 commit286fde6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎site/src/pages/UsersPage/UsersPage.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const suspendUser = async (setupActionSpies: () => void) => {
2424

2525
// Check if the confirm message is displayed
2626
constconfirmDialog=screen.getByRole("dialog")
27-
expect(confirmDialog).toHaveTextContent("Do you want to suspend the user TestUser?")
27+
expect(confirmDialog).toHaveTextContent(`${UsersPageLanguage.suspendDialogMessagePrefix}${MockUser.username}?`)
2828

2929
// Setup spies to check the actions after
3030
setupActionSpies()

‎site/src/pages/UsersPage/UsersPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { UsersPageView } from "./UsersPageView"
99
exportconstLanguage={
1010
suspendDialogTitle:"Suspend user",
1111
suspendDialogAction:"Suspend",
12+
suspendDialogMessagePrefix:"Do you want to suspend the user",
1213
}
1314

1415
exportconstUsersPage:React.FC=()=>{
@@ -56,7 +57,7 @@ export const UsersPage: React.FC = () => {
5657
}}
5758
description={
5859
<>
59-
Do you want to suspend the user<strong>{userToBeSuspended?.username}</strong>?
60+
{Language.suspendDialogMessagePrefix}<strong>{userToBeSuspended?.username}</strong>?
6061
</>
6162
}
6263
/>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp