Skip to content

Commit

Permalink
test(NumberInput): update icon assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Jan 28, 2021
1 parent c537692 commit 9cafbcb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/react/src/components/NumberInput/NumberInput-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React from 'react';
import { mount, shallow } from 'enzyme';
import { CaretDownGlyph, CaretUpGlyph } from '@carbon/icons-react';
import { Subtract16, Add16 } from '@carbon/icons-react';
import NumberInput from '../NumberInput';
import NumberInputSkeleton from '../NumberInput/NumberInput.Skeleton';
import { settings } from 'carbon-components';
Expand Down Expand Up @@ -44,7 +44,7 @@ describe('NumberInput', () => {

wrapper = mount(<NumberInput {...mockProps} />);

const iconTypes = [CaretDownGlyph, CaretUpGlyph];
const iconTypes = [Subtract16, Add16];
label = wrapper.find('label');
numberInput = wrapper.find('input');
container = wrapper.find(`.${prefix}--number`);
Expand Down Expand Up @@ -290,8 +290,8 @@ describe('NumberInput', () => {
});

it('should use correct icons', () => {
expect(icons.at(0).type()).toBe(CaretUpGlyph);
expect(icons.at(1).type()).toBe(CaretDownGlyph);
expect(icons.at(0).type()).toBe(Subtract16);
expect(icons.at(1).type()).toBe(Add16);
});

it('adds new iconDescription when passed via props', () => {
Expand Down Expand Up @@ -401,8 +401,8 @@ describe('NumberInput', () => {
);

input = wrapper.find('input');
upArrow = wrapper.find(CaretUpGlyph).closest('button');
downArrow = wrapper.find(CaretDownGlyph).closest('button');
upArrow = wrapper.find(Add16).closest('button');
downArrow = wrapper.find(Subtract16).closest('button');
});

it('should invoke onClick when numberInput is clicked', () => {
Expand Down

0 comments on commit 9cafbcb

Please sign in to comment.