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

    it('should focus the next option when press arrow down key', async () => {
        const groupPicker = new PageButtonGroupPicker(BUTTON_GROUP_PICKER);
        const option1 = await groupPicker.getItem(1);
        const option2 = await groupPicker.getItem(2);
        await option1.click();
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/Accordion/accordion-1.spec.js on lines 94..101
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 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 check the next option when press arrow down key', async () => {
        const groupPicker = new PageButtonGroupPicker(BUTTON_GROUP_PICKER);
        const option1 = await groupPicker.getItem(1);
        const option2 = await groupPicker.getItem(2);
        await option1.click();
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/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 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 check the previous option when press arrow left key', async () => {
        const groupPicker = new PageButtonGroupPicker(BUTTON_GROUP_PICKER);
        const option1 = await groupPicker.getItem(1);
        const option2 = await groupPicker.getItem(2);
        await option2.click();
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/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 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 not check the next option when multiple is true and press arrow down key', async () => {
        const groupPicker = new PageButtonGroupPicker(BUTTON_GROUP_PICKER);
        const option2 = await groupPicker.getItem(2);
        const option3 = await groupPicker.getItem(3);
        await option2.click();
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/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

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 check the first option when last option is checked and press arrow right key', async () => {
        const groupPicker = new PageButtonGroupPicker(BUTTON_GROUP_PICKER);
        const option0 = await groupPicker.getItem(0);
        const option2 = await groupPicker.getItem(2);
        await option2.click();
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/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-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 14 locations. Consider refactoring.
Open

    it('should check the next option when press arrow right key', async () => {
        const groupPicker = new PageButtonGroupPicker(BUTTON_GROUP_PICKER);
        const option1 = await groupPicker.getItem(1);
        const option2 = await groupPicker.getItem(2);
        await option1.click();
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/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 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

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

const StyledButton = attachThemeAttrs(styled.button).attrs(props => {
    if (props.palette.isDark) {
        return {
            inverse: {
                text: COLOR_DARK_1,
Severity: Major
Found in src/components/ButtonIcon/styled/button.js and 1 other location - About 3 hrs to fix
src/components/Button/styled/button.js on lines 17..431

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

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

        const component = mount(
            <MapComponent latitude={8} longitude={12} zoom={15}>
                <MapMarker latitude={9} longitude={12} />
                <MapMarker latitude={10} longitude={15} />
                <MapMarker latitude={8} longitude={10} />
Severity: Major
Found in src/components/GMap/__test__/component.spec.js and 1 other location - About 3 hrs to fix
src/components/GMap/__test__/component.spec.js on lines 79..85

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

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

        const component = mount(
            <MapComponent latitude={8} longitude={12} zoom={15}>
                <MapMarker latitude={9} longitude={12} />
                <MapMarker latitude={10} longitude={15} />
                <MapMarker latitude={8} longitude={10} />
Severity: Major
Found in src/components/GMap/__test__/component.spec.js and 1 other location - About 3 hrs to fix
src/components/GMap/__test__/component.spec.js on lines 94..100

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

    it('should focus the next item when press arrow down', async () => {
        const radioGroup = new PageRadioButtonGroup(RADIO_BUTTON_GROUP);
        const radio1 = await radioGroup.getItem(1);
        const radio2 = await radioGroup.getItem(2);
        await radio1.click();
integration/specs/InternalDropdown/internalDropdown-1.spec.js on lines 49..56
integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 50..57
integration/specs/Tabset/tabset-1.spec.js on lines 30..37

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

    it('should pass the right props to the Label component', () => {
        const component = mount(<ButtonGroupPicker label="custom label" required />);
        expect(component.find('Label').props()).toEqual({
            label: 'custom label',
            required: true,
src/components/CodeInput/__test__/codeInput.spec.js on lines 26..38
src/components/VisualPicker/__test__/visualPicker.spec.js on lines 82..94
src/components/WeekDayPicker/__test__/weekDayPicker.spec.js on lines 12..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 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 4 locations. Consider refactoring.
Open

    it('should select the next tab when the first has focus and right arrow key is pressed', async () => {
        const tabset = new PageTabset(TABSET);
        const tabItem = await tabset.getItem(0);
        const tabItem2 = await tabset.getItem(1);
        await tabItem.click();
Severity: Major
Found in integration/specs/Tabset/tabset-1.spec.js and 3 other locations - About 3 hrs to fix
integration/specs/InternalDropdown/internalDropdown-1.spec.js on lines 49..56
integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 29..36
integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 50..57

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

Severity
Category
Status
Source
Language