nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

        expect(component.state().rows).toEqual([
            {
                inputType: 'checkbox',
                isDisabled: false,
                isSelected: true,
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 14 other locations - About 2 hrs to fix
src/components/Table/__test__/table.spec.js on lines 386..405
src/components/Table/__test__/table.spec.js on lines 419..438
src/components/Table/__test__/table.spec.js on lines 446..465
src/components/Table/__test__/table.spec.js on lines 532..551
src/components/Table/__test__/table.spec.js on lines 560..579
src/components/Table/__test__/table.spec.js on lines 584..603
src/components/Table/__test__/table.spec.js on lines 647..666
src/components/Table/__test__/table.spec.js on lines 671..690
src/components/Table/__test__/table.spec.js on lines 705..724
src/components/Table/__test__/table.spec.js on lines 729..748
src/components/Table/__test__/table.spec.js on lines 785..804
src/components/Table/__test__/table.spec.js on lines 843..862
src/components/Table/__test__/table.spec.js on lines 899..918
src/components/Table/__test__/table.spec.js on lines 945..964

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

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

        expect(component.state().rows).toEqual([
            {
                inputType: 'checkbox',
                isDisabled: false,
                isSelected: true,
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 14 other locations - About 2 hrs to fix
src/components/Table/__test__/table.spec.js on lines 386..405
src/components/Table/__test__/table.spec.js on lines 419..438
src/components/Table/__test__/table.spec.js on lines 446..465
src/components/Table/__test__/table.spec.js on lines 508..527
src/components/Table/__test__/table.spec.js on lines 532..551
src/components/Table/__test__/table.spec.js on lines 560..579
src/components/Table/__test__/table.spec.js on lines 584..603
src/components/Table/__test__/table.spec.js on lines 647..666
src/components/Table/__test__/table.spec.js on lines 671..690
src/components/Table/__test__/table.spec.js on lines 705..724
src/components/Table/__test__/table.spec.js on lines 729..748
src/components/Table/__test__/table.spec.js on lines 785..804
src/components/Table/__test__/table.spec.js on lines 899..918
src/components/Table/__test__/table.spec.js on lines 945..964

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

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

        expect(component.state().rows).toEqual([
            {
                inputType: 'checkbox',
                isDisabled: false,
                isSelected: true,
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 14 other locations - About 2 hrs to fix
src/components/Table/__test__/table.spec.js on lines 386..405
src/components/Table/__test__/table.spec.js on lines 419..438
src/components/Table/__test__/table.spec.js on lines 446..465
src/components/Table/__test__/table.spec.js on lines 508..527
src/components/Table/__test__/table.spec.js on lines 532..551
src/components/Table/__test__/table.spec.js on lines 560..579
src/components/Table/__test__/table.spec.js on lines 584..603
src/components/Table/__test__/table.spec.js on lines 647..666
src/components/Table/__test__/table.spec.js on lines 671..690
src/components/Table/__test__/table.spec.js on lines 705..724
src/components/Table/__test__/table.spec.js on lines 729..748
src/components/Table/__test__/table.spec.js on lines 843..862
src/components/Table/__test__/table.spec.js on lines 899..918
src/components/Table/__test__/table.spec.js on lines 945..964

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

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

        expect(component.state().rows).toEqual([
            {
                inputType: 'radio',
                isDisabled: false,
                isSelected: false,
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 14 other locations - About 2 hrs to fix
src/components/Table/__test__/table.spec.js on lines 386..405
src/components/Table/__test__/table.spec.js on lines 419..438
src/components/Table/__test__/table.spec.js on lines 446..465
src/components/Table/__test__/table.spec.js on lines 508..527
src/components/Table/__test__/table.spec.js on lines 532..551
src/components/Table/__test__/table.spec.js on lines 560..579
src/components/Table/__test__/table.spec.js on lines 584..603
src/components/Table/__test__/table.spec.js on lines 647..666
src/components/Table/__test__/table.spec.js on lines 671..690
src/components/Table/__test__/table.spec.js on lines 705..724
src/components/Table/__test__/table.spec.js on lines 729..748
src/components/Table/__test__/table.spec.js on lines 785..804
src/components/Table/__test__/table.spec.js on lines 843..862
src/components/Table/__test__/table.spec.js on lines 945..964

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

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

        expect(component.state().rows).toEqual([
            {
                inputType: 'checkbox',
                isDisabled: false,
                isSelected: false,
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 14 other locations - About 2 hrs to fix
src/components/Table/__test__/table.spec.js on lines 386..405
src/components/Table/__test__/table.spec.js on lines 419..438
src/components/Table/__test__/table.spec.js on lines 446..465
src/components/Table/__test__/table.spec.js on lines 508..527
src/components/Table/__test__/table.spec.js on lines 532..551
src/components/Table/__test__/table.spec.js on lines 560..579
src/components/Table/__test__/table.spec.js on lines 584..603
src/components/Table/__test__/table.spec.js on lines 647..666
src/components/Table/__test__/table.spec.js on lines 671..690
src/components/Table/__test__/table.spec.js on lines 705..724
src/components/Table/__test__/table.spec.js on lines 729..748
src/components/Table/__test__/table.spec.js on lines 785..804
src/components/Table/__test__/table.spec.js on lines 843..862
src/components/Table/__test__/table.spec.js on lines 899..918

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

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

        expect(component.state().rows).toEqual([
            {
                inputType: 'checkbox',
                isDisabled: false,
                isSelected: false,
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 14 other locations - About 2 hrs to fix
src/components/Table/__test__/table.spec.js on lines 386..405
src/components/Table/__test__/table.spec.js on lines 419..438
src/components/Table/__test__/table.spec.js on lines 446..465
src/components/Table/__test__/table.spec.js on lines 508..527
src/components/Table/__test__/table.spec.js on lines 532..551
src/components/Table/__test__/table.spec.js on lines 560..579
src/components/Table/__test__/table.spec.js on lines 584..603
src/components/Table/__test__/table.spec.js on lines 647..666
src/components/Table/__test__/table.spec.js on lines 671..690
src/components/Table/__test__/table.spec.js on lines 729..748
src/components/Table/__test__/table.spec.js on lines 785..804
src/components/Table/__test__/table.spec.js on lines 843..862
src/components/Table/__test__/table.spec.js on lines 899..918
src/components/Table/__test__/table.spec.js on lines 945..964

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

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

        expect(component.state().rows).toEqual([
            {
                inputType: 'checkbox',
                isDisabled: false,
                isSelected: true,
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 14 other locations - About 2 hrs to fix
src/components/Table/__test__/table.spec.js on lines 386..405
src/components/Table/__test__/table.spec.js on lines 419..438
src/components/Table/__test__/table.spec.js on lines 446..465
src/components/Table/__test__/table.spec.js on lines 508..527
src/components/Table/__test__/table.spec.js on lines 532..551
src/components/Table/__test__/table.spec.js on lines 560..579
src/components/Table/__test__/table.spec.js on lines 584..603
src/components/Table/__test__/table.spec.js on lines 647..666
src/components/Table/__test__/table.spec.js on lines 671..690
src/components/Table/__test__/table.spec.js on lines 705..724
src/components/Table/__test__/table.spec.js on lines 785..804
src/components/Table/__test__/table.spec.js on lines 843..862
src/components/Table/__test__/table.spec.js on lines 899..918
src/components/Table/__test__/table.spec.js on lines 945..964

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

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 return true when rect dimensions match in element and container', () => {
        const element = {
            getBoundingClientRect() {
                return {
                    top: 10,
src/components/Lookup/helpers/__test__/isOptionVisible.spec.js on lines 23..41
src/components/Lookup/helpers/__test__/isOptionVisible.spec.js on lines 42..60
src/components/Lookup/helpers/__test__/isOptionVisible.spec.js on lines 61..79

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

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 return false when element top is less than container top', () => {
        const element = {
            getBoundingClientRect() {
                return {
                    top: 8,
src/components/Lookup/helpers/__test__/isOptionVisible.spec.js on lines 4..22
src/components/Lookup/helpers/__test__/isOptionVisible.spec.js on lines 23..41
src/components/Lookup/helpers/__test__/isOptionVisible.spec.js on lines 61..79

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

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 return false when element bottom is greater than container bottom', () => {
        const element = {
            getBoundingClientRect() {
                return {
                    top: 10,
src/components/Lookup/helpers/__test__/isOptionVisible.spec.js on lines 4..22
src/components/Lookup/helpers/__test__/isOptionVisible.spec.js on lines 23..41
src/components/Lookup/helpers/__test__/isOptionVisible.spec.js on lines 42..60

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

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 return true when element rect dimensions are inside container', () => {
        const element = {
            getBoundingClientRect() {
                return {
                    top: 20,
src/components/Lookup/helpers/__test__/isOptionVisible.spec.js on lines 4..22
src/components/Lookup/helpers/__test__/isOptionVisible.spec.js on lines 42..60
src/components/Lookup/helpers/__test__/isOptionVisible.spec.js on lines 61..79

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

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

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

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

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

Refactorings

Further Reading

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

    it('should be enabled the right button when the first tab is visible', async () => {
        const tabset = new PageTabset(TABSET);
        const firstTab = await tabset.getItem(0);
        await expect(await firstTab.isVisibleWithinViewport()).toBe(true);
        await expect(await tabset.isRightButtonEnabled()).toBe(true);
Severity: Major
Found in integration/specs/Tabset/tabset-5.spec.js and 1 other location - About 2 hrs to fix
integration/specs/Tabset/tabset-5.spec.js on lines 16..21

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

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

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

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

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

Refactorings

Further Reading

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

const StyledContainer = styled.div.attrs(props => {
    const theme = getTheme(props);
    const { brand, success } = theme.palette;
    const { light: brandLightColor } = brand;
    const { light: successLightColor } = success;
Severity: Major
Found in src/components/ProgressBar/styled/container.js and 1 other location - About 2 hrs to fix
src/components/ProgressBar/styled/bar.js on lines 4..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 93.

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

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

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

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

Refactorings

Further Reading

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

    it('should not set the onClearValue prop in SelectedValue component when pass readOnly', () => {
        const value = { label: 'New York', description: 'awesome city' };
        const component = mount(<Lookup label="custom label" value={value} readOnly />);
        expect(component.find('SelectedValue').prop('onClearValue')).toBeUndefined();
    });
Severity: Major
Found in src/components/Lookup/__test__/lookup.spec.js and 1 other location - About 2 hrs to fix
src/components/Lookup/__test__/lookup.spec.js on lines 238..242

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

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

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

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

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

Refactorings

Further Reading

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

    it('should not set the onClearValue prop in SelectedValue component when pass disabled', () => {
        const value = { label: 'New York', description: 'awesome city' };
        const component = mount(<Lookup label="custom label" value={value} disabled />);
        expect(component.find('SelectedValue').prop('onClearValue')).toBeUndefined();
    });
Severity: Major
Found in src/components/Lookup/__test__/lookup.spec.js and 1 other location - About 2 hrs to fix
src/components/Lookup/__test__/lookup.spec.js on lines 243..247

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

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

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

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

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

Refactorings

Further Reading

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

    it('should be disabled the left button when the first tab is visible', async () => {
        const tabset = new PageTabset(TABSET);
        const firstTab = await tabset.getItem(0);
        await expect(await firstTab.isVisibleWithinViewport()).toBe(true);
        await expect(await tabset.isLeftButtonEnabled()).toBe(false);
Severity: Major
Found in integration/specs/Tabset/tabset-5.spec.js and 1 other location - About 2 hrs to fix
integration/specs/Tabset/tabset-5.spec.js on lines 22..27

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

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

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

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

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

Refactorings

Further Reading

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

const StyledBar = styled.span.attrs(props => {
    const theme = getTheme(props);
    const { brand, success } = theme.palette;
    const { main: brandMainColor } = brand;
    const { main: successMainColor } = success;
Severity: Major
Found in src/components/ProgressBar/styled/bar.js and 1 other location - About 2 hrs to fix
src/components/ProgressBar/styled/container.js on lines 5..32

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

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

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

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

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

Refactorings

Further Reading

Function ConsoleIcon has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ConsoleIcon = props => {
    const { className } = props;
    return (
        <svg className={className} width="17px" height="17px" viewBox="0 0 17 17" version="1.1">
            <title>console</title>
Severity: Major
Found in library/styleguideComponents/ComponentsList/icons/consoleIcon.js - About 2 hrs to fix

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

        it('should move to the last focusabled item when first item is active and press arrow up', async () => {
            const buttonMenu = new PageButtonMenu(MENU_BTN);
            await buttonMenu.click();
            const menuItem = await buttonMenu.getItem(3);
            await browser.keys('ArrowUp');
    Severity: Major
    Found in integration/specs/ButtonMenu/buttonMenu-13.spec.js and 5 other locations - About 2 hrs to fix
    integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 54..60
    integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 80..86
    integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 45..51
    integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 53..59
    integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 78..84

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

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

        it('should move to the next focusabled item when press arrow down', async () => {
            const buttonMenu = new PageButtonMenu(MENU_BTN);
            await buttonMenu.click();
            const menuItem = await buttonMenu.getItem(2);
            await browser.keys('ArrowDown');
    Severity: Major
    Found in integration/specs/ButtonMenu/buttonMenu-13.spec.js and 5 other locations - About 2 hrs to fix
    integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 54..60
    integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 80..86
    integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 24..30
    integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 53..59
    integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 78..84

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

    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