nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

describe('<InputRadio/>', () => {
    it('should be accessible when label is passed', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(<InputRadio label="Input Label" />);
        const results = await axe(html);
src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
src/components/Input/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13
src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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 90.

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 14 locations. Consider refactoring.
Open

describe('<InputBase/>', () => {
    it('should be accessible when label is passed', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(<InputBase label="Input Label" />);
        const results = await axe(html);
Severity: Major
Found in src/components/Input/inputBase/__test__/input.a11y.spec.js and 13 other locations - About 2 hrs to fix
src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
src/components/Input/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13
src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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 90.

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 14 locations. Consider refactoring.
Open

describe('<CounterInput/>', () => {
    it('should be accessible when label is passed', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(<CounterInput label="CounterInput Label" />);
        const results = await axe(html);
src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
src/components/Input/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13
src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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 90.

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 14 locations. Consider refactoring.
Open

describe('<Rating/>', () => {
    it('should be accessible', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(<Rating label="Rating Label" />);
        const results = await axe(html);
Severity: Major
Found in src/components/Rating/__test__/rating.a11y.spec.js and 13 other locations - About 2 hrs to fix
src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
src/components/Input/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13
src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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 90.

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 14 locations. Consider refactoring.
Open

describe('<HelpText />', () => {
    it('should be accessible when text is passed', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(<HelpText text="Help Test" />);
        const results = await axe(html);
Severity: Major
Found in src/components/HelpText/__test__/helpText.a11y.spec.js and 13 other locations - About 2 hrs to fix
src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
src/components/Input/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13
src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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 90.

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 14 locations. Consider refactoring.
Open

describe('<PickerInput/>', () => {
    it('should be accessible when label is passed', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(<Input label="Input Label" />);
        const results = await axe(html);
src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
src/components/Input/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13
src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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 90.

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 14 locations. Consider refactoring.
Open

describe('Textarea', () => {
    it('should be accessible when label is passed', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(<Textarea label="Textarea Label" />);
        const results = await axe(html);
Severity: Major
Found in src/components/Textarea/__test__/textarea.a11y.spec.js and 13 other locations - About 2 hrs to fix
src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
src/components/Input/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13

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 90.

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 14 locations. Consider refactoring.
Open

describe('<StrongPasswordInput />', () => {
    it('should be accessible when label is passed', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(<FileSelector label="Input Label" />);
        const results = await axe(html);
src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
src/components/Input/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13
src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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 90.

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 14 locations. Consider refactoring.
Open

describe('<CheckboxToggle/>', () => {
    it('should be accessible when label is passed', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(<CheckboxToggle label="Toggle label" />);
        const results = await axe(html);
src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
src/components/Input/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13
src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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 90.

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

    it('should set id in the button element', () => {
        const component = mount(<Tab privateRegisterTab={() => {}} name="tab-1" id="tab 1" />);
        const button = component.find('button');

        expect(button.prop('id')).toBe('tab 1');
Severity: Major
Found in src/components/Tab/__test__/tab.spec.js and 4 other locations - About 2 hrs to fix
src/components/Tab/__test__/tab.spec.js on lines 33..40
src/components/Tab/__test__/tab.spec.js on lines 49..56
src/components/Tab/__test__/tab.spec.js on lines 87..94
src/components/Tab/__test__/tab.spec.js on lines 126..132

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 90.

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

    it('should set role to tab in button element', () => {
        const component = mount(
            <Tab privateRegisterTab={() => {}} name="tab-1" activeTabName="tab-2" />,
        );
        const button = component.find('button');
Severity: Major
Found in src/components/Tab/__test__/tab.spec.js and 4 other locations - About 2 hrs to fix
src/components/Tab/__test__/tab.spec.js on lines 33..40
src/components/Tab/__test__/tab.spec.js on lines 81..86
src/components/Tab/__test__/tab.spec.js on lines 87..94
src/components/Tab/__test__/tab.spec.js on lines 126..132

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 90.

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

    it('should set role to presentation in li.', () => {
        const component = mount(
            <Tab privateRegisterTab={() => {}} name="tab-1" activeTabName="tab-2" />,
        );
        const listItem = component.find('li');
Severity: Major
Found in src/components/Tab/__test__/tab.spec.js and 4 other locations - About 2 hrs to fix
src/components/Tab/__test__/tab.spec.js on lines 49..56
src/components/Tab/__test__/tab.spec.js on lines 81..86
src/components/Tab/__test__/tab.spec.js on lines 87..94
src/components/Tab/__test__/tab.spec.js on lines 126..132

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 90.

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

    it('should set type to "button" in button element', () => {
        const component = mount(
            <Tab privateRegisterTab={() => {}} name="tab-1" activeTabName="tab-2" />,
        );
        const button = component.find('button');
Severity: Major
Found in src/components/Tab/__test__/tab.spec.js and 4 other locations - About 2 hrs to fix
src/components/Tab/__test__/tab.spec.js on lines 33..40
src/components/Tab/__test__/tab.spec.js on lines 49..56
src/components/Tab/__test__/tab.spec.js on lines 81..86
src/components/Tab/__test__/tab.spec.js on lines 87..94

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 90.

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

    it('should set id in the button element', () => {
        const component = mount(
            <Tab privateRegisterTab={() => {}} name="tab-1" ariaControls="tab-content-1" />,
        );
        const button = component.find('button');
Severity: Major
Found in src/components/Tab/__test__/tab.spec.js and 4 other locations - About 2 hrs to fix
src/components/Tab/__test__/tab.spec.js on lines 33..40
src/components/Tab/__test__/tab.spec.js on lines 49..56
src/components/Tab/__test__/tab.spec.js on lines 81..86
src/components/Tab/__test__/tab.spec.js on lines 126..132

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 90.

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 fire onFocus with undefined when there is not value', () => {
        const onFocusMockFn = jest.fn();
        const component = mount(
            <TimePicker label="unit-testing-timePicker" onFocus={onFocusMockFn} />,
        );
Severity: Major
Found in src/components/TimePicker/__test__/timePicker.spec.js and 2 other locations - About 2 hrs to fix
src/components/DateTimePicker/__test__/dateTimePicker.spec.js on lines 13..20
src/components/DateTimePicker/__test__/dateTimePicker.spec.js on lines 33..40

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 90.

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 fire onFocus with undefined when there is not value', () => {
        const onFocusMockFn = jest.fn();
        const component = mount(
            <DateTimePicker label="unit-testing-dateTimePicker" onFocus={onFocusMockFn} />,
        );
src/components/DateTimePicker/__test__/dateTimePicker.spec.js on lines 13..20
src/components/TimePicker/__test__/timePicker.spec.js on lines 26..33

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 90.

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

export default function CloseIcon(props) {
    const { className, style } = props;
    return (
        <svg
            className={className}
Severity: Major
Found in src/components/Drawer/closeIcon.js and 2 other locations - About 2 hrs to fix
src/components/Lookup/icons/closeIcon.js on lines 4..18
src/components/Modal/closeIcon.js on lines 4..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 90.

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

export default function CloseIcon(props) {
    const { className, style } = props;
    return (
        <svg
            className={className}
Severity: Major
Found in src/components/Modal/closeIcon.js and 2 other locations - About 2 hrs to fix
src/components/Lookup/icons/closeIcon.js on lines 4..18
src/components/Drawer/closeIcon.js on lines 4..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 90.

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

export default function CloseIcon(props) {
    const { className, style } = props;
    return (
        <svg
            className={className}
Severity: Major
Found in src/components/Lookup/icons/closeIcon.js and 2 other locations - About 2 hrs to fix
src/components/Drawer/closeIcon.js on lines 4..18
src/components/Modal/closeIcon.js on lines 4..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 90.

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 fire onBlur with undefined when there is not value', () => {
        const onBlurMockFn = jest.fn();
        const component = mount(
            <DateTimePicker label="unit-testing-dateTimePicker" onBlur={onBlurMockFn} />,
        );
src/components/DateTimePicker/__test__/dateTimePicker.spec.js on lines 33..40
src/components/TimePicker/__test__/timePicker.spec.js on lines 26..33

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 90.

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