diff options
author | 2018-06-27 21:37:29 +0300 | |
---|---|---|
committer | 2023-01-13 10:37:53 +0300 | |
commit | 01f1135df1bbf44217124e78850cf1e12911e01e (patch) | |
tree | 629ddbfa799c695a9817ee8521d12db69d097526 /vnext/src/components/__tests__/LoginButton.test.js | |
parent | 1662e167d29eec80a48037b3fac7ed5f1bcbe4f7 (diff) |
LoginButton refactoring and snapshots
Diffstat (limited to 'vnext/src/components/__tests__/LoginButton.test.js')
-rw-r--r-- | vnext/src/components/__tests__/LoginButton.test.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vnext/src/components/__tests__/LoginButton.test.js b/vnext/src/components/__tests__/LoginButton.test.js new file mode 100644 index 00000000..0b672365 --- /dev/null +++ b/vnext/src/components/__tests__/LoginButton.test.js @@ -0,0 +1,16 @@ +import React from 'react'; + +import LoginButton from '../LoginButton'; +import renderer from 'react-test-renderer'; + +test('Login button and form are renders correctly', () => { + const button = renderer.create( + <LoginButton title="Log in" onAuth={() => {}} /> + ); + let link = button.toJSON(); + expect(link).toMatchSnapshot(); + + button.root.instance.toggleModal(); + let modal = button.toJSON(); + expect(modal).toMatchSnapshot(); +});
\ No newline at end of file |