Skip to content
This repository was archived by the owner on Mar 16, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"redux": "^3.7.2",
"redux-devtools-extension": "^2.13.2",
"redux-form": "^7.0.4",
"redux-mock-store": "^1.4.0",
"redux-thunk": "^2.2.0",
"web3": "^0.20.1"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Components/ActivatePNK/Form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { activatePinakion } from '../../../redux/ethereum/action-creators'
import Input from '../../Input'
import './Form.css'

const Form = props => {
export const Form = props => {
const {
handleSubmit,
submitting,
Expand Down
18 changes: 18 additions & 0 deletions src/Components/ActivatePNK/__tests__/Form.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react'
import { Form } from '../Form'

describe('Form Exists', () => {
const component = shallow(<Form />)

test('should render component properly', () => {
expect(component).toMatchSnapshot()
})

test('should render Field component properly', () => {
expect(component.find('Field').length).toBe(1)
})

test('should render button text', () => {
expect(component.find('button').text()).toBe('Activate')
})
})
31 changes: 31 additions & 0 deletions src/Components/ActivatePNK/__tests__/__snapshots__/Form.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Form Exists should render component properly 1`] = `
<form
className="Form-container"
>
<div
className="amount-container"
>
<Field
component={[Function]}
defaultValue={0}
innerClassName="input-number"
name="amount"
required={true}
step={1e-17}
type="number"
/>
</div>
<div
className="button-container"
>
<button
className="submit"
type="submit"
>
Activate
</button>
</div>
</form>
`;
12 changes: 12 additions & 0 deletions src/Components/ActivatePNK/__tests__/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Activate Exist should render Activate component correctly 1`] = `
<div
className="ActivatePNK-container"
>
<h1>
Activate PNK
</h1>
<withRouter(Connect(ReduxForm)) />
</div>
`;
9 changes: 9 additions & 0 deletions src/Components/ActivatePNK/__tests__/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react'
import ActivatePNK from '../index'

describe('Activate Exist', () => {
const component = shallow(<ActivatePNK />)
test('should render Activate component correctly', () => {
expect(component).toMatchSnapshot()
})
})
8 changes: 7 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,7 @@ big.js@^3.1.3:
resolved "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934"

bignumber@^1.1.0:
version v1.1.0
version "1.1.0"
resolved "https://registry.yarnpkg.com/bignumber/-/bignumber-1.1.0.tgz#e6ab0a743da5f3ea018e5c17597d121f7868c159"

binary-extensions@^1.0.0:
Expand Down Expand Up @@ -7296,6 +7296,12 @@ redux-form@^7.0.4:
lodash-es "^4.17.3"
prop-types "^15.5.9"

redux-mock-store@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/redux-mock-store/-/redux-mock-store-1.4.0.tgz#cdc87650f5759f293588fecc9cac2b057d95190d"
dependencies:
lodash.isplainobject "^4.0.6"

redux-thunk@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.2.0.tgz#e615a16e16b47a19a515766133d1e3e99b7852e5"
Expand Down