nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

    it('should set to disable the nextMonthButton when maxDate is less than next month date', () => {
        const value = new Date('04/24/2019');
        const maxDate = new Date('04/30/2019');
        const component = mount(<DoubleCalendar value={value} maxDate={maxDate} />);
        const prevMonthButton = component.find(ButtonIcon).at(1);
src/components/Calendar/__test__/calendar.spec.js on lines 33..39
src/components/Calendar/__test__/calendar.spec.js on lines 40..46
src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 66..72
src/components/MonthlyCalendar/__test__/monthlyCalendar.spec.js on lines 19..25
src/components/MonthlyCalendar/__test__/monthlyCalendar.spec.js on lines 26..32
src/components/WeeklyCalendar/__test__/weeklyCalendar.spec.js on lines 19..25
src/components/WeeklyCalendar/__test__/weeklyCalendar.spec.js on lines 26..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 112.

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

    it('should set to disable the prev week button when minDate is greater than prev week date', () => {
        const value = new Date('04/10/2020');
        const minDate = new Date('04/06/2020');
        const component = mount(<WeeklyCalendar currentWeek={value} minDate={minDate} />);
        const prevWeekButton = component.find(ButtonIcon).at(0);
src/components/Calendar/__test__/calendar.spec.js on lines 33..39
src/components/Calendar/__test__/calendar.spec.js on lines 40..46
src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 66..72
src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 73..79
src/components/MonthlyCalendar/__test__/monthlyCalendar.spec.js on lines 19..25
src/components/MonthlyCalendar/__test__/monthlyCalendar.spec.js on lines 26..32
src/components/WeeklyCalendar/__test__/weeklyCalendar.spec.js on lines 26..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 112.

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

    it('should set to disable the prev month button when minDate is greater than prev month date', () => {
        const value = new Date('04/24/2019');
        const minDate = new Date('04/01/2019');
        const component = mount(<Calendar value={value} minDate={minDate} />);
        const prevMonthButton = component.find(ButtonIcon).at(0);
Severity: Major
Found in src/components/Calendar/__test__/calendar.spec.js and 7 other locations - About 3 hrs to fix
src/components/Calendar/__test__/calendar.spec.js on lines 40..46
src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 66..72
src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 73..79
src/components/MonthlyCalendar/__test__/monthlyCalendar.spec.js on lines 19..25
src/components/MonthlyCalendar/__test__/monthlyCalendar.spec.js on lines 26..32
src/components/WeeklyCalendar/__test__/weeklyCalendar.spec.js on lines 19..25
src/components/WeeklyCalendar/__test__/weeklyCalendar.spec.js on lines 26..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 112.

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

    it('should set to disable the next week button when maxDate is less than next week date', () => {
        const value = new Date('04/08/2020');
        const maxDate = new Date('04/11/2020');
        const component = mount(<WeeklyCalendar currentWeek={value} maxDate={maxDate} />);
        const prevWeekButton = component.find(ButtonIcon).at(1);
src/components/Calendar/__test__/calendar.spec.js on lines 33..39
src/components/Calendar/__test__/calendar.spec.js on lines 40..46
src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 66..72
src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 73..79
src/components/MonthlyCalendar/__test__/monthlyCalendar.spec.js on lines 19..25
src/components/MonthlyCalendar/__test__/monthlyCalendar.spec.js on lines 26..32
src/components/WeeklyCalendar/__test__/weeklyCalendar.spec.js on lines 19..25

Duplicated Code

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

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

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

Tuning

This issue has a mass of 112.

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

    it('should set to disable the prevMonthButton when minDate is greater than prev month date', () => {
        const value = new Date('04/24/2019');
        const minDate = new Date('04/01/2019');
        const component = mount(<DoubleCalendar value={value} minDate={minDate} />);
        const prevMonthButton = component.find(ButtonIcon).at(0);
src/components/Calendar/__test__/calendar.spec.js on lines 33..39
src/components/Calendar/__test__/calendar.spec.js on lines 40..46
src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 73..79
src/components/MonthlyCalendar/__test__/monthlyCalendar.spec.js on lines 19..25
src/components/MonthlyCalendar/__test__/monthlyCalendar.spec.js on lines 26..32
src/components/WeeklyCalendar/__test__/weeklyCalendar.spec.js on lines 19..25
src/components/WeeklyCalendar/__test__/weeklyCalendar.spec.js on lines 26..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 112.

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

    it('should set to disable the next month button when maxDate is less than next month date', () => {
        const value = new Date('04/24/2019');
        const maxDate = new Date('04/30/2019');
        const component = mount(<MonthlyCalendar currentMonth={value} maxDate={maxDate} />);
        const prevMonthButton = component.find(ButtonIcon).at(1);
src/components/Calendar/__test__/calendar.spec.js on lines 33..39
src/components/Calendar/__test__/calendar.spec.js on lines 40..46
src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 66..72
src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 73..79
src/components/MonthlyCalendar/__test__/monthlyCalendar.spec.js on lines 19..25
src/components/WeeklyCalendar/__test__/weeklyCalendar.spec.js on lines 19..25
src/components/WeeklyCalendar/__test__/weeklyCalendar.spec.js on lines 26..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 112.

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 open the DatePicker when space key is pressed while input element is focused', async () => {
        const datePicker = new PageDatePicker(DATEPICKER);
        await datePicker.click();
        await datePicker.waitUntilOpen();
        await browser.keys(ESCAPE_KEY);
Severity: Major
Found in integration/specs/DatePicker/datepicker-1.spec.js and 1 other location - About 3 hrs to fix
integration/specs/DatePicker/datepicker-1.spec.js on lines 43..51

Duplicated Code

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

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

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

Tuning

This issue has a mass of 112.

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 any time on TimePicker input when hour input and minutes input has values and press cancel button', async () => {
        const timePicker = new PageTimePicker(TIME_PICKER);
        await timePicker.clickTimeInput();
        await timePicker.waitUntilOpen();
        await timePicker.setHourValue('02');
Severity: Major
Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
integration/specs/TimePicker/timePicker-1.spec.js on lines 505..513

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

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 return the 3 radios when 3 options are passed', () => {
        const options = [
            { value: 'admin', label: 'Admin', disabled: true },
            { value: 'user', label: 'User' },
            { value: 'anonymous', label: 'Anonymous' },
Severity: Major
Found in src/components/RadioGroup/__test__/radioItems.spec.js and 1 other location - About 3 hrs to fix
src/components/RadioButtonGroup/__test__/buttonItems.spec.js on lines 6..14

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

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 open the DatePicker when enter key is pressed while input element is focused', async () => {
        const datePicker = new PageDatePicker(DATEPICKER);
        await datePicker.click();
        await datePicker.waitUntilOpen();
        await browser.keys(ESCAPE_KEY);
Severity: Major
Found in integration/specs/DatePicker/datepicker-1.spec.js and 1 other location - About 3 hrs to fix
integration/specs/DatePicker/datepicker-1.spec.js on lines 52..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 112.

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 set the right time on TimePicker input when hour input and minutes input has values and press ok button', async () => {
        const timePicker = new PageTimePicker(TIME_PICKER);
        await timePicker.clickTimeInput();
        await timePicker.waitUntilOpen();
        await timePicker.setHourValue('13');
Severity: Major
Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
integration/specs/TimePicker/timePicker-1.spec.js on lines 163..171

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

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

Checkbox.defaultProps = {
    value: undefined,
    label: undefined,
    name: undefined,
    error: null,
Severity: Major
Found in src/components/Input/inputCheckbox/checkbox.js and 1 other location - About 3 hrs to fix
src/components/Input/inputRadio/radio.js on lines 109..125

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

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

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

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

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

Refactorings

Further Reading

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

    it('should render the prev month', () => {
        const value = new Date('04/24/2019');
        const component = mount(<Calendar value={value} />);
        const prevMonthButton = component.find(ButtonIcon).at(0);
        prevMonthButton.simulate('click');
Severity: Major
Found in src/components/Calendar/__test__/calendar.spec.js and 1 other location - About 3 hrs to fix
src/components/Calendar/__test__/calendar.spec.js on lines 26..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 112.

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

Radio.defaultProps = {
    value: undefined,
    label: undefined,
    name: undefined,
    error: null,
Severity: Major
Found in src/components/Input/inputRadio/radio.js and 1 other location - About 3 hrs to fix
src/components/Input/inputCheckbox/checkbox.js on lines 109..125

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

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

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

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

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

Refactorings

Further Reading

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

    it('should render the next month', () => {
        const value = new Date('04/24/2019');
        const component = mount(<Calendar value={value} />);
        const nextMonthButton = component.find(ButtonIcon).at(1);
        nextMonthButton.simulate('click');
Severity: Major
Found in src/components/Calendar/__test__/calendar.spec.js and 1 other location - About 3 hrs to fix
src/components/Calendar/__test__/calendar.spec.js on lines 19..25

Duplicated Code

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

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

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

Tuning

This issue has a mass of 112.

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 return the 3 radios when 3 options are passed', () => {
        const options = [
            { value: 'admin', label: 'Admin', disabled: true },
            { value: 'user', label: 'User' },
            { value: 'anonymous', label: 'Anonymous' },
Severity: Major
Found in src/components/RadioButtonGroup/__test__/buttonItems.spec.js and 1 other location - About 3 hrs to fix
src/components/RadioGroup/__test__/radioItems.spec.js on lines 7..15

Duplicated Code

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

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

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

Tuning

This issue has a mass of 112.

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 DesignIcon has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const DesignIcon = props => {
    const { className } = props;
    return (
        <svg className={className} width="25px" height="26px" viewBox="0 0 25 26" version="1.1">
            <g id="design">
Severity: Major
Found in library/styleguideComponents/ComponentsList/icons/designIcon.js - About 3 hrs to fix

    Function AssignFieldModal has 95 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function AssignFieldModal(props) {
        const {
            isAssignFieldModalOpen,
            onRequestClose,
            columns,
    Severity: Major
    Found in src/components/ImportRecordsFlow/stepThree/assignFieldModal.js - About 3 hrs to fix

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

          it('should close the drawer when click outside', async () => {
              const drawer = new PageDrawer(DRAWER);
              const triggerButton = await $(BUTTON);
              await triggerButton.click();
              await drawer.waitUntilOpen();
      Severity: Major
      Found in integration/specs/Drawer/drawer-1.spec.js and 2 other locations - About 3 hrs to fix
      integration/specs/Drawer/drawer-1.spec.js on lines 40..48
      integration/specs/Drawer/drawer-1.spec.js on lines 58..66

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

      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 close the drawer when is opened and click the close button', async () => {
              const drawer = new PageDrawer(DRAWER);
              const triggerButton = await $(BUTTON);
              await triggerButton.click();
              await drawer.waitUntilOpen();
      Severity: Major
      Found in integration/specs/Drawer/drawer-1.spec.js and 2 other locations - About 3 hrs to fix
      integration/specs/Drawer/drawer-1.spec.js on lines 40..48
      integration/specs/Drawer/drawer-1.spec.js on lines 49..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 111.

      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