diff options
author | Vitaly Takmazov | 2019-08-12 13:04:53 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:55 +0300 |
commit | 4aa33055120efa3ca3b4f7c9b5b6417c0f25b3ac (patch) | |
tree | 5d6549eeb510a03b44e36b97b7cee945e871e869 /vnext | |
parent | 510c86942bde18ee408e034003065fbde7a07b90 (diff) |
Remove LoginButton test
Diffstat (limited to 'vnext')
-rw-r--r-- | vnext/src/ui/__tests__/LoginButton.test.js | 21 | ||||
-rw-r--r-- | vnext/src/ui/__tests__/__snapshots__/LoginButton.test.js.snap | 178 |
2 files changed, 0 insertions, 199 deletions
diff --git a/vnext/src/ui/__tests__/LoginButton.test.js b/vnext/src/ui/__tests__/LoginButton.test.js deleted file mode 100644 index da80abb0..00000000 --- a/vnext/src/ui/__tests__/LoginButton.test.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; - -import LoginButton from '../LoginButton'; -import { create, act } from 'react-test-renderer'; - -test('Login button and form are renders correctly', () => { - var button = null; - act(() => { - button = create( - <LoginButton title="Log in" onAuth={() => { }} /> - ); - }); - let link = button.toJSON(); - expect(link).toMatchSnapshot(); - - act(() => { - button.root.findByType('a').props.onClick(); - }); - let modal = button.toJSON(); - expect(modal).toMatchSnapshot(); -}); diff --git a/vnext/src/ui/__tests__/__snapshots__/LoginButton.test.js.snap b/vnext/src/ui/__tests__/__snapshots__/LoginButton.test.js.snap deleted file mode 100644 index cd08b1b4..00000000 --- a/vnext/src/ui/__tests__/__snapshots__/LoginButton.test.js.snap +++ /dev/null @@ -1,178 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Login button and form are renders correctly 1`] = ` -<a - onClick={[Function]} -> - <div - className="icon icon--ei-user icon--s" - > - <svg - className="icon__cnt" - dangerouslySetInnerHTML={ - Object { - "__html": "<use xlink:href=#ei-user-icon />", - } - } - /> - </div> - <span - className="desktop" - > - Log in - </span> -</a> -`; - -exports[`Login button and form are renders correctly 2`] = ` -Array [ - <a - onClick={[Function]} - > - <div - className="icon icon--ei-user icon--s" - > - <svg - className="icon__cnt" - dangerouslySetInnerHTML={ - Object { - "__html": "<use xlink:href=#ei-user-icon />", - } - } - /> - </div> - <span - className="desktop" - > - Log in - </span> - </a>, - <div - id="dialogt" - > - <div - id="dialogw" - > - <div - id="dialog_header" - > - <div - id="dialogc" - onClick={[Function]} - > - <div - className="icon icon--ei-close icon--s" - > - <svg - className="icon__cnt" - dangerouslySetInnerHTML={ - Object { - "__html": "<use xlink:href=#ei-close-icon />", - } - } - /> - </div> - </div> - </div> - <div - className="dialoglogin" - > - <p> - Please, introduce yourself: - </p> - <div - style={ - Object { - "display": "flex", - "justifyContent": "space-evenly", - "padding": "4px", - } - } - > - <a - href="https://juick.com/api/_fblogin?state=http://localhost/" - style={ - Object { - "background": "#3b5998", - "color": "#fff", - "padding": "2px 14px", - } - } - > - <div - className="icon icon--s" - > - <svg - className="icon__cnt" - dangerouslySetInnerHTML={ - Object { - "__html": "<use xlink:href=#ei-sc-facebook-icon />", - } - } - /> - </div> - Log in - </a> - <a - href="https://juick.com/api/_vklogin?state=http://localhost/" - style={ - Object { - "background": "#4c75a3", - "color": "#fff", - "padding": "2px 14px", - } - } - > - <div - className="icon icon--s" - > - <svg - className="icon__cnt" - dangerouslySetInnerHTML={ - Object { - "__html": "<use xlink:href=#ei-sc-vk-icon />", - } - } - /> - </div> - Log in - </a> - </div> - <p> - Already registered? - </p> - <form - onSubmit={[Function]} - > - <input - className="input" - name="username" - onBlur={[Function]} - onChange={[Function]} - placeholder="Username..." - type="text" - value="" - /> - <br /> - <input - className="input" - name="password" - onBlur={[Function]} - onChange={[Function]} - placeholder="Password..." - type="password" - value="" - /> - <br /> - <button - className="Button" - onClick={[Function]} - > - OK - </button> - </form> - </div> - </div> - </div>, -] -`; |