nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

    it('should set the right max height to the ul element when size is large', () => {
        const component = mount(<Options items={[{}]} size="large" />);
        expect(component.find('ul').prop('style').maxHeight).toBe(384);
    });
Severity: Major
Found in src/components/Lookup/options/__test__/options.spec.js and 3 other locations - About 2 hrs to fix
src/components/Lookup/options/__test__/options.spec.js on lines 27..30
src/components/Lookup/options/__test__/options.spec.js on lines 31..34
src/components/Lookup/options/__test__/options.spec.js on lines 39..42

Duplicated Code

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

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

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

Tuning

This issue has a mass of 80.

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 set the right max height to the ul element when a wrong size is passed', () => {
        const component = mount(<Options items={[{}]} size="wrong size" />);
        expect(component.find('ul').prop('style').maxHeight).toBe(240);
    });
Severity: Major
Found in src/components/Lookup/options/__test__/options.spec.js and 3 other locations - About 2 hrs to fix
src/components/Lookup/options/__test__/options.spec.js on lines 27..30
src/components/Lookup/options/__test__/options.spec.js on lines 31..34
src/components/Lookup/options/__test__/options.spec.js on lines 35..38

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

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(
            <Table data={data} keyField="name" onSort={onSortMock}>
                <Column field="name" header="Name" sortable />
                <Column field="number" header="Number" />,
            </Table>,
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 1 other location - About 2 hrs to fix
src/components/Table/__test__/table.spec.js on lines 344..349

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

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

        [true, false, 'indeterminate'].forEach(value => {
            const component = mount(<Child isChecked={value} />, {
                wrappingComponent: Provider,
                wrappingComponentProps: {
                    value: contextValue,
Severity: Major
Found in src/components/Tree/__test__/child.spec.js and 1 other location - About 2 hrs to fix
src/components/Tree/__test__/child.spec.js on lines 27..35

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

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

    async [privateGetMenu]() {
        const menuId = `#${await $(this.rootElement)
            .$('input[type="text"]')
            .getAttribute('aria-controls')}`;
        if (await this.isMenuOpen()) {
Severity: Major
Found in src/components/Picklist/pageObject/index.js and 1 other location - About 2 hrs to fix
src/components/MultiSelect/pageObject/index.js on lines 84..92

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

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

    constructor(props) {
        super(props);
        this.inputRef = React.createRef();
        this.handleFocus = this.handleFocus.bind(this);
        this.handleClick = this.handleClick.bind(this);
Severity: Major
Found in src/components/Lookup/selectedValue.js and 1 other location - About 2 hrs to fix
src/components/MenuItem/index.js on lines 12..17

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

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

    async [privateGetMenu]() {
        const menuId = `#${await $(this.rootElement)
            .$('[role="combobox"]')
            .getAttribute('aria-controls')}`;
        if (await this.isMenuOpen()) {
Severity: Major
Found in src/components/MultiSelect/pageObject/index.js and 1 other location - About 2 hrs to fix
src/components/Picklist/pageObject/index.js on lines 97..105

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

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

        ['indeterminates', 'one', 'six'].forEach(value => {
            const component = mount(<Child isChecked={value} />, {
                wrappingComponent: Provider,
                wrappingComponentProps: {
                    value: contextValue,
Severity: Major
Found in src/components/Tree/__test__/child.spec.js and 1 other location - About 2 hrs to fix
src/components/Tree/__test__/child.spec.js on lines 16..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 80.

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

    constructor(props) {
        super(props);
        this.itemRef = React.createRef();
        this.handleClick = this.handleClick.bind(this);
        this.handleHover = this.handleHover.bind(this);
Severity: Major
Found in src/components/MenuItem/index.js and 1 other location - About 2 hrs to fix
src/components/Lookup/selectedValue.js on lines 15..20

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

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

File AscensionIsland.js has 260 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import PropTypes from 'prop-types';

function SvgAscensionIsland({ className, style }) {
    return (
Severity: Minor
Found in src/components/PhoneInput/flags/AscensionIsland.js - About 2 hrs to fix

    File styled.js has 260 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import styled from 'styled-components';
    import attachThemeAttrs from '../../../styles/helpers/attachThemeAttrs';
    import {
        FONT_SIZE_HEADING_X_LARGE,
        FONT_SIZE_HEADING_LARGE,
    Severity: Minor
    Found in src/components/MarkdownOutput/renderers/styled.js - About 2 hrs to fix

      Function Trash has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const Trash = props => {
          const { className, style } = props;
          return (
              <svg
                  className={className}
      Severity: Major
      Found in library/exampleComponents/Icons/trash.js - About 2 hrs to fix

        File index.js has 259 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* eslint-disable react/no-unused-prop-types */
        import React, { forwardRef, useState, useEffect, useRef, useImperativeHandle } from 'react';
        import PropTypes from 'prop-types';
        import {
            useLocale,
        Severity: Minor
        Found in src/components/CurrencyInput/index.js - About 2 hrs to fix

          Function useScrollControls has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function useScrollControls(scrollableRef) {
              const [showScrollUp, setShowScrollUp] = useState();
              const [showScrollDown, setShowScrollDown] = useState();
              const timer = useRef();
          
          

            Function Tree has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function Tree(props) {
                const {
                    data,
                    onNodeExpand,
                    onNodeCheck,
            Severity: Major
            Found in src/components/Tree/index.js - About 2 hrs to fix

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

                  it('should set checked on the option when clicked', async () => {
                      const visualPicker = new PageVisualPicker(VISUAL_PICKER);
                      const option = await visualPicker.getItem(0);
                      await option.click();
                      await expect(await option.isChecked()).toBe(true);
              Severity: Major
              Found in integration/specs/VisualPicker/visualPicker-3.spec.js and 21 other locations - About 2 hrs to fix
              integration/specs/Accordion/accordion-1.spec.js on lines 16..21
              integration/specs/Accordion/accordion-5.spec.js on lines 15..20
              integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 15..20
              integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 22..27
              integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 24..29
              integration/specs/ButtonGroupPicker/buttonGroupPicker-5.spec.js on lines 15..20
              integration/specs/ButtonGroupPicker/buttonGroupPicker-5.spec.js on lines 22..27
              integration/specs/CarouselCard/carouselCard.spec.js on lines 15..20
              integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 16..21
              integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 38..43
              integration/specs/InternalDropdown/internalDropdown-1.spec.js on lines 65..70
              integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 16..21
              integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 37..42
              integration/specs/RadioGroup/radioGroup-1.spec.js on lines 15..20
              integration/specs/RadioGroup/radioGroup-1.spec.js on lines 38..43
              integration/specs/Sidebar/sidebar-1.spec.js on lines 16..21
              integration/specs/Tabset/tabset-1.spec.js on lines 16..21
              integration/specs/VerticalNavigation/verticalNavigation-11.spec.js on lines 23..28
              integration/specs/VisualPicker/visualPicker-1.spec.js on lines 15..20
              integration/specs/VisualPicker/visualPicker-1.spec.js on lines 29..34
              integration/specs/VisualPicker/visualPicker-3.spec.js on lines 14..19

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 79.

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

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

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

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

              Refactorings

              Further Reading

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

                  it('should check the option clicked', async () => {
                      const groupPicker = new PageButtonGroupPicker(BUTTON_GROUP_PICKER);
                      const option = await groupPicker.getItem(1);
                      await option.click();
                      await expect(await option.isChecked()).toBe(true);
              integration/specs/Accordion/accordion-1.spec.js on lines 16..21
              integration/specs/Accordion/accordion-5.spec.js on lines 15..20
              integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 15..20
              integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 24..29
              integration/specs/ButtonGroupPicker/buttonGroupPicker-5.spec.js on lines 15..20
              integration/specs/ButtonGroupPicker/buttonGroupPicker-5.spec.js on lines 22..27
              integration/specs/CarouselCard/carouselCard.spec.js on lines 15..20
              integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 16..21
              integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 38..43
              integration/specs/InternalDropdown/internalDropdown-1.spec.js on lines 65..70
              integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 16..21
              integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 37..42
              integration/specs/RadioGroup/radioGroup-1.spec.js on lines 15..20
              integration/specs/RadioGroup/radioGroup-1.spec.js on lines 38..43
              integration/specs/Sidebar/sidebar-1.spec.js on lines 16..21
              integration/specs/Tabset/tabset-1.spec.js on lines 16..21
              integration/specs/VerticalNavigation/verticalNavigation-11.spec.js on lines 23..28
              integration/specs/VisualPicker/visualPicker-1.spec.js on lines 15..20
              integration/specs/VisualPicker/visualPicker-1.spec.js on lines 29..34
              integration/specs/VisualPicker/visualPicker-3.spec.js on lines 14..19
              integration/specs/VisualPicker/visualPicker-3.spec.js on lines 28..33

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 79.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 79.

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

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

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

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

              Refactorings

              Further Reading

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

                  it('should focus the item clicked', async () => {
                      const radioGroup = new PageRadioGroup(RADIO_GROUP);
                      const radio = await radioGroup.getItem(1);
                      await radio.click();
                      await expect(await radio.hasFocus()).toBe(true);
              Severity: Major
              Found in integration/specs/RadioGroup/radioGroup-1.spec.js and 21 other locations - About 2 hrs to fix
              integration/specs/Accordion/accordion-1.spec.js on lines 16..21
              integration/specs/Accordion/accordion-5.spec.js on lines 15..20
              integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 15..20
              integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 22..27
              integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 24..29
              integration/specs/ButtonGroupPicker/buttonGroupPicker-5.spec.js on lines 15..20
              integration/specs/ButtonGroupPicker/buttonGroupPicker-5.spec.js on lines 22..27
              integration/specs/CarouselCard/carouselCard.spec.js on lines 15..20
              integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 16..21
              integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 38..43
              integration/specs/InternalDropdown/internalDropdown-1.spec.js on lines 65..70
              integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 16..21
              integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 37..42
              integration/specs/RadioGroup/radioGroup-1.spec.js on lines 38..43
              integration/specs/Sidebar/sidebar-1.spec.js on lines 16..21
              integration/specs/Tabset/tabset-1.spec.js on lines 16..21
              integration/specs/VerticalNavigation/verticalNavigation-11.spec.js on lines 23..28
              integration/specs/VisualPicker/visualPicker-1.spec.js on lines 15..20
              integration/specs/VisualPicker/visualPicker-1.spec.js on lines 29..34
              integration/specs/VisualPicker/visualPicker-3.spec.js on lines 14..19
              integration/specs/VisualPicker/visualPicker-3.spec.js on lines 28..33

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 79.

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

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

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

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

              Refactorings

              Further Reading

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

                  it('should check the item clicked', async () => {
                      const radioGroup = new PageRadioGroup(RADIO_GROUP);
                      const radio = await radioGroup.getItem(1);
                      await radio.click();
                      await expect(await radio.isChecked()).toBe(true);
              Severity: Major
              Found in integration/specs/RadioGroup/radioGroup-1.spec.js and 21 other locations - About 2 hrs to fix
              integration/specs/Accordion/accordion-1.spec.js on lines 16..21
              integration/specs/Accordion/accordion-5.spec.js on lines 15..20
              integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 15..20
              integration/specs/ButtonGroupPicker/buttonGroupPicker-1.spec.js on lines 22..27
              integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 24..29
              integration/specs/ButtonGroupPicker/buttonGroupPicker-5.spec.js on lines 15..20
              integration/specs/ButtonGroupPicker/buttonGroupPicker-5.spec.js on lines 22..27
              integration/specs/CarouselCard/carouselCard.spec.js on lines 15..20
              integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 16..21
              integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 38..43
              integration/specs/InternalDropdown/internalDropdown-1.spec.js on lines 65..70
              integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 16..21
              integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 37..42
              integration/specs/RadioGroup/radioGroup-1.spec.js on lines 15..20
              integration/specs/Sidebar/sidebar-1.spec.js on lines 16..21
              integration/specs/Tabset/tabset-1.spec.js on lines 16..21
              integration/specs/VerticalNavigation/verticalNavigation-11.spec.js on lines 23..28
              integration/specs/VisualPicker/visualPicker-1.spec.js on lines 15..20
              integration/specs/VisualPicker/visualPicker-1.spec.js on lines 29..34
              integration/specs/VisualPicker/visualPicker-3.spec.js on lines 14..19
              integration/specs/VisualPicker/visualPicker-3.spec.js on lines 28..33

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 79.

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

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

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

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

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language