nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

    it('should close the menu when the menu is opened and click an element', async () => {
        const buttonMenu = new PageButtonMenu(MENU_BTN);
        await buttonMenu.click();
        const menuItem = await buttonMenu.getItem(0);
        await menuItem.click();
Severity: Major
Found in integration/specs/ButtonMenu/buttonMenu-5.spec.js and 4 other locations - About 2 hrs to fix
integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 93..99
integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 31..37
integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 38..44
integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 91..97

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        const { getAllByRole } = render(
            <Accordion
                multiple
                activeSectionNames={activeNames}
                onToggleSection={handleToggleSectionMockFn}
Severity: Major
Found in src/components/Accordion/__test__/accordion.spec.js and 1 other location - About 2 hrs to fix
src/components/Accordion/__test__/accordion.spec.js on lines 107..120

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        const { getAllByRole } = render(
            <Accordion
                multiple
                activeSectionNames={activeNames}
                onToggleSection={handleToggleSectionMockFn}
Severity: Major
Found in src/components/Accordion/__test__/accordion.spec.js and 1 other location - About 2 hrs to fix
src/components/Accordion/__test__/accordion.spec.js on lines 67..80

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

    it('should not close the menu when the menu is opened and click an disabled item', async () => {
        const buttonMenu = new PageButtonMenu(MENU_BTN);
        await buttonMenu.click();
        const menuItem = await buttonMenu.getItem(1);
        await menuItem.click();
Severity: Major
Found in integration/specs/ButtonMenu/buttonMenu-13.spec.js and 4 other locations - About 2 hrs to fix
integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 93..99
integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 31..37
integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 34..40
integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 91..97

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

    it('should move focus to the item hovered', async () => {
        const buttonMenu = new PageButtonMenu(MENU_BTN);
        await buttonMenu.click();
        const thirdMenuItem = await buttonMenu.getItem(2);
        await thirdMenuItem.hover();
Severity: Major
Found in integration/specs/ButtonMenu/buttonMenu-5.spec.js and 4 other locations - About 2 hrs to fix
integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 93..99
integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 31..37
integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 38..44
integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 34..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        component.instance().tabsetChildren = [
            <Tab label="Tab-1" name="tab-1" registerTab={registerTabMockFn} />,
            <Tab label="Tab-2" name="tab-2" registerTab={registerTabMockFn} />,
            <Tab label="Tab-3" name="tab-3" registerTab={registerTabMockFn} />,
        ];
Severity: Major
Found in src/components/Tabset/__test__/tabset.spec.js and 1 other location - About 2 hrs to fix
src/components/Tabset/__test__/tabset.spec.js on lines 167..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 91.

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

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

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

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

Refactorings

Further Reading

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

        component.instance().tabsetChildren = [
            <Tab label="Tab-1" name="tab-1" registerTab={registerTabMockFn} />,
            <Tab label="Tab-2" name="tab-2" registerTab={registerTabMockFn} />,
            <Tab label="Tab-3" name="tab-3" registerTab={registerTabMockFn} />,
        ];
Severity: Major
Found in src/components/Tabset/__test__/tabset.spec.js and 1 other location - About 2 hrs to fix
src/components/Tabset/__test__/tabset.spec.js on lines 117..121

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

    it('should not move focus to the item hovered when the item is disabled', async () => {
        const buttonMenu = new PageButtonMenu(MENU_BTN);
        await buttonMenu.click();
        const menuItem = await buttonMenu.getItem(1);
        await menuItem.hover();
Severity: Major
Found in integration/specs/ButtonMenu/buttonMenu-13.spec.js and 4 other locations - About 2 hrs to fix
integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 93..99
integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 38..44
integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 34..40
integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 91..97

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

    it('should move focus to the item hovered', async () => {
        const avatarMenu = new PageAvatarMenu(AVATAR_MENU);
        await avatarMenu.click();
        const menuItem = await avatarMenu.getItem(1);
        await menuItem.hover();
Severity: Major
Found in integration/specs/AvatarMenu/avatarMenu-1.spec.js and 4 other locations - About 2 hrs to fix
integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 31..37
integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 38..44
integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 34..40
integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 91..97

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

    it('should expand the menu when click on its button', async () => {
        const verticalNavigation = new PageVerticalNavigation(VERTICAL_NAV);
        const verticalSectionOverflow = await verticalNavigation.getSectionOverflow(0);
        await verticalSectionOverflow.click();
        await verticalSectionOverflow.waitUntilExpand();
integration/specs/Accordion/accordion-1.spec.js on lines 22..28
integration/specs/VerticalNavigation/verticalNavigation-11.spec.js on lines 37..43

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

    it('should not lost focus the menu when it is expanded and then collapsed', async () => {
        const verticalNavigation = new PageVerticalNavigation(VERTICAL_NAV);
        const verticalSectionOverflow = await verticalNavigation.getSectionOverflow(0);
        await verticalSectionOverflow.click();
        await verticalSectionOverflow.click();
integration/specs/Accordion/accordion-1.spec.js on lines 22..28
integration/specs/VerticalNavigation/verticalNavigation-11.spec.js on lines 16..22

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

Function StepTwo has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function StepTwo(props) {
    const {
        onProcessFile,
        isLoading,
        hasFileSelected,
Severity: Major
Found in src/components/ImportRecordsFlow/stepTwo/index.js - About 2 hrs to fix

    Function Wrapper has 69 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function Wrapper(props) {
        const { children } = props;
        const [theme, setTheme] = useCachedState('theme');
        const pageName = window.location.hash.split('/')[1];
        const isCustimizationPage = pageName === 'Customization';
    Severity: Major
    Found in library/styleguideComponents/Wrapper/index.js - About 2 hrs to fix

      Function PathStep has 69 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function PathStep(props) {
          const { name, label, hasError, className, style } = props;
          const {
              selectedIndex,
              hoveredIndex,
      Severity: Major
      Found in src/components/PathStep/index.js - About 2 hrs to fix

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

        describe('<StrongPasswordInput />', () => {
            it('should be accessible when label is passed', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(<StrongPasswordInput label="Input Label" />);
                const results = await axe(html);
        src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
        src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
        src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
        src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
        src/components/Input/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
        src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
        src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
        src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
        src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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

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

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

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

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

        Refactorings

        Further Reading

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

        describe('<InputCheckbox/>', () => {
            it('should be accessible when label is passed', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(<InputCheckbox label="Input Label" />);
                const results = await axe(html);
        src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
        src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
        src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
        src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
        src/components/Input/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
        src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
        src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
        src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
        src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13
        src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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

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

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

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

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

        Refactorings

        Further Reading

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

        describe('<Slider/>', () => {
            it('should be accessible', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(<Slider label="Slider label" />);
                const results = await axe(html);
        Severity: Major
        Found in src/components/Slider/__test__/slider.a11y.spec.js and 13 other locations - About 2 hrs to fix
        src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
        src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
        src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
        src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
        src/components/Input/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
        src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
        src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
        src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13
        src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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

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

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

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

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

        Refactorings

        Further Reading

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

        describe('<InputCheckbox/>', () => {
            it('should be accessible when label is passed', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(<InputCheckbox label="Input Label" />);
                const results = await axe(html);
        src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
        src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
        src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
        src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
        src/components/Input/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
        src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
        src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
        src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13
        src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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

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

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

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

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

        Refactorings

        Further Reading

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

        describe('<Input/>', () => {
            it('should be accessible when label is passed', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(<Input label="Input Label" />);
                const results = await axe(html);
        Severity: Major
        Found in src/components/Input/__test__/input.a11y.spec.js and 13 other locations - About 2 hrs to fix
        src/components/CheckboxToggle/__test__/checkboxToggle.a11y.spec.js on lines 6..13
        src/components/CounterInput/__test__/counterInput.a11y.spec.js on lines 6..13
        src/components/FileSelector/__test__/fileSelector.a11y.spec.js on lines 6..13
        src/components/HelpText/__test__/helpText.a11y.spec.js on lines 6..13
        src/components/Input/inputBase/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputCheckbox/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/inputRadio/__test__/input.a11y.spec.js on lines 6..13
        src/components/Input/pickerInput/__test__/input.a11y.spec.js on lines 6..13
        src/components/PrimitiveCheckbox/__test__/input.a11y.spec.js on lines 6..13
        src/components/Rating/__test__/rating.a11y.spec.js on lines 6..13
        src/components/Slider/__test__/slider.a11y.spec.js on lines 6..13
        src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js on lines 6..13
        src/components/Textarea/__test__/textarea.a11y.spec.js on lines 6..13

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

        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