From 50502baea76c02eb684c424d31216e918f50bd02 Mon Sep 17 00:00:00 2001 From: Asnxthaony Date: Mon, 18 May 2020 12:25:22 +0800 Subject: [PATCH] fix i18n --- resources/assets/src/views/admin/UsersManagement/index.tsx | 2 +- resources/assets/tests/views/admin/UsersManagement.test.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/assets/src/views/admin/UsersManagement/index.tsx b/resources/assets/src/views/admin/UsersManagement/index.tsx index bb273af2..897a0a20 100644 --- a/resources/assets/src/views/admin/UsersManagement/index.tsx +++ b/resources/assets/src/views/admin/UsersManagement/index.tsx @@ -214,7 +214,7 @@ const UsersManagement: React.FC = () => { mode: 'prompt', text: t('admin.newUserPassword'), inputType: 'password', - placeholder: t('adminchangePassword'), + placeholder: t('admin.changePassword'), }) password = value } catch { diff --git a/resources/assets/tests/views/admin/UsersManagement.test.tsx b/resources/assets/tests/views/admin/UsersManagement.test.tsx index 2f349389..02e67b72 100644 --- a/resources/assets/tests/views/admin/UsersManagement.test.tsx +++ b/resources/assets/tests/views/admin/UsersManagement.test.tsx @@ -604,7 +604,7 @@ describe('update password', () => { await waitFor(() => expect(fetch.get).toBeCalled()) fireEvent.click(getByText(t('admin.changePassword'))) - fireEvent.input(getByPlaceholderText(t('adminchangePassword')), { + fireEvent.input(getByPlaceholderText(t('admin.changePassword')), { target: { value: '123' }, }) fireEvent.click(getByText(t('general.confirm'))) @@ -630,7 +630,7 @@ describe('update password', () => { await waitFor(() => expect(fetch.get).toBeCalled()) fireEvent.click(getByText(t('admin.changePassword'))) - fireEvent.input(getByPlaceholderText(t('adminchangePassword')), { + fireEvent.input(getByPlaceholderText(t('admin.changePassword')), { target: { value: '123' }, }) fireEvent.click(getByText(t('general.confirm')))