0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-17 23:45:29 -05:00

Fix: Header component test

This commit is contained in:
Ayush Sharma 2017-12-02 16:47:45 +05:30 committed by juanpicado
parent 3052e5fb22
commit ea47691300
3 changed files with 3 additions and 10 deletions

View file

@ -170,9 +170,9 @@ export default class Header extends React.Component {
</Alert>
}
<br/>
<Input name="username" placeholder="Username" onChange={this.handleInput('username')} />
<Input name="username" placeholder="Username" onChange={this.handleInput.bind(this, 'username')} />
<br/><br/>
<Input name="password" type="password" placeholder="Type your password" onChange={this.handleInput('password')} />
<Input name="password" type="password" placeholder="Type your password" onChange={this.handleInput.bind(this, 'password')} />
</Dialog.Body>
<Dialog.Footer className="dialog-footer">
<Button onClick={ () => this.toggleLoginModal() }>

View file

@ -94,7 +94,7 @@ describe('<Header /> component shallow', () => {
const error = {
title: 'Unable to login',
type: 'error',
description: 'something went wrong'
description: "Username or password can't be empty!"
};
HeaderWrapper.setState({});

View file

@ -11,13 +11,6 @@ export default function(config) {
token: 'TEST_TOKEN'
}
});
} else if (
config.data.username === undefined ||
config.data.password === undefined
) {
reject({
message: 'something went wrong'
});
} else {
reject({
response: {