Skip to content

Commit

Permalink
test(Input & Switch): Update test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 18, 2018
1 parent ee10c92 commit 763e2fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5,993 deletions.
6 changes: 3 additions & 3 deletions src/input/__test__/Input.test.js
Expand Up @@ -46,21 +46,21 @@ describe('<Input>', () => {
wrapper.setProps({ type: 'text' });
const input = wrapper.find('.w-input').at(0);
input.simulate('change');
expect(input.html()).toContain('<div class="w-input"><input type="text" autocomplete="off" class="w-input-inner"></div>');
expect(input.html()).toContain('<div class="w-input"><input type="text" placeholder="" autocomplete="off" class="w-input-inner"></div>');
});

it('Test onSearch event.', () => {
wrapper.setProps({ type: 'input' });
const input = wrapper.find('.w-input').at(0);
input.simulate('change');
expect(input.html()).toContain('<div class="w-input"><input type="input" autocomplete="off" class="w-input-inner"></div>');
expect(input.html()).toContain('<div class="w-input"><input type="input" placeholder="" autocomplete="off" class="w-input-inner"></div>');
});

it('Test onKeyUp event.', () => {
wrapper.setProps({ type: 'input' });
const input = wrapper.find('.w-input').at(0);
input.simulate('keyup');
expect(input.html()).toContain('<div class="w-input"><input type="input" autocomplete="off" class="w-input-inner"></div>');
expect(input.html()).toContain('<div class="w-input"><input type="input" placeholder="" autocomplete="off" class="w-input-inner"></div>');
});

it('Test defaultValue attributes.', () => {
Expand Down

0 comments on commit 763e2fb

Please sign in to comment.