From 5935dd14c14840b600f3eda2f716a6b5d002b318 Mon Sep 17 00:00:00 2001 From: VIktorGrev <viktog2210@gmail.com> Date: Fri, 26 Apr 2024 10:18:17 +0200 Subject: [PATCH] fix: Fixing newscomponent --- src/components/SignUp/__tests__/SignUpForm.spec.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/SignUp/__tests__/SignUpForm.spec.ts b/src/components/SignUp/__tests__/SignUpForm.spec.ts index 0146a6e..f2a653c 100644 --- a/src/components/SignUp/__tests__/SignUpForm.spec.ts +++ b/src/components/SignUp/__tests__/SignUpForm.spec.ts @@ -68,13 +68,14 @@ describe('Menu and Router Tests', () => { describe('Input fields', () => { - it('updates user credetials correctly', async () => { + it('updates user credentials correctly', async () => { const { getByPlaceholderText } = render(MyComponent); - const firstInput = getByPlaceholderText('Enter your first name'); - const lastInput = getByPlaceholderText('Enter your surname'); - const emailInput = getByPlaceholderText('Enter your email'); - const passwordInput = getByPlaceholderText('Enter password'); + const firstInput = getByPlaceholderText('Enter your first name') as HTMLInputElement; + const lastInput = getByPlaceholderText('Enter your surname') as HTMLInputElement; + const emailInput = getByPlaceholderText('Enter your email') as HTMLInputElement; + const passwordInput = getByPlaceholderText('Enter password') as HTMLInputElement; + await fireEvent.update(firstInput, 'Alice'); await fireEvent.update(lastInput, 'Alicon'); await fireEvent.update(emailInput, 'user@example.com'); @@ -86,6 +87,7 @@ describe('Menu and Router Tests', () => { expect(passwordInput.value).toBe('Password1'); }); + it('Password error msg', async () => { const { container } = render(MyComponent, { global: { -- GitLab