diff --git a/client/coral-admin/src/components/TagsInput.js b/client/coral-admin/src/components/TagsInput.js index d9854ed86..f8c55cfa9 100644 --- a/client/coral-admin/src/components/TagsInput.js +++ b/client/coral-admin/src/components/TagsInput.js @@ -2,17 +2,25 @@ import React from 'react'; import TagsInput from 'react-tagsinput'; import styles from './TagsInput.css'; import AutosizeInput from 'react-input-autosize'; +import PropTypes from 'prop-types'; +import cn from 'classnames'; const autosizingRenderInput = ({onChange, value, addTag: _, ...other}) => ; -export default (props) => { +autosizingRenderInput.propTypes = { + onChange: PropTypes.func, + value: PropTypes.string, + addTag: PropTypes.func, +}; + +const TagsInputComponent = ({className = '', ...props}) => { return ( data.split(',').map((d) => d.trim())} - className={styles.root} + className={cn(styles.root, 'tags-input', className)} focusedClassName={styles.rootFocus} renderInput={autosizingRenderInput} {...props} @@ -29,3 +37,11 @@ export default (props) => { /> ); }; + +TagsInputComponent.propTypes = { + className: PropTypes.string, + inputProps: PropTypes.object, + tagProps: PropTypes.object, +}; + +export default TagsInputComponent; diff --git a/client/coral-admin/src/routes/Install/components/Steps/AddOrganizationName.js b/client/coral-admin/src/routes/Install/components/Steps/AddOrganizationName.js index 064167dda..2d2743757 100644 --- a/client/coral-admin/src/routes/Install/components/Steps/AddOrganizationName.js +++ b/client/coral-admin/src/routes/Install/components/Steps/AddOrganizationName.js @@ -1,13 +1,14 @@ import React from 'react'; import styles from './style.css'; import {TextField, Button} from 'coral-ui'; - +import PropTypes from 'prop-types'; import t from 'coral-framework/services/i18n'; +import cn from 'classnames'; const AddOrganizationName = (props) => { const {handleSettingsChange, handleSettingsSubmit, install} = props; return ( -
+

{t('install.add_organization.description')}

@@ -19,11 +20,17 @@ const AddOrganizationName = (props) => { onChange={handleSettingsChange} showErrors={install.showErrors} errorMsg={install.errors.organizationName} /> - +
); }; +AddOrganizationName.propTypes = { + handleSettingsChange: PropTypes.func, + handleSettingsSubmit: PropTypes.func, + install: PropTypes.object, +}; + export default AddOrganizationName; diff --git a/client/coral-admin/src/routes/Install/components/Steps/CreateYourAccount.js b/client/coral-admin/src/routes/Install/components/Steps/CreateYourAccount.js index d4d43dc92..dec111c5b 100644 --- a/client/coral-admin/src/routes/Install/components/Steps/CreateYourAccount.js +++ b/client/coral-admin/src/routes/Install/components/Steps/CreateYourAccount.js @@ -1,13 +1,14 @@ import React from 'react'; import styles from './style.css'; import {TextField, Button, Spinner} from 'coral-ui'; - +import PropTypes from 'prop-types'; import t from 'coral-framework/services/i18n'; +import cn from 'classnames'; const InitialStep = (props) => { const {handleUserChange, handleUserSubmit, install} = props; return ( -
+
{ { !props.install.isLoading ? - + : } @@ -64,4 +65,10 @@ const InitialStep = (props) => { ); }; +InitialStep.propTypes = { + handleUserChange: PropTypes.func, + handleUserSubmit: PropTypes.func, + install: PropTypes.object, +}; + export default InitialStep; diff --git a/client/coral-admin/src/routes/Install/components/Steps/InitialStep.js b/client/coral-admin/src/routes/Install/components/Steps/InitialStep.js index aceb0d965..8e6105533 100644 --- a/client/coral-admin/src/routes/Install/components/Steps/InitialStep.js +++ b/client/coral-admin/src/routes/Install/components/Steps/InitialStep.js @@ -1,7 +1,7 @@ import React from 'react'; import styles from './style.css'; import {Button} from 'coral-ui'; - +import PropTypes from 'prop-types'; import t from 'coral-framework/services/i18n'; const InitialStep = (props) => { @@ -9,9 +9,13 @@ const InitialStep = (props) => { return (

{t('install.initial.description')}

- +
); }; +InitialStep.propTypes = { + nextStep: PropTypes.func, +}; + export default InitialStep; diff --git a/client/coral-admin/src/routes/Install/components/Steps/PermittedDomainsStep.js b/client/coral-admin/src/routes/Install/components/Steps/PermittedDomainsStep.js index 20b037890..9ec52994b 100644 --- a/client/coral-admin/src/routes/Install/components/Steps/PermittedDomainsStep.js +++ b/client/coral-admin/src/routes/Install/components/Steps/PermittedDomainsStep.js @@ -2,26 +2,34 @@ import React from 'react'; import styles from './style.css'; import {Button, Card} from 'coral-ui'; import TagsInput from 'coral-admin/src/components/TagsInput'; - +import PropTypes from 'prop-types'; +import cn from 'classnames'; import t from 'coral-framework/services/i18n'; const PermittedDomainsStep = (props) => { const {finishInstall, install, handleDomainsChange} = props; const domains = install.data.settings.domains.whitelist; return ( -
+

{t('install.permitted_domains.title')}

{t('install.permitted_domains.description')}

handleDomainsChange(tags)} />
- +
); }; +PermittedDomainsStep.propTypes = { + finishInstall: PropTypes.func, + handleDomainsChange: PropTypes.func, + install: PropTypes.object, +}; + export default PermittedDomainsStep; diff --git a/nightwatch-local.conf.js b/nightwatch-local.conf.js index 9e4e59b58..4be7cd49d 100644 --- a/nightwatch-local.conf.js +++ b/nightwatch-local.conf.js @@ -31,11 +31,8 @@ module.exports = { 'enabled': true, 'on_failure': true, 'on_error': true, - 'path': './tests/e2e/reports' + 'path': './test/e2e/reports' }, - 'exclude': [ - './tests/e2e/tests/EmbedStreamTests.js' - ] }, 'integration': { 'launch_url': 'http://localhost:3000'