nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    it('should lost the focus when the checkbox is selected and press the key TAB', async () => {
        const checkboxGroup = new PageCheckboxGroup(CHECKBOX_GROUP);
        const checkbox = await checkboxGroup.getItem(0);
        await checkbox.click();
        // TODO: Use constant once PR merged.
Severity: Major
Found in integration/specs/CheckboxGroup/checkboxGroup-1.spec.js and 2 other locations - About 3 hrs to fix
integration/specs/RadioGroup/radioGroup-1.spec.js on lines 21..28
integration/specs/RadioGroup/radioGroup-1.spec.js on lines 44..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    it('should pass the right error when redux form meta object is passed and touched is true', () => {
        const meta = {
            error: 'redux form error from meta',
            touched: true,
            submitFailed: false,
Severity: Major
Found in src/libs/hocs/withReduxForm/__test__/withReduxForm.spec.js and 2 other locations - About 3 hrs to fix
src/libs/hocs/withReduxForm/__test__/withReduxForm.spec.js on lines 46..54
src/libs/hocs/withReduxForm/__test__/withReduxForm.spec.js on lines 64..72

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    it('should lose the focus when press arrow down', async () => {
        const radioGroup = new PageRadioGroup(RADIO_GROUP);
        const radio = await radioGroup.getItem(1);
        await radio.click();
        // TODO: Use constant once PR merged
Severity: Major
Found in integration/specs/RadioGroup/radioGroup-1.spec.js and 2 other locations - About 3 hrs to fix
integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 30..37
integration/specs/RadioGroup/radioGroup-1.spec.js on lines 44..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    it('should uncheck the item when press arrow down', async () => {
        const radioGroup = new PageRadioGroup(RADIO_GROUP);
        const radio = await radioGroup.getItem(1);
        await radio.click();
        // TODO: Use constant once PR merged
Severity: Major
Found in integration/specs/RadioGroup/radioGroup-1.spec.js and 2 other locations - About 3 hrs to fix
integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 30..37
integration/specs/RadioGroup/radioGroup-1.spec.js on lines 21..28

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    it('should be accessible', () => {
        const component = shallow(<ProgressBar value={25} />);

        expect(component.find(StyledContainer).props()).toEqual(
            expect.objectContaining({
Severity: Major
Found in src/components/ProgressBar/__test__/progressBar.spec.js and 1 other location - About 3 hrs to fix
src/components/ProgressCircular/__test__/progressCircular.spec.js on lines 8..18

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    it('should be accessible', () => {
        const component = shallow(<ProgressCircular value={25} />);
        expect(component.find(StyledContainer).props()).toEqual(
            expect.objectContaining({
                role: 'progressbar',
src/components/ProgressBar/__test__/progressBar.spec.js on lines 13..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    it('should not call CounterManager.decrement when the component unmount and it is not open', () => {
        CounterManager.decrement.mockReset();
        const component = mount(
            <Drawer isOpen={false}>
                <p />
Severity: Major
Found in src/components/Drawer/__test__/drawer.spec.js and 1 other location - About 3 hrs to fix
src/components/Modal/__test__/modal.spec.js on lines 188..197

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    it('should not call CounterManager.decrement when the component unmount and it is not open', () => {
        CounterManager.decrement.mockReset();
        const component = mount(
            <Modal isOpen={false}>
                <p />
Severity: Major
Found in src/components/Modal/__test__/modal.spec.js and 1 other location - About 3 hrs to fix
src/components/Drawer/__test__/drawer.spec.js on lines 169..178

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function CheckoutExample has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function CheckoutExample() {
    return (
        <div className="rainbow-align-content_center rainbow-checkout_view-port">
            <Card className="rainbow-checkout_card-container" icon={CARD_ICON} title="Checkout">
                <div className="rainbow-p-horizontal_x-large rainbow-p-bottom_large rainbow-checkout_media-styles-container">
Severity: Major
Found in examples/create-react-app/src/pages/Checkout/index.js - About 3 hrs to fix

    Function Rgba has 76 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const Rgba = React.forwardRef((_props, ref) => {
        const { rgba, hsv, hex, tabIndex, onChange } = useContext(ColorPickerContext) || {};
    
        const firstRef = useRef();
        const lastRef = useRef();
    Severity: Major
    Found in src/components/ColorPicker/commons/rgba/index.js - About 3 hrs to fix

      Function SingleCalendarHeader has 75 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function SingleCalendarHeader(props) {
          const {
              monthLabelId,
              currentYear,
              yearsRange,
      Severity: Major
      Found in src/components/Calendar/calendarHeader.js - About 3 hrs to fix

        Similar blocks of code found in 5 locations. Consider refactoring.
        Open

        describe('<WeekDayPicker />', () => {
            it('should be accessible', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(
                    <WeekDayPicker label="Accesibility test on WeekDayPicker" value="monday" />,
        src/components/Avatar/__test__/avatar.a11y.spec.js on lines 6..15
        src/components/Chip/__test__/chip.a11y.spec.js on lines 6..13
        src/components/TimePicker/__test__/timePicker.a11y.spec.js on lines 6..15
        src/components/TimePicker/__test__/timeSelect.a11y.spec.js on lines 6..15

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 95.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 5 locations. Consider refactoring.
        Open

        describe('<TimePicker/>', () => {
            it('should be accessible', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(
                    <TimePicker label="Accessibility test on TimePicker" value="18:35" />,
        Severity: Major
        Found in src/components/TimePicker/__test__/timePicker.a11y.spec.js and 4 other locations - About 3 hrs to fix
        src/components/Avatar/__test__/avatar.a11y.spec.js on lines 6..15
        src/components/Chip/__test__/chip.a11y.spec.js on lines 6..13
        src/components/TimePicker/__test__/timeSelect.a11y.spec.js on lines 6..15
        src/components/WeekDayPicker/__test__/weekDayPicker.a11y.spec.js on lines 6..15

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 95.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 5 locations. Consider refactoring.
        Open

        describe('<Chip/>', () => {
            it('should be accessible', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(<Chip label="Chip Neutral" variant="neutral" />);
                const results = await axe(html);
        Severity: Major
        Found in src/components/Chip/__test__/chip.a11y.spec.js and 4 other locations - About 3 hrs to fix
        src/components/Avatar/__test__/avatar.a11y.spec.js on lines 6..15
        src/components/TimePicker/__test__/timePicker.a11y.spec.js on lines 6..15
        src/components/TimePicker/__test__/timeSelect.a11y.spec.js on lines 6..15
        src/components/WeekDayPicker/__test__/weekDayPicker.a11y.spec.js on lines 6..15

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 95.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 5 locations. Consider refactoring.
        Open

        describe('<Avatar/>', () => {
            it('should be accessible when a src and assistiveText are passed', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(
                    <Avatar src="images/user/user1.jpg" assistiveText="user photo" />,
        Severity: Major
        Found in src/components/Avatar/__test__/avatar.a11y.spec.js and 4 other locations - About 3 hrs to fix
        src/components/Chip/__test__/chip.a11y.spec.js on lines 6..13
        src/components/TimePicker/__test__/timePicker.a11y.spec.js on lines 6..15
        src/components/TimePicker/__test__/timeSelect.a11y.spec.js on lines 6..15
        src/components/WeekDayPicker/__test__/weekDayPicker.a11y.spec.js on lines 6..15

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 95.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 5 locations. Consider refactoring.
        Open

        describe('<TimeSelect/>', () => {
            it('should be accessible', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(
                    <TimeSelect label="Accessibility test on TimeSelect" value="18:35" />,
        Severity: Major
        Found in src/components/TimePicker/__test__/timeSelect.a11y.spec.js and 4 other locations - About 3 hrs to fix
        src/components/Avatar/__test__/avatar.a11y.spec.js on lines 6..15
        src/components/Chip/__test__/chip.a11y.spec.js on lines 6..13
        src/components/TimePicker/__test__/timePicker.a11y.spec.js on lines 6..15
        src/components/WeekDayPicker/__test__/weekDayPicker.a11y.spec.js on lines 6..15

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 95.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            it('should call event.preventDefault when press right key in input type radio', () => {
                const component = mount(<SelectableCell inputType="radio" />);
                const preventDefaultMockFn = jest.fn();
                component.find('input').simulate('keyDown', {
                    keyCode: RIGHT_KEY,
        Severity: Major
        Found in src/components/Table/body/__test__/selectableCell.spec.js and 1 other location - About 3 hrs to fix
        src/components/Table/body/__test__/selectableCell.spec.js on lines 147..155

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 95.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            it('should call event.preventDefault when press left key in input type radio', () => {
                const component = mount(<SelectableCell inputType="radio" />);
                const preventDefaultMockFn = jest.fn();
                component.find('input').simulate('keyDown', {
                    keyCode: LEFT_KEY,
        Severity: Major
        Found in src/components/Table/body/__test__/selectableCell.spec.js and 1 other location - About 3 hrs to fix
        src/components/Table/body/__test__/selectableCell.spec.js on lines 156..164

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 95.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                it('should render the LabelText component', () => {
                    const component = mount(<Label label="Input Label" />);
                    expect(component.find(LabelText).exists()).toBe(true);
                    expect(component.find(HiddenElement).exists()).toBe(false);
                });
        Severity: Major
        Found in src/components/Input/label/__test__/label.spec.js and 1 other location - About 3 hrs to fix
        src/components/Input/checkboxRadioLabel/__test__/label.spec.js on lines 21..25

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 95.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                it('should render the StyledLabelText component', () => {
                    const component = mount(<Label label="Input Label" />);
                    expect(component.find(StyledLabelText).exists()).toBe(true);
                    expect(component.find(HiddenElement).exists()).toBe(false);
                });
        src/components/Input/label/__test__/label.spec.js on lines 26..30

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 95.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Severity
        Category
        Status
        Source
        Language