From 9ea6a8c8e94e116d8efbbff63b39738162cbaec1 Mon Sep 17 00:00:00 2001 From: simeng-li Date: Mon, 10 Oct 2022 15:32:41 +0800 Subject: [PATCH] fix(ui): fix ut fix ut --- .../ui/src/containers/ResetPassword/index.test.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/ui/src/containers/ResetPassword/index.test.tsx b/packages/ui/src/containers/ResetPassword/index.test.tsx index 2705254c3..f8425ce63 100644 --- a/packages/ui/src/containers/ResetPassword/index.test.tsx +++ b/packages/ui/src/containers/ResetPassword/index.test.tsx @@ -21,12 +21,12 @@ describe('', () => { const { queryByText, container } = renderWithPageContext(); expect(container.querySelector('input[name="new-password"]')).not.toBeNull(); expect(container.querySelector('input[name="confirm-new-password"]')).not.toBeNull(); - expect(queryByText('action.confirm')).not.toBeNull(); + expect(queryByText('action.save_password')).not.toBeNull(); }); test('password are required', () => { const { queryByText, getByText } = renderWithPageContext(); - const submitButton = getByText('action.confirm'); + const submitButton = getByText('action.save_password'); fireEvent.click(submitButton); expect(queryByText('password_required')).not.toBeNull(); @@ -35,7 +35,7 @@ describe('', () => { test('password less than 6 chars should throw', () => { const { queryByText, getByText, container } = renderWithPageContext(); - const submitButton = getByText('action.confirm'); + const submitButton = getByText('action.save_password'); const passwordInput = container.querySelector('input[name="new-password"]'); if (passwordInput) { @@ -62,7 +62,7 @@ describe('', () => { test('password mismatch with confirmPassword should throw', () => { const { queryByText, getByText, container } = renderWithPageContext(); - const submitButton = getByText('action.confirm'); + const submitButton = getByText('action.save_password'); const passwordInput = container.querySelector('input[name="new-password"]'); const confirmPasswordInput = container.querySelector('input[name="confirm-new-password"]'); @@ -94,7 +94,7 @@ describe('', () => { test('should submit properly', async () => { const { queryByText, getByText, container } = renderWithPageContext(); - const submitButton = getByText('action.confirm'); + const submitButton = getByText('action.save_password'); const passwordInput = container.querySelector('input[name="new-password"]'); const confirmPasswordInput = container.querySelector('input[name="confirm-new-password"]');