From 8d49edac6af9dd08f1bb7b1727aee36af413a4a2 Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Tue, 28 Mar 2017 18:59:33 -0300 Subject: [#932] Moves form componentes to separate directories with @deniscostadsc --- .../forms/user_recovery_code_form.spec.js | 52 ---------------------- 1 file changed, 52 deletions(-) delete mode 100644 web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js (limited to 'web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js') diff --git a/web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js b/web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js deleted file mode 100644 index 1aebb814..00000000 --- a/web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js +++ /dev/null @@ -1,52 +0,0 @@ -import { shallow } from 'enzyme'; -import expect from 'expect'; -import React from 'react'; -import { UserRecoveryCodeForm } from 'src/account_recovery/forms/user_recovery_code_form'; - -describe('UserRecoveryCodeForm', () => { - let userRecoveryCodeForm; - let mockNext; - let mockPrevious; - - beforeEach(() => { - const mockTranslations = key => key; - mockNext = expect.createSpy(); - mockPrevious = expect.createSpy(); - userRecoveryCodeForm = shallow( - - ); - }); - - it('renders title for user recovery code', () => { - expect(userRecoveryCodeForm.find('h1').text()).toEqual('account-recovery.user-form.title'); - }); - - it('renders description', () => { - expect(userRecoveryCodeForm.find('p').text()).toEqual('account-recovery.user-form.description'); - }); - - it('renders input for user code', () => { - expect(userRecoveryCodeForm.find('InputField').props().label).toEqual('account-recovery.user-form.input-label'); - }); - - it('renders submit button', () => { - expect(userRecoveryCodeForm.find('SubmitButton').props().buttonText).toEqual('account-recovery.user-form.button'); - }); - - it('submits form to next step', () => { - userRecoveryCodeForm.find('form').simulate('submit'); - expect(mockNext).toHaveBeenCalled(); - }); - - it('returns to previous step on link click', () => { - userRecoveryCodeForm.find('BackLink').simulate('click'); - expect(mockPrevious).toHaveBeenCalled(); - }); - - it('returns to previous step on key down', () => { - userRecoveryCodeForm.find('BackLink').simulate('keyDown'); - expect(mockPrevious).toHaveBeenCalled(); - }); -}); -- cgit v1.2.3