Added cucumber tests (wip)
This commit is contained in:
parent
d798aa2cdf
commit
fb3511b264
11 changed files with 272 additions and 11 deletions
|
|
@ -1,3 +1,5 @@
|
|||
/* eslint-disable import/no-absolute-path */
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Row, FormGroup, ControlLabel, Button } from 'react-bootstrap';
|
||||
|
|
@ -6,6 +8,7 @@ import { Meteor } from 'meteor/meteor';
|
|||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import { translate } from 'react-i18next';
|
||||
import { T9n } from 'meteor-accounts-t9n';
|
||||
import { testId } from '/imports/ui/components/Utils/TestUtils';
|
||||
import Col from '../../components/Col/Col';
|
||||
import OAuthLoginButtons from '../../components/OAuthLoginButtons/OAuthLoginButtons';
|
||||
import AccountPageFooter from '../../components/AccountPageFooter/AccountPageFooter';
|
||||
|
|
@ -101,7 +104,7 @@ class Login extends React.Component {
|
|||
className="form-control"
|
||||
/>
|
||||
</FormGroup>
|
||||
<Button type="submit" bsStyle="success">{this.t('Iniciar sesión')}</Button>
|
||||
<Button id={testId('loginSubmit')} type="submit" bsStyle="success">{this.t('Iniciar sesión')}</Button>
|
||||
<AccountPageFooter>
|
||||
<p>{this.t('¿No tienes una cuenta?')} <Link to="/signup">{this.t('Regístrate')}</Link>.</p>
|
||||
</AccountPageFooter>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
/* eslint-disable no-underscore-dangle */
|
||||
/* eslint-disable import/no-absolute-path */
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Row, FormGroup, ControlLabel, Button } from 'react-bootstrap';
|
||||
import Col from '../../components/Col/Col';
|
||||
import _ from 'lodash';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Accounts } from 'meteor/accounts-base';
|
||||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import { testId } from '/imports/ui/components/Utils/TestUtils';
|
||||
import Col from '../../components/Col/Col';
|
||||
import { createContainer } from 'meteor/react-meteor-data';
|
||||
import InputHint from '../../components/InputHint/InputHint';
|
||||
import validate from '../../../modules/validate';
|
||||
|
|
@ -232,7 +234,7 @@ class Profile extends React.Component {
|
|||
/>
|
||||
<InputHint>{this.t('Usa al menos seis caracteres.')}</InputHint>
|
||||
</FormGroup>
|
||||
<Button type="submit" bsStyle="success">{this.t('Guardar perfíl')}</Button>
|
||||
<Button id={testId('profileSubmit')} type="submit" bsStyle="success">{this.t('Guardar perfíl')}</Button>
|
||||
</div>) : <div />;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import { Link } from 'react-router-dom';
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { Accounts } from 'meteor/accounts-base';
|
||||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import { testId } from '/imports/ui/components/Utils/TestUtils';
|
||||
import Icon from '../../components/Icon/Icon';
|
||||
import OAuthLoginButtons from '../../components/OAuthLoginButtons/OAuthLoginButtons';
|
||||
import InputHint from '../../components/InputHint/InputHint';
|
||||
|
|
@ -186,11 +187,11 @@ class Signup extends React.Component {
|
|||
/>
|
||||
<InputHint>{t('Usa al menos seis caracteres.')}</InputHint>
|
||||
</FormGroup>
|
||||
<Checkbox inline={false} defaultChecked={this.state.termsAccept} onClick={e => this.setTermsAccept(e.target.checked)}>
|
||||
<Checkbox inline={false} name="tos" defaultChecked={this.state.termsAccept} onClick={e => this.setTermsAccept(e.target.checked)}>
|
||||
<Trans className="mark-checkbox" parent="span" i18nKey="termsAccept">Acepto las <a target="_blank" href="/terms">condiciones de servicio</a> de este sitio</Trans>
|
||||
</Checkbox>
|
||||
|
||||
<Button type="submit" disabled={!this.state.termsAccept} bsStyle="success">{t('Registrarse')}</Button>
|
||||
<Button id={testId('signUpSubmit')} type="submit" disabled={!this.state.termsAccept} bsStyle="success">{t('Registrarse')}</Button>
|
||||
<AccountPageFooter>
|
||||
<p>{t('¿Ya tienes un cuenta?')} <Link to={{ pathname: '/login', state: this.state }} >{t('Iniciar sesión')}</Link>.</p>
|
||||
</AccountPageFooter>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue