nexxtway/react-rainbow

View on GitHub
integration/specs/Accordion/accordion-1.spec.js

Summary

Maintainability
F
4 days
Test Coverage

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

    it('should close the first accordion section and expand the second when the first is expanded and is clicked the button icon of the second', async () => {
        const accordion = new PageAccordion(ACCORDION);
        const firstAccordionSection = await accordion.getItem(0);
        const secondAccordionSection = await accordion.getItem(1);
        await firstAccordionSection.clickButton();
Severity: Major
Found in integration/specs/Accordion/accordion-1.spec.js and 1 other location - About 4 hrs to fix
integration/specs/VisualPicker/visualPicker-3.spec.js on lines 34..42

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

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

    it('should move focus to the previous button icon when the second button icon is focused and press arrow up', async () => {
        const accordion = new PageAccordion(ACCORDION);
        const firstAccordionSection = await accordion.getItem(0);
        const secondAccordionSection = await accordion.getItem(1);
        await secondAccordionSection.clickButton();
Severity: Major
Found in integration/specs/Accordion/accordion-1.spec.js and 13 other locations - About 3 hrs to fix
integration/specs/Accordion/accordion-1.spec.js on lines 38..45
integration/specs/Accordion/accordion-1.spec.js on lines 46..53
integration/specs/Accordion/accordion-1.spec.js on lines 62..69
integration/specs/Accordion/accordion-1.spec.js on lines 70..77
integration/specs/Accordion/accordion-1.spec.js on lines 78..85
integration/specs/Accordion/accordion-1.spec.js on lines 86..93
integration/specs/Accordion/accordion-1.spec.js on lines 94..101
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 29..36
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 38..45
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 55..62
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 64..71
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 81..88
integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 15..22

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

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

    it('should move focus to the first button icon when the last button icon is focused and press arrow down', async () => {
        const accordion = new PageAccordion(ACCORDION);
        const firstAccordionSection = await accordion.getItem(0);
        const lastAccordionSection = await accordion.getItem(2);
        await lastAccordionSection.clickButton();
Severity: Major
Found in integration/specs/Accordion/accordion-1.spec.js and 13 other locations - About 3 hrs to fix
integration/specs/Accordion/accordion-1.spec.js on lines 38..45
integration/specs/Accordion/accordion-1.spec.js on lines 46..53
integration/specs/Accordion/accordion-1.spec.js on lines 54..61
integration/specs/Accordion/accordion-1.spec.js on lines 70..77
integration/specs/Accordion/accordion-1.spec.js on lines 78..85
integration/specs/Accordion/accordion-1.spec.js on lines 86..93
integration/specs/Accordion/accordion-1.spec.js on lines 94..101
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 29..36
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 38..45
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 55..62
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 64..71
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 81..88
integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 15..22

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

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

    it('should move focus to the last button icon when the first button icon is focused and press arrow left', async () => {
        const accordion = new PageAccordion(ACCORDION);
        const firstAccordionSection = await accordion.getItem(0);
        const lastAccordionSection = await accordion.getItem(2);
        await firstAccordionSection.clickButton();
Severity: Major
Found in integration/specs/Accordion/accordion-1.spec.js and 13 other locations - About 3 hrs to fix
integration/specs/Accordion/accordion-1.spec.js on lines 38..45
integration/specs/Accordion/accordion-1.spec.js on lines 46..53
integration/specs/Accordion/accordion-1.spec.js on lines 54..61
integration/specs/Accordion/accordion-1.spec.js on lines 62..69
integration/specs/Accordion/accordion-1.spec.js on lines 70..77
integration/specs/Accordion/accordion-1.spec.js on lines 86..93
integration/specs/Accordion/accordion-1.spec.js on lines 94..101
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 29..36
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 38..45
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 55..62
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 64..71
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 81..88
integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 15..22

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

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

    it('should move focus to the next button icon when the first button icon is focused and press arrow down', async () => {
        const accordion = new PageAccordion(ACCORDION);
        const firstAccordionSection = await accordion.getItem(0);
        const secondAccordionSection = await accordion.getItem(1);
        await firstAccordionSection.clickButton();
Severity: Major
Found in integration/specs/Accordion/accordion-1.spec.js and 13 other locations - About 3 hrs to fix
integration/specs/Accordion/accordion-1.spec.js on lines 46..53
integration/specs/Accordion/accordion-1.spec.js on lines 54..61
integration/specs/Accordion/accordion-1.spec.js on lines 62..69
integration/specs/Accordion/accordion-1.spec.js on lines 70..77
integration/specs/Accordion/accordion-1.spec.js on lines 78..85
integration/specs/Accordion/accordion-1.spec.js on lines 86..93
integration/specs/Accordion/accordion-1.spec.js on lines 94..101
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 29..36
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 38..45
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 55..62
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 64..71
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 81..88
integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 15..22

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

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

    it('should move focus to the next button icon when the first button icon is focused and press arrow right', async () => {
        const accordion = new PageAccordion(ACCORDION);
        const firstAccordionSection = await accordion.getItem(0);
        const secondAccordionSection = await accordion.getItem(1);
        await firstAccordionSection.clickButton();
Severity: Major
Found in integration/specs/Accordion/accordion-1.spec.js and 13 other locations - About 3 hrs to fix
integration/specs/Accordion/accordion-1.spec.js on lines 38..45
integration/specs/Accordion/accordion-1.spec.js on lines 46..53
integration/specs/Accordion/accordion-1.spec.js on lines 54..61
integration/specs/Accordion/accordion-1.spec.js on lines 62..69
integration/specs/Accordion/accordion-1.spec.js on lines 78..85
integration/specs/Accordion/accordion-1.spec.js on lines 86..93
integration/specs/Accordion/accordion-1.spec.js on lines 94..101
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 29..36
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 38..45
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 55..62
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 64..71
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 81..88
integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 15..22

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

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

    it('should move focus to the last button icon when the first button icon is focused and press arrow up', async () => {
        const accordion = new PageAccordion(ACCORDION);
        const firstAccordionSection = await accordion.getItem(0);
        const lastAccordionSection = await accordion.getItem(2);
        await firstAccordionSection.clickButton();
Severity: Major
Found in integration/specs/Accordion/accordion-1.spec.js and 13 other locations - About 3 hrs to fix
integration/specs/Accordion/accordion-1.spec.js on lines 38..45
integration/specs/Accordion/accordion-1.spec.js on lines 54..61
integration/specs/Accordion/accordion-1.spec.js on lines 62..69
integration/specs/Accordion/accordion-1.spec.js on lines 70..77
integration/specs/Accordion/accordion-1.spec.js on lines 78..85
integration/specs/Accordion/accordion-1.spec.js on lines 86..93
integration/specs/Accordion/accordion-1.spec.js on lines 94..101
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 29..36
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 38..45
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 55..62
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 64..71
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 81..88
integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 15..22

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

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

    it('should move focus to the previous button icon when the second button icon is focused and press arrow left', async () => {
        const accordion = new PageAccordion(ACCORDION);
        const firstAccordionSection = await accordion.getItem(0);
        const secondAccordionSection = await accordion.getItem(1);
        await secondAccordionSection.clickButton();
Severity: Major
Found in integration/specs/Accordion/accordion-1.spec.js and 13 other locations - About 3 hrs to fix
integration/specs/Accordion/accordion-1.spec.js on lines 38..45
integration/specs/Accordion/accordion-1.spec.js on lines 46..53
integration/specs/Accordion/accordion-1.spec.js on lines 54..61
integration/specs/Accordion/accordion-1.spec.js on lines 62..69
integration/specs/Accordion/accordion-1.spec.js on lines 70..77
integration/specs/Accordion/accordion-1.spec.js on lines 78..85
integration/specs/Accordion/accordion-1.spec.js on lines 94..101
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 29..36
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 38..45
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 55..62
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 64..71
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 81..88
integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 15..22

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

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

    it('should move focus to the first button icon when the last button icon is focused and press arrow right', async () => {
        const accordion = new PageAccordion(ACCORDION);
        const firstAccordionSection = await accordion.getItem(0);
        const lastAccordionSection = await accordion.getItem(2);
        await lastAccordionSection.clickButton();
Severity: Major
Found in integration/specs/Accordion/accordion-1.spec.js and 13 other locations - About 3 hrs to fix
integration/specs/Accordion/accordion-1.spec.js on lines 38..45
integration/specs/Accordion/accordion-1.spec.js on lines 46..53
integration/specs/Accordion/accordion-1.spec.js on lines 54..61
integration/specs/Accordion/accordion-1.spec.js on lines 62..69
integration/specs/Accordion/accordion-1.spec.js on lines 70..77
integration/specs/Accordion/accordion-1.spec.js on lines 78..85
integration/specs/Accordion/accordion-1.spec.js on lines 86..93
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 29..36
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 38..45
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 55..62
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 64..71
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 81..88
integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 15..22

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

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 collapse the accordion section when click twice on the button icon', async () => {
        const accordion = new PageAccordion(ACCORDION);
        const accordionSection = await accordion.getItem(0);
        await accordionSection.clickButton();
        await accordionSection.clickButton();
Severity: Major
Found in integration/specs/Accordion/accordion-1.spec.js and 2 other locations - About 2 hrs to fix
integration/specs/VerticalNavigation/verticalNavigation-11.spec.js on lines 16..22
integration/specs/VerticalNavigation/verticalNavigation-11.spec.js on lines 37..43

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

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

    it('should expand the accordion section when its button icon is clicked', async () => {
        const accordion = new PageAccordion(ACCORDION);
        const accordionSection = await accordion.getItem(0);
        await accordionSection.clickButton();
        await expect(await accordionSection.isExpanded()).toBe(true);
Severity: Major
Found in integration/specs/Accordion/accordion-1.spec.js and 21 other locations - About 2 hrs to fix
integration/specs/Accordion/accordion-5.spec.js on lines 15..20
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 15..20
integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 22..27
integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 24..29
integration/specs/ButtonGroupPicker/buttonGroupPicker-5.spec.js on lines 15..20
integration/specs/ButtonGroupPicker/buttonGroupPicker-5.spec.js on lines 22..27
integration/specs/CarouselCard/carouselCard.spec.js on lines 15..20
integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 16..21
integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 38..43
integration/specs/InternalDropdown/internalDropdown-1.spec.js on lines 65..70
integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 16..21
integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 37..42
integration/specs/RadioGroup/radioGroup-1.spec.js on lines 15..20
integration/specs/RadioGroup/radioGroup-1.spec.js on lines 38..43
integration/specs/Sidebar/sidebar-1.spec.js on lines 16..21
integration/specs/Tabset/tabset-1.spec.js on lines 16..21
integration/specs/VerticalNavigation/verticalNavigation-11.spec.js on lines 23..28
integration/specs/VisualPicker/visualPicker-1.spec.js on lines 15..20
integration/specs/VisualPicker/visualPicker-1.spec.js on lines 29..34
integration/specs/VisualPicker/visualPicker-3.spec.js on lines 14..19
integration/specs/VisualPicker/visualPicker-3.spec.js on lines 28..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 79.

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

There are no issues that match your filters.

Category
Status