Fix tests
This commit is contained in:
parent
9361e3df7e
commit
1edfd173f2
|
@ -13,7 +13,7 @@ import {
|
|||
Crowdsales
|
||||
} from './components/index'
|
||||
import NoWeb3 from './components/Common/NoWeb3'
|
||||
import IncompleteDeploy from './components/IncompleteDeploy'
|
||||
import CheckIncompleteDeploy from './components/CheckIncompleteDeploy'
|
||||
import { getAddrFromQuery, toast } from './utils/utils'
|
||||
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
|
||||
import AlertContainer from 'react-alert'
|
||||
|
@ -64,7 +64,7 @@ class App extends Component {
|
|||
<Route path="/4" component={StepFour} />
|
||||
|
||||
{deploymentStore.deployInProgress ? (
|
||||
<IncompleteDeploy />
|
||||
<CheckIncompleteDeploy />
|
||||
) : (
|
||||
<Switch>
|
||||
<Route exact path="/manage/:crowdsalePointer" component={Manage} />
|
||||
|
|
|
@ -7,7 +7,7 @@ class CheckIncompleteDeploy extends Component {
|
|||
cancelDeploy()
|
||||
}
|
||||
|
||||
goToStepFour = () => {
|
||||
goToStepFour() {
|
||||
navigateTo({
|
||||
history: this.props.history,
|
||||
location: 'stepFour'
|
||||
|
@ -23,7 +23,7 @@ class CheckIncompleteDeploy extends Component {
|
|||
<h1 className="title">Welcome to Token Wizard</h1>
|
||||
<p className="description">You have an incomplete deploy.</p>
|
||||
<div className="buttons">
|
||||
<button onClick={this.goToStepFour} className="button button_fill">
|
||||
<button onClick={() => this.goToStepFour()} className="button button_fill">
|
||||
Resume
|
||||
</button>
|
||||
<button onClick={() => this.cancel()} className="button button_outline">
|
|
@ -0,0 +1,15 @@
|
|||
export function fetchFile(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const rawFile = new XMLHttpRequest()
|
||||
|
||||
rawFile.addEventListener('error', reject)
|
||||
rawFile.open('GET', path, true)
|
||||
rawFile.onreadystatechange = function() {
|
||||
if (rawFile.readyState === 4 && (rawFile.status === 200 || rawFile.status === 0)) {
|
||||
let allText = rawFile.responseText
|
||||
resolve(allText)
|
||||
}
|
||||
}
|
||||
rawFile.send(null)
|
||||
})
|
||||
}
|
|
@ -4,6 +4,7 @@ import { BigNumber } from 'bignumber.js'
|
|||
import logdown from 'logdown'
|
||||
import Web3 from 'web3'
|
||||
import moment from 'moment'
|
||||
import { fetchFile } from './fetchFile'
|
||||
import { isObservableArray } from 'mobx'
|
||||
|
||||
const logger = logdown('TW:utils:utils')
|
||||
|
@ -47,22 +48,6 @@ export function setFlatFileContentToState(file) {
|
|||
return fetchFile(file)
|
||||
}
|
||||
|
||||
export function fetchFile(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const rawFile = new XMLHttpRequest()
|
||||
|
||||
rawFile.addEventListener('error', reject)
|
||||
rawFile.open('GET', path, true)
|
||||
rawFile.onreadystatechange = function() {
|
||||
if (rawFile.readyState === 4 && (rawFile.status === 200 || rawFile.status === 0)) {
|
||||
let allText = rawFile.responseText
|
||||
resolve(allText)
|
||||
}
|
||||
}
|
||||
rawFile.send(null)
|
||||
})
|
||||
}
|
||||
|
||||
export const dateToTimestamp = date => new Date(date).getTime()
|
||||
|
||||
export const isStepActive = (stepsTextArray, stepText, activeStepText) => {
|
||||
|
|
|
@ -3,11 +3,11 @@ import renderer from 'react-test-renderer'
|
|||
import { configure, mount } from 'enzyme'
|
||||
import Adapter from 'enzyme-adapter-react-15'
|
||||
import { MemoryRouter } from 'react-router'
|
||||
import CheckIncompleteDeploy from '../../src/components/IncompleteDeploy'
|
||||
import CheckIncompleteDeploy from '../../src/components/CheckIncompleteDeploy'
|
||||
|
||||
configure({ adapter: new Adapter() })
|
||||
|
||||
describe('IncompleteDeploys', () => {
|
||||
describe('CheckIncompleteDeploys', () => {
|
||||
const history = { push: jest.fn() }
|
||||
it(`should render CheckIncompleteDeploys`, () => {
|
||||
// Given
|
||||
|
@ -34,7 +34,7 @@ describe('IncompleteDeploys', () => {
|
|||
|
||||
// When
|
||||
const checkIncompleteDeployComponent = wrapper.find('CheckIncompleteDeploy')
|
||||
const navigateToHandler = jest.spyOn(checkIncompleteDeployComponent.instance(), 'navigateTo')
|
||||
const navigateToHandler = jest.spyOn(checkIncompleteDeployComponent.instance(), 'goToStepFour')
|
||||
wrapper.update()
|
||||
checkIncompleteDeployComponent
|
||||
.find('.buttons button')
|
||||
|
@ -43,7 +43,6 @@ describe('IncompleteDeploys', () => {
|
|||
|
||||
// Then
|
||||
expect(navigateToHandler).toHaveBeenCalledTimes(1)
|
||||
expect(navigateToHandler).toHaveBeenCalledWith('stepFour')
|
||||
})
|
||||
|
||||
it(`should cancel the deploy`, () => {
|
|
@ -25,6 +25,6 @@ describe('InputField2 ', () => {
|
|||
expect(wrapper.find('input').props().placeholder).toBe(placeholder)
|
||||
expect(wrapper.find('input').props().disabled).toBeFalsy()
|
||||
expect(wrapper.find('input').props().id).toBe(input.name)
|
||||
expect(wrapper.find('Error').props().name).toBe(input.name)
|
||||
expect(wrapper.find('Errors').props().name).toBe(input.name)
|
||||
})
|
||||
})
|
||||
|
|
|
@ -4,7 +4,6 @@ import { VALIDATION_TYPES } from '../../../src/utils/constants'
|
|||
import Adapter from 'enzyme-adapter-react-15'
|
||||
import { configure, mount } from 'enzyme'
|
||||
import { reservedTokenStore, tokenStore } from '../../../src/stores'
|
||||
import { toBigNumber } from '../../../src/utils/utils'
|
||||
|
||||
const { VALID, INVALID } = VALIDATION_TYPES
|
||||
const stores = { reservedTokenStore, tokenStore }
|
||||
|
@ -324,7 +323,7 @@ describe('ReservedTokensInputBlock', () => {
|
|||
.at(0)
|
||||
.simulate('change', { target: { value: testCase.value.val } })
|
||||
|
||||
wrapper.find('.sw-NumericInput_ButtonPlus').simulate('click')
|
||||
wrapper.find('ButtonPlus').simulate('click')
|
||||
|
||||
const { value } = testCase
|
||||
value.val = testCase.value.val === '' ? '' : parseFloat(testCase.value.val)
|
||||
|
@ -359,9 +358,9 @@ describe('ReservedTokensInputBlock', () => {
|
|||
.at(0)
|
||||
.simulate('change', { target: { value: testCase.value.val } })
|
||||
|
||||
wrapper.find('.sw-NumericInput_ButtonPlus').simulate('click')
|
||||
wrapper.find('ButtonPlus').simulate('click')
|
||||
|
||||
const clearAllButton = wrapper.find('.sw-ReservedTokensListControls_Button-clearall')
|
||||
const clearAllButton = wrapper.find('ButtonCSV').find('.sw-ButtonCSV-clearall')
|
||||
expect(clearAllButton).toHaveLength(1)
|
||||
})
|
||||
|
||||
|
|
|
@ -56,6 +56,6 @@ describe('TokenDecimals', () => {
|
|||
const input = wrapper.find('input[name="decimals"]')
|
||||
input.simulate('change', { target: { value: '21' } })
|
||||
|
||||
expect(wrapper.find('.sw-Error').text()).toBe('Should not be greater than 18')
|
||||
expect(wrapper.find('InputField2').prop('meta').error).toBe('Should not be greater than 18')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -30,7 +30,7 @@ describe('TokenName', () => {
|
|||
const input = wrapper.find('input[name="name"]')
|
||||
input.simulate('change', { target: { value: ' ' } })
|
||||
|
||||
expect(wrapper.find('.sw-Error').text()).toBe('Name should have at least one character')
|
||||
expect(wrapper.find('InputField2').prop('meta').error).toBe('Name should have at least one character')
|
||||
})
|
||||
|
||||
it(`should give error if name is empty`, () => {
|
||||
|
@ -54,6 +54,6 @@ describe('TokenName', () => {
|
|||
const input = wrapper.find('input[name="name"]')
|
||||
input.simulate('change', { target: { value: '1234567890132546789012345678901' } })
|
||||
|
||||
expect(wrapper.find('.sw-Error').text()).toBe(VALIDATION_MESSAGES.NAME)
|
||||
expect(wrapper.find('InputField2').prop('meta').error).toBe(VALIDATION_MESSAGES.NAME)
|
||||
})
|
||||
})
|
||||
|
|
|
@ -24,36 +24,40 @@ describe('TokenTicker', () => {
|
|||
})
|
||||
|
||||
it(`should give error if ticker name has other than alphanumeric characters`, () => {
|
||||
const wrapper = mount(
|
||||
<Form onSubmit={jest.fn()} component={TokenTicker} errorStyle={{ color: 'red', fontWeight: 'bold' }} />
|
||||
)
|
||||
const input = wrapper.find('input[name="ticker"]')
|
||||
// Given
|
||||
const wrapper = mount(<Form onSubmit={jest.fn()} component={TokenTicker} />)
|
||||
|
||||
// When
|
||||
const input = wrapper.find('input[name="ticker"]').at(0)
|
||||
input.simulate('change', { target: { value: 'AB@C8' } })
|
||||
|
||||
expect(wrapper.find('.sw-Error').text()).toBe('Only alphanumeric characters')
|
||||
// Then
|
||||
expect(wrapper.find('InputField2').prop('meta').error).toBe('Only alphanumeric characters')
|
||||
})
|
||||
|
||||
it(`should give error if ticker name is empty`, () => {
|
||||
const wrapper = mount(
|
||||
<Form onSubmit={jest.fn()} component={TokenTicker} errorStyle={{ color: 'red', fontWeight: 'bold' }} />
|
||||
)
|
||||
|
||||
// Given
|
||||
const wrapper = mount(<Form onSubmit={jest.fn()} component={TokenTicker} />)
|
||||
const input = wrapper.find('input[name="ticker"]')
|
||||
|
||||
// When
|
||||
input.simulate('change', { target: { value: 'VALID' } })
|
||||
expect(wrapper.find('InputField2').prop('meta').error).toBeFalsy()
|
||||
|
||||
input.simulate('change', { target: { value: '' } })
|
||||
|
||||
// Then
|
||||
expect(wrapper.find('InputField2').prop('meta').error).toBe(VALIDATION_MESSAGES.REQUIRED)
|
||||
})
|
||||
|
||||
it(`should give error if ticker name is longer than 5 characters`, () => {
|
||||
const wrapper = mount(
|
||||
<Form onSubmit={jest.fn()} component={TokenTicker} errorStyle={{ color: 'red', fontWeight: 'bold' }} />
|
||||
)
|
||||
// Given
|
||||
const wrapper = mount(<Form onSubmit={jest.fn()} component={TokenTicker} />)
|
||||
const input = wrapper.find('input[name="ticker"]')
|
||||
|
||||
// When
|
||||
input.simulate('change', { target: { value: '123456' } })
|
||||
|
||||
expect(wrapper.find('.sw-Error').text()).toBe('Please enter a valid ticker between 1-5 characters')
|
||||
// Then
|
||||
expect(wrapper.find('InputField2').prop('meta').error).toBe('Please enter a valid ticker between 1-5 characters')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`ButtonBack should render ButtonBack component 1`] = `
|
||||
<button
|
||||
className="sw-ButtonBack"
|
||||
className="sw-ButtonBack "
|
||||
onClick={[MockFunction]}
|
||||
type="button"
|
||||
>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`CrowdsaleEndTime Rendering should render CrowdsaleEndTime component 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -39,7 +39,7 @@ exports[`CrowdsaleEndTime Rendering should render CrowdsaleEndTime component 1`]
|
|||
|
||||
exports[`CrowdsaleEndTime Rendering should render CrowdsaleEndTime component if field is disabled 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`CrowdsaleRate should render CrowdsaleRate component 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -28,6 +28,7 @@ exports[`CrowdsaleRate should render CrowdsaleRate component 1`] = `
|
|||
disabled={false}
|
||||
id="CrowdsaleRate"
|
||||
name="CrowdsaleRate"
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="1234"
|
||||
/>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`CrowdsaleStartTime Rendering should render CrowdsaleStartTime component 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -39,7 +39,7 @@ exports[`CrowdsaleStartTime Rendering should render CrowdsaleStartTime component
|
|||
|
||||
exports[`CrowdsaleStartTime Rendering should render CrowdsaleStartTime component if field is disabled 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
|
|
@ -1231,7 +1231,7 @@ exports[`CrowdsaleList should render CrowdsaleList component 1`] = `
|
|||
status={null}
|
||||
>
|
||||
<button
|
||||
className="sw-ButtonContinue"
|
||||
className="sw-ButtonContinue "
|
||||
disabled={true}
|
||||
onClick={[Function]}
|
||||
>
|
||||
|
@ -2407,7 +2407,7 @@ exports[`CrowdsaleList should render if list is empty 1`] = `
|
|||
status={null}
|
||||
>
|
||||
<button
|
||||
className="sw-ButtonContinue"
|
||||
className="sw-ButtonContinue "
|
||||
disabled={true}
|
||||
onClick={[Function]}
|
||||
>
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
exports[`Error should render Error component 1`] = `
|
||||
<ReactFinalForm
|
||||
component={[Function]}
|
||||
errorStyle={
|
||||
Object {
|
||||
"color": "blue",
|
||||
|
@ -15,115 +14,5 @@ exports[`Error should render Error component 1`] = `
|
|||
name="errorName"
|
||||
onSubmit={[MockFunction]}
|
||||
validate={[Function]}
|
||||
>
|
||||
<Error
|
||||
__versions={
|
||||
Object {
|
||||
"final-form": "4.6.1",
|
||||
"react-final-form": "3.4.0",
|
||||
}
|
||||
}
|
||||
batch={[Function]}
|
||||
blur={[Function]}
|
||||
change={[Function]}
|
||||
dirty={false}
|
||||
dirtySinceLastSubmit={false}
|
||||
errorStyle={
|
||||
Object {
|
||||
"color": "blue",
|
||||
"fontSize": "24px",
|
||||
"fontWeight": "bold",
|
||||
"height": "10px",
|
||||
"width": "50%",
|
||||
}
|
||||
}
|
||||
errors={
|
||||
Object {
|
||||
"0": "F",
|
||||
"1": "I",
|
||||
"10": "/",
|
||||
"11": "f",
|
||||
"12": "o",
|
||||
"13": "r",
|
||||
"14": "m",
|
||||
"15": "-",
|
||||
"16": "e",
|
||||
"17": "r",
|
||||
"18": "r",
|
||||
"19": "o",
|
||||
"2": "N",
|
||||
"20": "r",
|
||||
"3": "A",
|
||||
"4": "L",
|
||||
"5": "_",
|
||||
"6": "F",
|
||||
"7": "O",
|
||||
"8": "R",
|
||||
"9": "M",
|
||||
"errorName": undefined,
|
||||
}
|
||||
}
|
||||
focus={[Function]}
|
||||
form={
|
||||
Object {
|
||||
"batch": [Function],
|
||||
"blur": [Function],
|
||||
"change": [Function],
|
||||
"focus": [Function],
|
||||
"getFieldState": [Function],
|
||||
"getRegisteredFields": [Function],
|
||||
"getState": [Function],
|
||||
"initialize": [Function],
|
||||
"isValidationPaused": [Function],
|
||||
"mutators": Object {},
|
||||
"pauseValidation": [Function],
|
||||
"registerField": [Function],
|
||||
"reset": [Function],
|
||||
"resumeValidation": [Function],
|
||||
"setConfig": [Function],
|
||||
"submit": [Function],
|
||||
"subscribe": [Function],
|
||||
}
|
||||
}
|
||||
handleSubmit={[Function]}
|
||||
hasSubmitErrors={false}
|
||||
hasValidationErrors={true}
|
||||
initialize={[Function]}
|
||||
invalid={true}
|
||||
mutators={Object {}}
|
||||
name="errorName"
|
||||
pristine={true}
|
||||
reset={[Function]}
|
||||
submitFailed={false}
|
||||
submitSucceeded={false}
|
||||
submitting={false}
|
||||
touched={
|
||||
Object {
|
||||
"errorName": false,
|
||||
}
|
||||
}
|
||||
valid={false}
|
||||
validating={false}
|
||||
values={Object {}}
|
||||
visited={
|
||||
Object {
|
||||
"errorName": false,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Field
|
||||
format={[Function]}
|
||||
name="errorName"
|
||||
parse={[Function]}
|
||||
render={[Function]}
|
||||
subscription={
|
||||
Object {
|
||||
"error": true,
|
||||
"pristine": true,
|
||||
"touched": true,
|
||||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</ReactFinalForm>
|
||||
/>
|
||||
`;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`MinCap should render MinCap component 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -32,7 +32,7 @@ exports[`MinCap should render MinCap component 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="text"
|
||||
placeholder="Enter here"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
|
@ -40,7 +40,7 @@ exports[`MinCap should render MinCap component 1`] = `
|
|||
|
||||
exports[`MinCap should render MinCap component if field is disabled 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -70,7 +70,7 @@ exports[`MinCap should render MinCap component if field is disabled 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="text"
|
||||
placeholder="Enter here"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -23,21 +23,15 @@ exports[`NumericInput Should render the component 1`] = `
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sw-NumericInput_InputAndButtonContainer"
|
||||
>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
onChange={[Function]}
|
||||
onKeyPress={[Function]}
|
||||
onPaste={[Function]}
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
<div
|
||||
className="sw-NumericInput_ButtonPlus"
|
||||
/>
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
onChange={[Function]}
|
||||
onKeyPress={[Function]}
|
||||
onPaste={[Function]}
|
||||
step="1"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`Should render the component 1`] = `
|
||||
<div
|
||||
className="sw-RadioInputField "
|
||||
className="sw-RadioInputField "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
|
|
@ -50,12 +50,12 @@ exports[`ReservedTokensInputBlock render should render the component for percent
|
|||
Reserved tokens
|
||||
</h2>
|
||||
<div
|
||||
className="sw-BorderedBlock sw-BorderedBlock-3Rows3Columns"
|
||||
className="sw-BorderedBlock sw-BorderedBlock-ReservedTokensWhitelistCapped"
|
||||
>
|
||||
<InputField
|
||||
description="Address where to send reserved tokens."
|
||||
errorMessage="The inserted address is invalid"
|
||||
extraClassName="sw-BorderedBlock_Row1Column1"
|
||||
extraClassName="sw-InputField-ReservedTokensAddress"
|
||||
name="Address"
|
||||
onChange={[Function]}
|
||||
placeholder="Enter here"
|
||||
|
@ -66,7 +66,7 @@ exports[`ReservedTokensInputBlock render should render the component for percent
|
|||
value=""
|
||||
>
|
||||
<div
|
||||
className="sw-InputField sw-BorderedBlock_Row1Column1"
|
||||
className="sw-InputField sw-InputField-ReservedTokensAddress"
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Address where to send reserved tokens."
|
||||
|
@ -111,7 +111,7 @@ exports[`ReservedTokensInputBlock render should render the component for percent
|
|||
</InputField>
|
||||
<RadioInputField
|
||||
description="Fixed amount or % of crowdsaled tokens. Will be deposited to the account after finalization of the crowdsale."
|
||||
extraClassName="sw-BorderedBlock_Row1Column2"
|
||||
extraClassName="sw-RadioInputField-ReservedTokensDimension"
|
||||
items={
|
||||
Array [
|
||||
Object {
|
||||
|
@ -129,7 +129,7 @@ exports[`ReservedTokensInputBlock render should render the component for percent
|
|||
title="Dimension"
|
||||
>
|
||||
<div
|
||||
className="sw-RadioInputField sw-BorderedBlock_Row1Column2"
|
||||
className="sw-RadioInputField sw-RadioInputField-ReservedTokensDimension"
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Fixed amount or % of crowdsaled tokens. Will be deposited to the account after finalization of the crowdsale."
|
||||
|
@ -197,52 +197,50 @@ exports[`ReservedTokensInputBlock render should render the component for percent
|
|||
</div>
|
||||
</div>
|
||||
</RadioInputField>
|
||||
<NumericInput
|
||||
acceptFloat={true}
|
||||
description="Value in percentage. Don't forget to click + button for each reserved token."
|
||||
dimension="percentage"
|
||||
errorMessage="Value must be positive"
|
||||
extraClassName="sw-BorderedBlock_Row1Column3"
|
||||
min={0}
|
||||
name="Value"
|
||||
onClick={[Function]}
|
||||
onValueUpdate={[Function]}
|
||||
placeholder="Enter here"
|
||||
pristine={true}
|
||||
title="Value"
|
||||
valid="VALIDATED"
|
||||
value=""
|
||||
<div
|
||||
className="sw-NumericInputAndButtonContainer sw-NumericInputAndButtonContainer-RerservedTokensValue"
|
||||
>
|
||||
<div
|
||||
className="sw-NumericInput sw-BorderedBlock_Row1Column3"
|
||||
<NumericInput
|
||||
acceptFloat={true}
|
||||
description="Value in percentage. Don't forget to click + button for each reserved token."
|
||||
dimension="percentage"
|
||||
errorMessage="Value must be positive"
|
||||
min={0}
|
||||
name="Value"
|
||||
onValueUpdate={[Function]}
|
||||
placeholder="Enter here"
|
||||
pristine={true}
|
||||
title="Value"
|
||||
valid="VALIDATED"
|
||||
value=""
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Value in percentage. Don't forget to click + button for each reserved token."
|
||||
title="Value"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Value
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Value in percentage. Don't forget to click + button for each reserved token.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</FormControlTitle>
|
||||
<div
|
||||
className="sw-NumericInput_InputAndButtonContainer"
|
||||
className="sw-NumericInput "
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Value in percentage. Don't forget to click + button for each reserved token."
|
||||
title="Value"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Value
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Value in percentage. Don't forget to click + button for each reserved token.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</FormControlTitle>
|
||||
<TextField
|
||||
id="Value"
|
||||
min="0"
|
||||
|
@ -261,80 +259,25 @@ exports[`ReservedTokensInputBlock render should render the component for percent
|
|||
onKeyPress={[Function]}
|
||||
onPaste={[Function]}
|
||||
placeholder="Enter here"
|
||||
step="1"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
</TextField>
|
||||
<div
|
||||
className="sw-NumericInput_ButtonPlus"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</NumericInput>
|
||||
<inject-_class-with-reservedTokenStore
|
||||
extraClassName="sw-BorderedBlock_Row2Column1"
|
||||
reservedTokenStore={
|
||||
ReservedTokenStore {
|
||||
"tokens": Array [],
|
||||
}
|
||||
}
|
||||
tokenStore={
|
||||
TokenStore {
|
||||
"decimals": undefined,
|
||||
"name": undefined,
|
||||
"reservedTokensInput": Object {},
|
||||
"supply": 0,
|
||||
"ticker": undefined,
|
||||
"validToken": Object {
|
||||
"decimals": "EMPTY",
|
||||
"name": "EMPTY",
|
||||
"ticker": "EMPTY",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<_class
|
||||
extraClassName="sw-BorderedBlock_Row2Column1"
|
||||
reservedTokenStore={
|
||||
ReservedTokenStore {
|
||||
"tokens": Array [],
|
||||
}
|
||||
}
|
||||
tokenStore={
|
||||
TokenStore {
|
||||
"decimals": undefined,
|
||||
"name": undefined,
|
||||
"reservedTokensInput": Object {},
|
||||
"supply": 0,
|
||||
"ticker": undefined,
|
||||
"validToken": Object {
|
||||
"decimals": "EMPTY",
|
||||
"name": "EMPTY",
|
||||
"ticker": "EMPTY",
|
||||
},
|
||||
}
|
||||
}
|
||||
</NumericInput>
|
||||
<ButtonPlus
|
||||
onClick={[Function]}
|
||||
>
|
||||
<div
|
||||
className="sw-ReservedTokensTable sw-BorderedBlock_Row2Column1"
|
||||
>
|
||||
<div
|
||||
className="sw-ReservedTokensTable_Inner"
|
||||
>
|
||||
<table
|
||||
cellPadding="0"
|
||||
cellSpacing="0"
|
||||
className="sw-ReservedTokensTable_Table"
|
||||
>
|
||||
<tbody />
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</_class>
|
||||
</inject-_class-with-reservedTokenStore>
|
||||
<button
|
||||
className="sw-ButtonPlus "
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
/>
|
||||
</ButtonPlus>
|
||||
</div>
|
||||
<div
|
||||
className="sw-ReservedTokensListControls sw-BorderedBlock_Row3Column1"
|
||||
className="sw-ReservedTokensListControls"
|
||||
>
|
||||
<Component
|
||||
accept=".csv"
|
||||
|
@ -345,12 +288,19 @@ exports[`ReservedTokensInputBlock render should render the component for percent
|
|||
Dropzone
|
||||
</span>
|
||||
</Component>
|
||||
<div
|
||||
className="sw-ReservedTokensListControls_Button sw-ReservedTokensListControls_Button-downloadcsv m-r-0"
|
||||
<ButtonCSV
|
||||
extraClassName="sw-ButtonCSV-downloadcsv m-r-0"
|
||||
onClick={[Function]}
|
||||
text="Download CSV template"
|
||||
>
|
||||
Download CSV template
|
||||
</div>
|
||||
<button
|
||||
className="sw-ButtonCSV sw-ButtonCSV-downloadcsv m-r-0"
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
>
|
||||
Download CSV template
|
||||
</button>
|
||||
</ButtonCSV>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -408,12 +358,12 @@ exports[`ReservedTokensInputBlock render should render the component for tokens:
|
|||
Reserved tokens
|
||||
</h2>
|
||||
<div
|
||||
className="sw-BorderedBlock sw-BorderedBlock-3Rows3Columns"
|
||||
className="sw-BorderedBlock sw-BorderedBlock-ReservedTokensWhitelistCapped"
|
||||
>
|
||||
<InputField
|
||||
description="Address where to send reserved tokens."
|
||||
errorMessage="The inserted address is invalid"
|
||||
extraClassName="sw-BorderedBlock_Row1Column1"
|
||||
extraClassName="sw-InputField-ReservedTokensAddress"
|
||||
name="Address"
|
||||
onChange={[Function]}
|
||||
placeholder="Enter here"
|
||||
|
@ -424,7 +374,7 @@ exports[`ReservedTokensInputBlock render should render the component for tokens:
|
|||
value=""
|
||||
>
|
||||
<div
|
||||
className="sw-InputField sw-BorderedBlock_Row1Column1"
|
||||
className="sw-InputField sw-InputField-ReservedTokensAddress"
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Address where to send reserved tokens."
|
||||
|
@ -469,7 +419,7 @@ exports[`ReservedTokensInputBlock render should render the component for tokens:
|
|||
</InputField>
|
||||
<RadioInputField
|
||||
description="Fixed amount or % of crowdsaled tokens. Will be deposited to the account after finalization of the crowdsale."
|
||||
extraClassName="sw-BorderedBlock_Row1Column2"
|
||||
extraClassName="sw-RadioInputField-ReservedTokensDimension"
|
||||
items={
|
||||
Array [
|
||||
Object {
|
||||
|
@ -487,7 +437,7 @@ exports[`ReservedTokensInputBlock render should render the component for tokens:
|
|||
title="Dimension"
|
||||
>
|
||||
<div
|
||||
className="sw-RadioInputField sw-BorderedBlock_Row1Column2"
|
||||
className="sw-RadioInputField sw-RadioInputField-ReservedTokensDimension"
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Fixed amount or % of crowdsaled tokens. Will be deposited to the account after finalization of the crowdsale."
|
||||
|
@ -555,53 +505,51 @@ exports[`ReservedTokensInputBlock render should render the component for tokens:
|
|||
</div>
|
||||
</div>
|
||||
</RadioInputField>
|
||||
<NumericInput
|
||||
acceptFloat={true}
|
||||
description="Value in tokens. Don't forget to click + button for each reserved token."
|
||||
dimension="tokens"
|
||||
errorMessage="Value must be positive and decimals should not exceed the amount of decimals specified"
|
||||
extraClassName="sw-BorderedBlock_Row1Column3"
|
||||
maxDecimals={0}
|
||||
min={0}
|
||||
name="Value"
|
||||
onClick={[Function]}
|
||||
onValueUpdate={[Function]}
|
||||
placeholder="Enter here"
|
||||
pristine={true}
|
||||
title="Value"
|
||||
valid="INVALID"
|
||||
value=""
|
||||
<div
|
||||
className="sw-NumericInputAndButtonContainer sw-NumericInputAndButtonContainer-RerservedTokensValue"
|
||||
>
|
||||
<div
|
||||
className="sw-NumericInput sw-BorderedBlock_Row1Column3"
|
||||
<NumericInput
|
||||
acceptFloat={true}
|
||||
description="Value in tokens. Don't forget to click + button for each reserved token."
|
||||
dimension="tokens"
|
||||
errorMessage="Value must be positive and decimals should not exceed the amount of decimals specified"
|
||||
maxDecimals={0}
|
||||
min={0}
|
||||
name="Value"
|
||||
onValueUpdate={[Function]}
|
||||
placeholder="Enter here"
|
||||
pristine={true}
|
||||
title="Value"
|
||||
valid="INVALID"
|
||||
value=""
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Value in tokens. Don't forget to click + button for each reserved token."
|
||||
title="Value"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Value
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Value in tokens. Don't forget to click + button for each reserved token.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</FormControlTitle>
|
||||
<div
|
||||
className="sw-NumericInput_InputAndButtonContainer"
|
||||
className="sw-NumericInput "
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Value in tokens. Don't forget to click + button for each reserved token."
|
||||
title="Value"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Value
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Value in tokens. Don't forget to click + button for each reserved token.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</FormControlTitle>
|
||||
<TextField
|
||||
id="Value"
|
||||
min="1"
|
||||
|
@ -620,80 +568,25 @@ exports[`ReservedTokensInputBlock render should render the component for tokens:
|
|||
onKeyPress={[Function]}
|
||||
onPaste={[Function]}
|
||||
placeholder="Enter here"
|
||||
step="1"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
</TextField>
|
||||
<div
|
||||
className="sw-NumericInput_ButtonPlus"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</NumericInput>
|
||||
<inject-_class-with-reservedTokenStore
|
||||
extraClassName="sw-BorderedBlock_Row2Column1"
|
||||
reservedTokenStore={
|
||||
ReservedTokenStore {
|
||||
"tokens": Array [],
|
||||
}
|
||||
}
|
||||
tokenStore={
|
||||
TokenStore {
|
||||
"decimals": undefined,
|
||||
"name": undefined,
|
||||
"reservedTokensInput": Object {},
|
||||
"supply": 0,
|
||||
"ticker": undefined,
|
||||
"validToken": Object {
|
||||
"decimals": "EMPTY",
|
||||
"name": "EMPTY",
|
||||
"ticker": "EMPTY",
|
||||
},
|
||||
}
|
||||
}
|
||||
>
|
||||
<_class
|
||||
extraClassName="sw-BorderedBlock_Row2Column1"
|
||||
reservedTokenStore={
|
||||
ReservedTokenStore {
|
||||
"tokens": Array [],
|
||||
}
|
||||
}
|
||||
tokenStore={
|
||||
TokenStore {
|
||||
"decimals": undefined,
|
||||
"name": undefined,
|
||||
"reservedTokensInput": Object {},
|
||||
"supply": 0,
|
||||
"ticker": undefined,
|
||||
"validToken": Object {
|
||||
"decimals": "EMPTY",
|
||||
"name": "EMPTY",
|
||||
"ticker": "EMPTY",
|
||||
},
|
||||
}
|
||||
}
|
||||
</NumericInput>
|
||||
<ButtonPlus
|
||||
onClick={[Function]}
|
||||
>
|
||||
<div
|
||||
className="sw-ReservedTokensTable sw-BorderedBlock_Row2Column1"
|
||||
>
|
||||
<div
|
||||
className="sw-ReservedTokensTable_Inner"
|
||||
>
|
||||
<table
|
||||
cellPadding="0"
|
||||
cellSpacing="0"
|
||||
className="sw-ReservedTokensTable_Table"
|
||||
>
|
||||
<tbody />
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</_class>
|
||||
</inject-_class-with-reservedTokenStore>
|
||||
<button
|
||||
className="sw-ButtonPlus "
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
/>
|
||||
</ButtonPlus>
|
||||
</div>
|
||||
<div
|
||||
className="sw-ReservedTokensListControls sw-BorderedBlock_Row3Column1"
|
||||
className="sw-ReservedTokensListControls"
|
||||
>
|
||||
<Component
|
||||
accept=".csv"
|
||||
|
@ -704,12 +597,19 @@ exports[`ReservedTokensInputBlock render should render the component for tokens:
|
|||
Dropzone
|
||||
</span>
|
||||
</Component>
|
||||
<div
|
||||
className="sw-ReservedTokensListControls_Button sw-ReservedTokensListControls_Button-downloadcsv m-r-0"
|
||||
<ButtonCSV
|
||||
extraClassName="sw-ButtonCSV-downloadcsv m-r-0"
|
||||
onClick={[Function]}
|
||||
text="Download CSV template"
|
||||
>
|
||||
Download CSV template
|
||||
</div>
|
||||
<button
|
||||
className="sw-ButtonCSV sw-ButtonCSV-downloadcsv m-r-0"
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
>
|
||||
Download CSV template
|
||||
</button>
|
||||
</ButtonCSV>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`Supply should render Supply component 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -28,6 +28,7 @@ exports[`Supply should render Supply component 1`] = `
|
|||
disabled={false}
|
||||
id="Supply"
|
||||
name="Supply"
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="1234"
|
||||
/>
|
||||
|
|
|
@ -1,337 +1,349 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`TierBlock should render TierBlock component 1`] = `
|
||||
<div>
|
||||
<div
|
||||
className="sw-TierBlock"
|
||||
>
|
||||
<div
|
||||
className="steps-content container"
|
||||
style={
|
||||
Object {
|
||||
"marginTop": "40px",
|
||||
}
|
||||
}
|
||||
className="sw-BorderedBlock sw-BorderedBlock-TierBlocksWhitelistCapped"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
className="sw-InputField2 sw-InputField2-TierSetupName"
|
||||
>
|
||||
<div
|
||||
className="input-block-container"
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
Tier setup name
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Crowdsale setup name
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Name of a tier, e.g. PrePreCrowdsale, PreCrowdsale, Crowdsale with bonus A, Crowdsale with bonus B, etc. We simplified that and will increment a number after each tier.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
id="tierblock,0.tier"
|
||||
name="tierblock,0.tier"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
Name of a tier, e.g. PrePreCrowdsale, PreCrowdsale, Crowdsale with bonus A, Crowdsale with bonus B, etc. We simplified that and will increment a number after each tier.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
id="tierblock,0.tier"
|
||||
name="tierblock,0.tier"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField2 sw-InputField2-CrowdsaleStartTime"
|
||||
>
|
||||
<div
|
||||
className="input-block-container"
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<div
|
||||
className="left"
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
<label
|
||||
className="label"
|
||||
Start Time
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Allow modifying
|
||||
</label>
|
||||
<div
|
||||
className="radios-inline"
|
||||
>
|
||||
<label
|
||||
className="radio-inline"
|
||||
>
|
||||
<input
|
||||
checked={false}
|
||||
id="tierblock,0.allow_modifying_on"
|
||||
onChange={[Function]}
|
||||
type="radio"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
className="title"
|
||||
>
|
||||
on
|
||||
</span>
|
||||
</label>
|
||||
<label
|
||||
className="radio-inline"
|
||||
>
|
||||
<input
|
||||
checked={false}
|
||||
id="tierblock,0.allow_modifying_off"
|
||||
onChange={[Function]}
|
||||
type="radio"
|
||||
value="off"
|
||||
/>
|
||||
<span
|
||||
className="title"
|
||||
>
|
||||
off
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<p
|
||||
className="description"
|
||||
>
|
||||
If it's enabled, a creator of the crowdsale can modify crowdsale duration after publishing.
|
||||
</p>
|
||||
Date and time when the tier starts. Can't be in the past from the current moment.
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
className="right"
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
disabled={false}
|
||||
id="tierblock,0.startTime"
|
||||
name="tierblock,0.startTime"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="datetime-local"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField2 sw-InputField2-CrowdsaleEndTime"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
<label
|
||||
className="label"
|
||||
End Time
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Enable whitelisting
|
||||
</label>
|
||||
<div
|
||||
className="radios-inline"
|
||||
Date and time when the tier ends. Can be only in the future.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
id="tierblock,0.endTime"
|
||||
name="tierblock,0.endTime"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="datetime-local"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField2 sw-InputField2-CrowdsaleRate"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Rate
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
<label
|
||||
className="radio-inline"
|
||||
>
|
||||
<input
|
||||
checked={false}
|
||||
id="tierblock,0.enable_whitelisting_yes"
|
||||
onChange={[Function]}
|
||||
type="radio"
|
||||
value="yes"
|
||||
/>
|
||||
<span
|
||||
className="title"
|
||||
>
|
||||
yes
|
||||
</span>
|
||||
</label>
|
||||
<label
|
||||
className="radio-inline"
|
||||
>
|
||||
<input
|
||||
checked={false}
|
||||
id="tierblock,0.enable_whitelisting_no"
|
||||
onChange={[Function]}
|
||||
type="radio"
|
||||
value="no"
|
||||
/>
|
||||
<span
|
||||
className="title"
|
||||
>
|
||||
no
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<p
|
||||
className="description"
|
||||
Exchange rate Ethereum to Tokens. If it's 100, then for 1 Ether you can buy 100 tokens
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
id="tierblock,0.rate"
|
||||
max="1000000000000000000"
|
||||
min="0"
|
||||
name="tierblock,0.rate"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField2 sw-InputField2-CrowdsaleSupply"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Supply
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
How many tokens will be sold on this tier. Cap of crowdsale equals to sum of supply of all tiers
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
disabled={false}
|
||||
id="tierblock,0.supply"
|
||||
min="0"
|
||||
name="tierblock,0.supply"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField2 sw-InputField2-MinCap"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Contributor min cap
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Minimum amount of tokens to buy. Not the minimal amount for every transaction: if minCap is 1
|
||||
and a user already has 1 token from a previous transaction, they can buy any amount they want.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
disabled={false}
|
||||
id="tierblock,0.minCap"
|
||||
max=""
|
||||
min="0"
|
||||
name="tierblock,0.minCap"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-RadioButton sw-InputField2-WhitelistEnabled"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Enable whitelisting
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Enables whitelisting. If disabled, anyone can participate in the crowdsale.
|
||||
</p>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="input-block-container"
|
||||
className="sw-RadioButton_Container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
<label
|
||||
className="sw-RadioButton_Label"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Start Time
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Date and time when the tier starts. Can't be in the past from the current moment.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
disabled={false}
|
||||
id="tierblock,0.startTime"
|
||||
name="tierblock,0.startTime"
|
||||
onBlur={[Function]}
|
||||
checked={false}
|
||||
className="sw-RadioButton_Input"
|
||||
disabled={true}
|
||||
id="tierblock,0.whitelistEnabled.enable_whitelisting_yes"
|
||||
name="tierblock,0.whitelistEnabled"
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="datetime-local"
|
||||
value=""
|
||||
type="radio"
|
||||
value="yes"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
<span
|
||||
className="sw-RadioButton_Button"
|
||||
>
|
||||
Yes
|
||||
</span>
|
||||
</label>
|
||||
<label
|
||||
className="sw-RadioButton_Label"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
End Time
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Date and time when the tier ends. Can be only in the future.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
id="tierblock,0.endTime"
|
||||
name="tierblock,0.endTime"
|
||||
onBlur={[Function]}
|
||||
checked={true}
|
||||
className="sw-RadioButton_Input"
|
||||
disabled={true}
|
||||
id="tierblock,0.whitelistEnabled.enable_whitelisting_no"
|
||||
name="tierblock,0.whitelistEnabled"
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="datetime-local"
|
||||
value=""
|
||||
type="radio"
|
||||
value="no"
|
||||
/>
|
||||
<span
|
||||
className="sw-RadioButton_Button"
|
||||
>
|
||||
No
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sw-RadioButton sw-InputField2-AllowModifying"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Allow modifying
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
If it's enabled, a creator of the crowdsale can modify crowdsale duration after publishing.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="input-block-container"
|
||||
className="sw-RadioButton_Container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
<label
|
||||
className="sw-RadioButton_Label"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Rate
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Exchange rate Ethereum to Tokens. If it's 100, then for 1 Ether you can buy 100 tokens
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
id="tierblock,0.rate"
|
||||
name="tierblock,0.rate"
|
||||
onBlur={[Function]}
|
||||
checked={false}
|
||||
className="sw-RadioButton_Input"
|
||||
id="tierblock,0.updatable.allow_modifying_on"
|
||||
name="tierblock,0.updatable"
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="text"
|
||||
value=""
|
||||
type="radio"
|
||||
value="on"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
<span
|
||||
className="sw-RadioButton_Button"
|
||||
>
|
||||
Yes
|
||||
</span>
|
||||
</label>
|
||||
<label
|
||||
className="sw-RadioButton_Label"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Supply
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
How many tokens will be sold on this tier. Cap of crowdsale equals to sum of supply of all tiers
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
disabled={false}
|
||||
id="tierblock,0.supply"
|
||||
name="tierblock,0.supply"
|
||||
onBlur={[Function]}
|
||||
checked={false}
|
||||
className="sw-RadioButton_Input"
|
||||
id="tierblock,0.updatable.allow_modifying_off"
|
||||
name="tierblock,0.updatable"
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="text"
|
||||
value=""
|
||||
type="radio"
|
||||
value="off"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
<span
|
||||
className="sw-RadioButton_Button"
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Contributor min cap
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Minimum amount of tokens to buy. Not the minimal amount for every transaction: if minCap is 1
|
||||
and a user already has 1 token from a previous transaction, they can buy any amount they want.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
disabled={false}
|
||||
id="tierblock,0.minCap"
|
||||
name="tierblock,0.minCap"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
No
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`TokenDecimals should render TokenDecimals component 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -32,6 +32,7 @@ exports[`TokenDecimals should render TokenDecimals component 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
|
@ -40,7 +41,7 @@ exports[`TokenDecimals should render TokenDecimals component 1`] = `
|
|||
|
||||
exports[`TokenDecimals should render TokenDecimals component and its children 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -70,6 +71,7 @@ exports[`TokenDecimals should render TokenDecimals component and its children 1`
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
|
@ -163,30 +165,19 @@ exports[`TokenDecimals should render TokenDecimals component and its children, w
|
|||
component={[Function]}
|
||||
description="Refers to how divisible a token can be, from 0 (not at all divisible) to 18 (pretty much continuous)."
|
||||
disabled={true}
|
||||
errorStyle={
|
||||
Object {
|
||||
"color": "red",
|
||||
"fontWeight": "bold",
|
||||
}
|
||||
}
|
||||
format={[Function]}
|
||||
label="Decimals"
|
||||
max="18"
|
||||
min="0"
|
||||
name="decimals"
|
||||
parse={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
validate={[Function]}
|
||||
>
|
||||
<InputField2
|
||||
description="Refers to how divisible a token can be, from 0 (not at all divisible) to 18 (pretty much continuous)."
|
||||
disabled={true}
|
||||
errorStyle={
|
||||
Object {
|
||||
"color": "red",
|
||||
"fontWeight": "bold",
|
||||
}
|
||||
}
|
||||
input={
|
||||
Object {
|
||||
"name": "decimals",
|
||||
|
@ -217,10 +208,11 @@ exports[`TokenDecimals should render TokenDecimals component and its children, w
|
|||
}
|
||||
}
|
||||
min="0"
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Refers to how divisible a token can be, from 0 (not at all divisible) to 18 (pretty much continuous)."
|
||||
|
@ -257,6 +249,7 @@ exports[`TokenDecimals should render TokenDecimals component and its children, w
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
>
|
||||
|
@ -270,11 +263,12 @@ exports[`TokenDecimals should render TokenDecimals component and its children, w
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="decimals"
|
||||
>
|
||||
<Field
|
||||
|
@ -290,7 +284,7 @@ exports[`TokenDecimals should render TokenDecimals component and its children, w
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`TokenName should render TokenName component 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -30,6 +30,7 @@ exports[`TokenName should render TokenName component 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
|
@ -38,7 +39,7 @@ exports[`TokenName should render TokenName component 1`] = `
|
|||
|
||||
exports[`TokenName should render TokenName component and its children 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -66,6 +67,7 @@ exports[`TokenName should render TokenName component and its children 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`TokenSupply should render TokenDecimals component 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -26,11 +26,13 @@ exports[`TokenSupply should render TokenDecimals component 1`] = `
|
|||
<input
|
||||
className="sw-TextField"
|
||||
id="supply"
|
||||
min="0"
|
||||
name="supply"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="text"
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
|
@ -38,7 +40,7 @@ exports[`TokenSupply should render TokenDecimals component 1`] = `
|
|||
|
||||
exports[`TokenSupply should render TokenSupply component and its children 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -62,11 +64,13 @@ exports[`TokenSupply should render TokenSupply component and its children 1`] =
|
|||
<input
|
||||
className="sw-TextField"
|
||||
id="supply"
|
||||
min="0"
|
||||
name="supply"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="text"
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
|
@ -160,10 +164,11 @@ exports[`TokenSupply should render TokenSupply component and its children, with
|
|||
description="The total supply of the token"
|
||||
format={[Function]}
|
||||
label="Supply"
|
||||
min="0"
|
||||
name="supply"
|
||||
parse={[Function]}
|
||||
side="right"
|
||||
type="text"
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
validate={[Function]}
|
||||
>
|
||||
<InputField2
|
||||
|
@ -196,11 +201,12 @@ exports[`TokenSupply should render TokenSupply component and its children, with
|
|||
"visited": false,
|
||||
}
|
||||
}
|
||||
side="right"
|
||||
type="text"
|
||||
min="0"
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle
|
||||
description="The total supply of the token"
|
||||
|
@ -230,25 +236,29 @@ exports[`TokenSupply should render TokenSupply component and its children, with
|
|||
autoComplete="off"
|
||||
className="input"
|
||||
id="supply"
|
||||
min="0"
|
||||
name="supply"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="text"
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
id="supply"
|
||||
min="0"
|
||||
name="supply"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="text"
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="supply"
|
||||
>
|
||||
<Field
|
||||
|
@ -264,7 +274,7 @@ exports[`TokenSupply should render TokenSupply component and its children, with
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`TokenTicker should render TokenTicker component 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -30,6 +30,7 @@ exports[`TokenTicker should render TokenTicker component 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
|
@ -38,7 +39,7 @@ exports[`TokenTicker should render TokenTicker component 1`] = `
|
|||
|
||||
exports[`TokenTicker should render TokenTicker component and its children 1`] = `
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -66,6 +67,7 @@ exports[`TokenTicker should render TokenTicker component and its children 1`] =
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
|
|
|
@ -23,7 +23,7 @@ exports[`Crowdsales should render screen 1`] = `
|
|||
className="sw-ModalWindow_ButtonsContainer sw-ModalWindow_ButtonsContainer-right"
|
||||
>
|
||||
<button
|
||||
className="sw-ButtonContinue"
|
||||
className="sw-ButtonContinue "
|
||||
disabled={true}
|
||||
onClick={[Function]}
|
||||
>
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
import React from 'react'
|
||||
import { Footer } from '../../../src/components/Footer/index'
|
||||
import Adapter from 'enzyme-adapter-react-15'
|
||||
import { configure, mount, shallow } from 'enzyme'
|
||||
import { displayHeaderAndFooterInIframe } from '../../../src/utils/utils'
|
||||
|
||||
const mockTrue = { displayHeaderAndFooterInIframe: true }
|
||||
const mockFalse = { displayHeaderAndFooterInIframe: false }
|
||||
|
||||
//const displayHeaderAndFooterInIframe = require('../../../src/utils/utils').displayHeaderAndFooterInIframe
|
||||
configure({ adapter: new Adapter() })
|
||||
|
||||
describe('Footer ', () => {
|
||||
|
||||
it(`should render Footer component`, () => {
|
||||
jest.mock('../../../src/utils/utils', () => mockTrue)
|
||||
const wrapper = shallow(
|
||||
<Footer
|
||||
|
||||
/>
|
||||
)
|
||||
expect(wrapper).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it(`should return null`, () => {
|
||||
let a = jest.mock('../../../src/utils/utils', () => mockFalse)
|
||||
|
||||
const wrapper = shallow(
|
||||
<Footer
|
||||
|
||||
/>
|
||||
)
|
||||
expect(wrapper).toMatchSnapshot()
|
||||
})
|
||||
})
|
|
@ -1,101 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Footer should render Footer component 1`] = `
|
||||
<footer
|
||||
className="footer"
|
||||
>
|
||||
<div
|
||||
className="container"
|
||||
>
|
||||
<p
|
||||
className="rights"
|
||||
>
|
||||
2018
|
||||
POA Network. All rights reserved.
|
||||
</p>
|
||||
<Link
|
||||
className="logo"
|
||||
replace={false}
|
||||
to="/"
|
||||
/>
|
||||
<div
|
||||
className="socials"
|
||||
>
|
||||
<a
|
||||
className="social social_twitter"
|
||||
href="https://twitter.com/poanetwork"
|
||||
>
|
||||
Twitter
|
||||
</a>
|
||||
<a
|
||||
className="social social_oracles"
|
||||
href="https://poa.network"
|
||||
>
|
||||
POA Network
|
||||
</a>
|
||||
<a
|
||||
className="social social_telegram"
|
||||
href="https://t.me/oraclesnetwork"
|
||||
>
|
||||
Telegram
|
||||
</a>
|
||||
<a
|
||||
className="social social_github"
|
||||
href="https://github.com/poanetwork/"
|
||||
>
|
||||
GitHub
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
`;
|
||||
|
||||
exports[`Footer should return null 1`] = `
|
||||
<footer
|
||||
className="footer"
|
||||
>
|
||||
<div
|
||||
className="container"
|
||||
>
|
||||
<p
|
||||
className="rights"
|
||||
>
|
||||
2018
|
||||
POA Network. All rights reserved.
|
||||
</p>
|
||||
<Link
|
||||
className="logo"
|
||||
replace={false}
|
||||
to="/"
|
||||
/>
|
||||
<div
|
||||
className="socials"
|
||||
>
|
||||
<a
|
||||
className="social social_twitter"
|
||||
href="https://twitter.com/poanetwork"
|
||||
>
|
||||
Twitter
|
||||
</a>
|
||||
<a
|
||||
className="social social_oracles"
|
||||
href="https://poa.network"
|
||||
>
|
||||
POA Network
|
||||
</a>
|
||||
<a
|
||||
className="social social_telegram"
|
||||
href="https://t.me/oraclesnetwork"
|
||||
>
|
||||
Telegram
|
||||
</a>
|
||||
<a
|
||||
className="social social_github"
|
||||
href="https://github.com/poanetwork/"
|
||||
>
|
||||
GitHub
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
`;
|
|
@ -1,33 +0,0 @@
|
|||
import React from 'react'
|
||||
import { Header } from '../../../src/components/Header/index'
|
||||
import Adapter from 'enzyme-adapter-react-15'
|
||||
import { configure, mount, shallow } from 'enzyme'
|
||||
const displayHeaderAndFooterInIframe = require('../../../src/utils/utils').displayHeaderAndFooterInIframe
|
||||
const mockTrue = { displayHeaderAndFooterInIframe: true }
|
||||
const mockFalse = { displayHeaderAndFooterInIframe: false }
|
||||
|
||||
configure({ adapter: new Adapter() })
|
||||
|
||||
describe('Header ', () => {
|
||||
|
||||
it(`should render Footer component`, () => {
|
||||
jest.mock('../../../src/utils/utils', () => mockTrue)
|
||||
const wrapper = shallow(
|
||||
<Header
|
||||
|
||||
/>
|
||||
)
|
||||
expect(wrapper).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it(`should return null`, () => {
|
||||
jest.mock('../../../src/utils/utils', () => mockFalse)
|
||||
|
||||
const wrapper = shallow(
|
||||
<Header
|
||||
|
||||
/>
|
||||
)
|
||||
expect(wrapper).toMatchSnapshot()
|
||||
})
|
||||
})
|
|
@ -1,33 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Header should render Footer component 1`] = `
|
||||
<header
|
||||
className="header"
|
||||
>
|
||||
<div
|
||||
className="container"
|
||||
>
|
||||
<Link
|
||||
className="logo"
|
||||
replace={false}
|
||||
to="/"
|
||||
/>
|
||||
</div>
|
||||
</header>
|
||||
`;
|
||||
|
||||
exports[`Header should return null 1`] = `
|
||||
<header
|
||||
className="header"
|
||||
>
|
||||
<div
|
||||
className="container"
|
||||
>
|
||||
<Link
|
||||
className="logo"
|
||||
replace={false}
|
||||
to="/"
|
||||
/>
|
||||
</div>
|
||||
</header>
|
||||
`;
|
|
@ -195,7 +195,7 @@ exports[`StepOne should render StepOne screen 1`] = `
|
|||
className="st-StepContent_Buttons"
|
||||
>
|
||||
<button
|
||||
className="sw-ButtonContinue"
|
||||
className="sw-ButtonContinue "
|
||||
disabled={false}
|
||||
onClick={[Function]}
|
||||
>
|
||||
|
|
|
@ -7,10 +7,10 @@ exports[`StepTwoForm should render StepTwoForm for Dutch Auction Crowdsale 1`] =
|
|||
onSubmit={[Function]}
|
||||
>
|
||||
<div
|
||||
className="sw-BorderedBlock sw-BorderedBlock-2Rows2Columns"
|
||||
className="sw-BorderedBlock sw-BorderedBlock-GeneralSettingsDutchAuction"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -38,12 +38,13 @@ exports[`StepTwoForm should render StepTwoForm for Dutch Auction Crowdsale 1`] =
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="This is a valid name"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -71,12 +72,13 @@ exports[`StepTwoForm should render StepTwoForm for Dutch Auction Crowdsale 1`] =
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="TTK"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -107,12 +109,13 @@ exports[`StepTwoForm should render StepTwoForm for Dutch Auction Crowdsale 1`] =
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value="14"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -136,11 +139,13 @@ exports[`StepTwoForm should render StepTwoForm for Dutch Auction Crowdsale 1`] =
|
|||
<input
|
||||
className="sw-TextField"
|
||||
id="supply"
|
||||
min="0"
|
||||
name="supply"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="text"
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
|
@ -149,14 +154,14 @@ exports[`StepTwoForm should render StepTwoForm for Dutch Auction Crowdsale 1`] =
|
|||
className="st-StepContent_Buttons"
|
||||
>
|
||||
<button
|
||||
className="sw-ButtonBack"
|
||||
className="sw-ButtonBack "
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
>
|
||||
Back
|
||||
</button>
|
||||
<button
|
||||
className="sw-ButtonContinue"
|
||||
className="sw-ButtonContinue "
|
||||
disabled={true}
|
||||
type="submit"
|
||||
>
|
||||
|
@ -177,10 +182,10 @@ exports[`StepTwoForm should render StepTwoForm for Minted Capped Crowdsale 1`] =
|
|||
onSubmit={[Function]}
|
||||
>
|
||||
<div
|
||||
className="sw-BorderedBlock sw-BorderedBlock-3Columns"
|
||||
className="sw-BorderedBlock sw-BorderedBlock-GeneralSettingsWhitelistCapped"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -208,12 +213,13 @@ exports[`StepTwoForm should render StepTwoForm for Minted Capped Crowdsale 1`] =
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="This is a valid name"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -241,12 +247,13 @@ exports[`StepTwoForm should render StepTwoForm for Minted Capped Crowdsale 1`] =
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="TTK"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -277,6 +284,7 @@ exports[`StepTwoForm should render StepTwoForm for Minted Capped Crowdsale 1`] =
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value="14"
|
||||
/>
|
||||
|
@ -289,10 +297,10 @@ exports[`StepTwoForm should render StepTwoForm for Minted Capped Crowdsale 1`] =
|
|||
Reserved tokens
|
||||
</h2>
|
||||
<div
|
||||
className="sw-BorderedBlock sw-BorderedBlock-3Rows3Columns"
|
||||
className="sw-BorderedBlock sw-BorderedBlock-ReservedTokensWhitelistCapped"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField sw-BorderedBlock_Row1Column1"
|
||||
className="sw-InputField sw-InputField-ReservedTokensAddress"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -323,7 +331,7 @@ exports[`StepTwoForm should render StepTwoForm for Minted Capped Crowdsale 1`] =
|
|||
|
||||
</div>
|
||||
<div
|
||||
className="sw-RadioInputField sw-BorderedBlock_Row1Column2"
|
||||
className="sw-RadioInputField sw-RadioInputField-ReservedTokensDimension"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -384,30 +392,30 @@ exports[`StepTwoForm should render StepTwoForm for Minted Capped Crowdsale 1`] =
|
|||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sw-NumericInput sw-BorderedBlock_Row1Column3"
|
||||
className="sw-NumericInputAndButtonContainer sw-NumericInputAndButtonContainer-RerservedTokensValue"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
className="sw-NumericInput "
|
||||
>
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Value
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
className="sw-FormControlTitle"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Value in tokens. Don't forget to click + button for each reserved token.
|
||||
</span>
|
||||
Value
|
||||
</label>
|
||||
<div
|
||||
className="sw-FormControlTitle_Info"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<span
|
||||
className="sw-FormControlTitle_Tooltip"
|
||||
>
|
||||
Value in tokens. Don't forget to click + button for each reserved token.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sw-NumericInput_InputAndButtonContainer"
|
||||
>
|
||||
<input
|
||||
className="sw-TextField"
|
||||
min="0.00000000000001"
|
||||
|
@ -415,43 +423,31 @@ exports[`StepTwoForm should render StepTwoForm for Minted Capped Crowdsale 1`] =
|
|||
onKeyPress={[Function]}
|
||||
onPaste={[Function]}
|
||||
placeholder="Enter here"
|
||||
step="1"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
<div
|
||||
className="sw-NumericInput_ButtonPlus"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<button
|
||||
className="sw-ButtonPlus "
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-ReservedTokensTable sw-BorderedBlock_Row2Column1"
|
||||
>
|
||||
<div
|
||||
className="sw-ReservedTokensTable_Inner"
|
||||
>
|
||||
<table
|
||||
cellPadding="0"
|
||||
cellSpacing="0"
|
||||
className="sw-ReservedTokensTable_Table"
|
||||
>
|
||||
<tbody />
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sw-ReservedTokensListControls sw-BorderedBlock_Row3Column1"
|
||||
className="sw-ReservedTokensListControls"
|
||||
>
|
||||
<span>
|
||||
Dropzone
|
||||
</span>
|
||||
<div
|
||||
className="sw-ReservedTokensListControls_Button sw-ReservedTokensListControls_Button-downloadcsv m-r-0"
|
||||
<button
|
||||
className="sw-ButtonCSV sw-ButtonCSV-downloadcsv m-r-0"
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
>
|
||||
Download CSV template
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -459,14 +455,14 @@ exports[`StepTwoForm should render StepTwoForm for Minted Capped Crowdsale 1`] =
|
|||
className="st-StepContent_Buttons"
|
||||
>
|
||||
<button
|
||||
className="sw-ButtonBack"
|
||||
className="sw-ButtonBack "
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
>
|
||||
Back
|
||||
</button>
|
||||
<button
|
||||
className="sw-ButtonContinue"
|
||||
className="sw-ButtonContinue "
|
||||
disabled={false}
|
||||
type="submit"
|
||||
>
|
||||
|
|
|
@ -125,10 +125,10 @@ exports[`StepTwo should render StepTwo for Dutch Auction strategy 1`] = `
|
|||
onSubmit={[Function]}
|
||||
>
|
||||
<div
|
||||
className="sw-BorderedBlock sw-BorderedBlock-2Rows2Columns"
|
||||
className="sw-BorderedBlock sw-BorderedBlock-GeneralSettingsDutchAuction"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -156,12 +156,13 @@ exports[`StepTwo should render StepTwo for Dutch Auction strategy 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -189,12 +190,13 @@ exports[`StepTwo should render StepTwo for Dutch Auction strategy 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -225,12 +227,13 @@ exports[`StepTwo should render StepTwo for Dutch Auction strategy 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -254,11 +257,13 @@ exports[`StepTwo should render StepTwo for Dutch Auction strategy 1`] = `
|
|||
<input
|
||||
className="sw-TextField"
|
||||
id="supply"
|
||||
min="0"
|
||||
name="supply"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
type="text"
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
|
@ -267,14 +272,14 @@ exports[`StepTwo should render StepTwo for Dutch Auction strategy 1`] = `
|
|||
className="st-StepContent_Buttons"
|
||||
>
|
||||
<button
|
||||
className="sw-ButtonBack"
|
||||
className="sw-ButtonBack "
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
>
|
||||
Back
|
||||
</button>
|
||||
<button
|
||||
className="sw-ButtonContinue"
|
||||
className="sw-ButtonContinue "
|
||||
disabled={true}
|
||||
type="submit"
|
||||
>
|
||||
|
@ -416,10 +421,10 @@ exports[`StepTwo should render StepTwo for Minted Capped strategy 1`] = `
|
|||
onSubmit={[Function]}
|
||||
>
|
||||
<div
|
||||
className="sw-BorderedBlock sw-BorderedBlock-3Columns"
|
||||
className="sw-BorderedBlock sw-BorderedBlock-GeneralSettingsWhitelistCapped"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -447,12 +452,13 @@ exports[`StepTwo should render StepTwo for Minted Capped strategy 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -480,12 +486,13 @@ exports[`StepTwo should render StepTwo for Minted Capped strategy 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -516,6 +523,7 @@ exports[`StepTwo should render StepTwo for Minted Capped strategy 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="number"
|
||||
value=""
|
||||
/>
|
||||
|
@ -525,14 +533,14 @@ exports[`StepTwo should render StepTwo for Minted Capped strategy 1`] = `
|
|||
className="st-StepContent_Buttons"
|
||||
>
|
||||
<button
|
||||
className="sw-ButtonBack"
|
||||
className="sw-ButtonBack "
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
>
|
||||
Back
|
||||
</button>
|
||||
<button
|
||||
className="sw-ButtonContinue"
|
||||
className="sw-ButtonContinue "
|
||||
disabled={true}
|
||||
type="submit"
|
||||
>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`IncompleteDeploys should render CheckIncompleteDeploys 1`] = `
|
||||
exports[`CheckIncompleteDeploys should render CheckIncompleteDeploys 1`] = `
|
||||
<div>
|
||||
<section
|
||||
className="home"
|
|
@ -230,7 +230,7 @@ exports[`ContributeForm Should set as disabled the contribute button if isTierSo
|
|||
placeholder="0"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle>
|
||||
<div
|
||||
|
@ -263,7 +263,7 @@ exports[`ContributeForm Should set as disabled the contribute button if isTierSo
|
|||
value=""
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="contribute"
|
||||
>
|
||||
<Field
|
||||
|
@ -279,7 +279,7 @@ exports[`ContributeForm Should set as disabled the contribute button if isTierSo
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
@ -349,7 +349,7 @@ exports[`ContributeForm should render ContributeForm component 1`] = `
|
|||
className="contribute-form-input-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -425,7 +425,7 @@ exports[`ContributeForm should render ContributeForm component and its children
|
|||
className="contribute-form-input-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
|
|
@ -3473,7 +3473,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
disabled={true}
|
||||
name="tiers[0].crowdsale_name"
|
||||
side="left"
|
||||
title="Crowdsale setup name"
|
||||
title="Tier setup name"
|
||||
type="text"
|
||||
value="Tier 1"
|
||||
>
|
||||
|
@ -3481,7 +3481,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
className="sw-InputField "
|
||||
>
|
||||
<FormControlTitle
|
||||
title="Crowdsale setup name"
|
||||
title="Tier setup name"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -3489,7 +3489,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Crowdsale setup name
|
||||
Tier setup name
|
||||
</label>
|
||||
</div>
|
||||
</FormControlTitle>
|
||||
|
@ -3591,7 +3591,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
type="datetime-local"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Date and time when the tier starts. Can't be in the past from the current moment."
|
||||
|
@ -3641,7 +3641,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
value="2018-04-13T16:07"
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="tiers[0].startTime"
|
||||
>
|
||||
<Field
|
||||
|
@ -3657,7 +3657,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
@ -3742,7 +3742,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
type="datetime-local"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Date and time when the tier ends. Can be only in the future."
|
||||
|
@ -3792,7 +3792,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
value="2018-04-17T00:00"
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="tiers[0].endTime"
|
||||
>
|
||||
<Field
|
||||
|
@ -3808,7 +3808,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
@ -3848,6 +3848,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
label="Rate"
|
||||
name="tiers[0].rate"
|
||||
parse={[Function]}
|
||||
placeholder="Enter here"
|
||||
side="left"
|
||||
type="text"
|
||||
>
|
||||
|
@ -3891,11 +3892,12 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
"visited": false,
|
||||
}
|
||||
}
|
||||
placeholder="Enter here"
|
||||
side="left"
|
||||
type="text"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Exchange rate Ethereum to Tokens. If it's 100, then for 1 Ether you can buy 100 tokens"
|
||||
|
@ -3930,6 +3932,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="123"
|
||||
>
|
||||
|
@ -3941,11 +3944,12 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="123"
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="tiers[0].rate"
|
||||
>
|
||||
<Field
|
||||
|
@ -3961,7 +3965,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
@ -3997,6 +4001,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
label="Supply"
|
||||
name="tiers[0].supply"
|
||||
parse={[Function]}
|
||||
placeholder="Enter here"
|
||||
side="right"
|
||||
type="text"
|
||||
val={null}
|
||||
|
@ -4041,12 +4046,13 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
"visited": false,
|
||||
}
|
||||
}
|
||||
placeholder="Enter here"
|
||||
side="right"
|
||||
type="text"
|
||||
val={null}
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle
|
||||
description="How many tokens will be sold on this tier. Cap of crowdsale equals to sum of supply of all tiers"
|
||||
|
@ -4081,6 +4087,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="132"
|
||||
>
|
||||
|
@ -4092,11 +4099,12 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="132"
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="tiers[0].supply"
|
||||
>
|
||||
<Field
|
||||
|
@ -4112,7 +4120,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
@ -4186,7 +4194,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
type="number"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle
|
||||
title="Contributor min cap"
|
||||
|
@ -4225,7 +4233,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
value="0"
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="tiers[0].minCap"
|
||||
>
|
||||
<Field
|
||||
|
@ -4241,7 +4249,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
@ -4266,7 +4274,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
disabled={true}
|
||||
name="tiers[1].crowdsale_name"
|
||||
side="left"
|
||||
title="Crowdsale setup name"
|
||||
title="Tier setup name"
|
||||
type="text"
|
||||
value="Tier 2"
|
||||
>
|
||||
|
@ -4274,7 +4282,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
className="sw-InputField "
|
||||
>
|
||||
<FormControlTitle
|
||||
title="Crowdsale setup name"
|
||||
title="Tier setup name"
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -4282,7 +4290,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Crowdsale setup name
|
||||
Tier setup name
|
||||
</label>
|
||||
</div>
|
||||
</FormControlTitle>
|
||||
|
@ -4384,7 +4392,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
type="datetime-local"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Date and time when the tier starts. Can't be in the past from the current moment."
|
||||
|
@ -4434,7 +4442,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
value="2018-04-17T00:00"
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="tiers[1].startTime"
|
||||
>
|
||||
<Field
|
||||
|
@ -4450,7 +4458,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
@ -4534,7 +4542,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
type="datetime-local"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Date and time when the tier ends. Can be only in the future."
|
||||
|
@ -4584,7 +4592,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
value="2018-04-21T00:00"
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="tiers[1].endTime"
|
||||
>
|
||||
<Field
|
||||
|
@ -4600,7 +4608,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
@ -4640,6 +4648,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
label="Rate"
|
||||
name="tiers[1].rate"
|
||||
parse={[Function]}
|
||||
placeholder="Enter here"
|
||||
side="left"
|
||||
type="text"
|
||||
>
|
||||
|
@ -4683,11 +4692,12 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
"visited": false,
|
||||
}
|
||||
}
|
||||
placeholder="Enter here"
|
||||
side="left"
|
||||
type="text"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle
|
||||
description="Exchange rate Ethereum to Tokens. If it's 100, then for 1 Ether you can buy 100 tokens"
|
||||
|
@ -4722,6 +4732,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="55"
|
||||
>
|
||||
|
@ -4733,11 +4744,12 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="55"
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="tiers[1].rate"
|
||||
>
|
||||
<Field
|
||||
|
@ -4753,7 +4765,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
@ -4789,6 +4801,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
label="Supply"
|
||||
name="tiers[1].supply"
|
||||
parse={[Function]}
|
||||
placeholder="Enter here"
|
||||
side="right"
|
||||
type="text"
|
||||
val={null}
|
||||
|
@ -4833,12 +4846,13 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
"visited": false,
|
||||
}
|
||||
}
|
||||
placeholder="Enter here"
|
||||
side="right"
|
||||
type="text"
|
||||
val={null}
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle
|
||||
description="How many tokens will be sold on this tier. Cap of crowdsale equals to sum of supply of all tiers"
|
||||
|
@ -4873,6 +4887,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="156"
|
||||
>
|
||||
|
@ -4884,11 +4899,12 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value="156"
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="tiers[1].supply"
|
||||
>
|
||||
<Field
|
||||
|
@ -4904,7 +4920,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
@ -4978,7 +4994,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
type="number"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<FormControlTitle
|
||||
title="Contributor min cap"
|
||||
|
@ -5017,7 +5033,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
value="0"
|
||||
/>
|
||||
</TextField>
|
||||
<Error
|
||||
<Errors
|
||||
name="tiers[1].minCap"
|
||||
>
|
||||
<Field
|
||||
|
@ -5033,7 +5049,7 @@ exports[`ManageForm should render the component with tiers 1`] = `
|
|||
}
|
||||
}
|
||||
/>
|
||||
</Error>
|
||||
</Errors>
|
||||
</div>
|
||||
</InputField2>
|
||||
</Field>
|
||||
|
|
|
@ -23,7 +23,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Crowdsale setup name
|
||||
Tier setup name
|
||||
</label>
|
||||
</div>
|
||||
<input
|
||||
|
@ -39,7 +39,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -73,7 +73,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -111,7 +111,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -140,12 +140,13 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -174,6 +175,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
|
@ -183,7 +185,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -336,7 +338,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Crowdsale setup name
|
||||
Tier setup name
|
||||
</label>
|
||||
</div>
|
||||
<input
|
||||
|
@ -352,7 +354,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -386,7 +388,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -424,7 +426,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -453,12 +455,13 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -487,6 +490,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
|
@ -496,7 +500,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -549,7 +553,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Crowdsale setup name
|
||||
Tier setup name
|
||||
</label>
|
||||
</div>
|
||||
<input
|
||||
|
@ -565,7 +569,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -599,7 +603,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -637,7 +641,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -666,12 +670,13 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -700,6 +705,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
|
@ -709,7 +715,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -862,7 +868,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
<label
|
||||
className="sw-FormControlTitle_Label"
|
||||
>
|
||||
Crowdsale setup name
|
||||
Tier setup name
|
||||
</label>
|
||||
</div>
|
||||
<input
|
||||
|
@ -878,7 +884,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -912,7 +918,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -950,7 +956,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -979,12 +985,13 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
@ -1013,6 +1020,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
placeholder="Enter here"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
|
@ -1022,7 +1030,7 @@ exports[`ManageTierBlock should render the ManageTierBlock component with tiers
|
|||
className="input-block-container"
|
||||
>
|
||||
<div
|
||||
className="sw-InputField "
|
||||
className="sw-InputField2 "
|
||||
>
|
||||
<div
|
||||
className="sw-FormControlTitle"
|
||||
|
|
|
@ -8,6 +8,7 @@ describe(`Utils in the store`, () => {
|
|||
// Given
|
||||
await getCrowdsaleAssets(3)
|
||||
const contractStore = new ContractStore()
|
||||
|
||||
// When
|
||||
const { DutchProxy, MintedCappedProxy } = contractStore
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import processWhitelist from '../../src/utils/processWhitelist'
|
|||
import TierStore from '../../src/stores/TierStore'
|
||||
import { defaultTier, defaultTierValidations, LIMIT_WHITELISTED_ADDRESSES } from '../../src/utils/constants'
|
||||
import { isLessOrEqualThan } from '../../src/utils/validations'
|
||||
import { toBigNumber } from '../../src/utils/utils'
|
||||
|
||||
describe('processWhitelist function', () => {
|
||||
it('should call the callback for each whitelist item', () => {
|
||||
|
@ -219,12 +218,12 @@ describe('processWhitelist function', () => {
|
|||
|
||||
it(`should add addresses whose maxCap is not greater than 1000`, () => {
|
||||
// Given
|
||||
tierStore.setTierProperty(1000, 'supply', 0)
|
||||
|
||||
const { rows } = require('./helpers/whitelist-addresses')
|
||||
const { supply } = tierStore.tiers[0]
|
||||
const lessOrEqualThanSupply = isLessOrEqualThan()(supply)
|
||||
const validAddressesCount = rows.filter(({ max }) => lessOrEqualThanSupply(max) === undefined).length
|
||||
|
||||
tierStore.setTierProperty(1000, 'supply', 0)
|
||||
const validAddressesCount = rows.filter(([addr, min, max]) => lessOrEqualThanSupply(max) === undefined).length
|
||||
|
||||
const cb = jest.fn(item => tierStore.addWhitelistItem(item, 0))
|
||||
const cbValidation = jest.fn(() => tierStore.validateWhitelistedAddressLength(0))
|
||||
|
|
Loading…
Reference in New Issue