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:
parent
3052e5fb22
commit
ea47691300
3 changed files with 3 additions and 10 deletions
|
@ -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() }>
|
||||
|
|
|
@ -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({});
|
||||
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Add table
Reference in a new issue