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 pass the right props to the Label component', () => {
        const component = mount(<CodeInput label="custom label" required />);
        expect(component.find('Label').props()).toEqual({
            label: 'custom label',
            required: true,
Severity: Major
Found in src/components/CodeInput/__test__/codeInput.spec.js and 3 other locations - About 3 hrs to fix
src/components/ButtonGroupPicker/__test__/buttonGroupPicker.spec.js on lines 11..23
src/components/VisualPicker/__test__/visualPicker.spec.js on lines 82..94
src/components/WeekDayPicker/__test__/weekDayPicker.spec.js on lines 12..24

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

    it('should pass the right props to the Label component', () => {
        const component = mount(<VisualPicker label="custom label" required />);
        expect(component.find('Label').props()).toEqual({
            label: 'custom label',
            required: true,
Severity: Major
Found in src/components/VisualPicker/__test__/visualPicker.spec.js and 3 other locations - About 3 hrs to fix
src/components/ButtonGroupPicker/__test__/buttonGroupPicker.spec.js on lines 11..23
src/components/CodeInput/__test__/codeInput.spec.js on lines 26..38
src/components/WeekDayPicker/__test__/weekDayPicker.spec.js on lines 12..24

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

    it('should pass the right props to the Label component', () => {
        const component = mount(<WeekDayPicker label="custom label" required />);
        expect(component.find('Label').props()).toEqual({
            label: 'custom label',
            required: true,
Severity: Major
Found in src/components/WeekDayPicker/__test__/weekDayPicker.spec.js and 3 other locations - About 3 hrs to fix
src/components/ButtonGroupPicker/__test__/buttonGroupPicker.spec.js on lines 11..23
src/components/CodeInput/__test__/codeInput.spec.js on lines 26..38
src/components/VisualPicker/__test__/visualPicker.spec.js on lines 82..94

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

    it('should set active next option when press arrow down key', async () => {
        const internalDropdown = new PageInternalDropdown(INTERNAL_DROPDOWN);
        const option1 = await internalDropdown.getOption(0);
        const option2 = await internalDropdown.getOption(1);
        await option1.click();
integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 29..36
integration/specs/RadioButtonGroup/radioButtonGroup-1.spec.js on lines 50..57
integration/specs/Tabset/tabset-1.spec.js on lines 30..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

    it('should select the last indicator when the first has focus and left arrow key is pressed', async () => {
        const carousel = new PageCarouselCard(CAROUSEL);
        const indicator = await carousel.getIndicatorItem(0);
        await indicator.click();
        await browser.keys('ArrowLeft');
Severity: Major
Found in integration/specs/CarouselCard/carouselCard.spec.js and 2 other locations - About 3 hrs to fix
integration/specs/CarouselCard/carouselCard.spec.js on lines 29..36
integration/specs/CarouselCard/carouselCard.spec.js on lines 37..44

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

    it('shold call onChange when typing in the alpha input', () => {
        const changeFn = jest.fn();
        const component = mount(<ColorInput onChange={changeFn} />);
        component.find('input[type="number"]').simulate('change', { target: { value: '50' } });
        expect(changeFn).toHaveBeenCalledWith({ hex: '#000000', alpha: 0.5 });
Severity: Major
Found in src/components/ColorInput/__test__/colorInput.spec.js and 2 other locations - About 3 hrs to fix
src/components/ColorInput/__test__/colorInput.spec.js on lines 72..77
src/components/ColorInput/__test__/colorInput.spec.js on lines 79..84

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

    it('should call onChange with alpha 1 when type an alpha greater than 100', () => {
        const changeFn = jest.fn();
        const component = mount(<ColorInput onChange={changeFn} />);
        component.find('input[type="number"]').simulate('change', { target: { value: '150' } });
        expect(changeFn).toHaveBeenCalledWith({ hex: '#000000', alpha: 1 });
Severity: Major
Found in src/components/ColorInput/__test__/colorInput.spec.js and 2 other locations - About 3 hrs to fix
src/components/ColorInput/__test__/colorInput.spec.js on lines 58..63
src/components/ColorInput/__test__/colorInput.spec.js on lines 79..84

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

    it('should call onChange with alpha 0 when type an alpha smaller than 0', () => {
        const changeFn = jest.fn();
        const component = mount(<ColorInput onChange={changeFn} />);
        component.find('input[type="number"]').simulate('change', { target: { value: '-10' } });
        expect(changeFn).toHaveBeenCalledWith({ hex: '#000000', alpha: 0 });
Severity: Major
Found in src/components/ColorInput/__test__/colorInput.spec.js and 2 other locations - About 3 hrs to fix
src/components/ColorInput/__test__/colorInput.spec.js on lines 58..63
src/components/ColorInput/__test__/colorInput.spec.js on lines 72..77

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

    it('should select the first indicator when the last has focus and right arrow key is pressed', async () => {
        const carousel = new PageCarouselCard(CAROUSEL);
        const indicator = await carousel.getIndicatorItem(2);
        await indicator.click();
        await browser.keys('ArrowRight');
Severity: Major
Found in integration/specs/CarouselCard/carouselCard.spec.js and 2 other locations - About 3 hrs to fix
integration/specs/CarouselCard/carouselCard.spec.js on lines 21..28
integration/specs/CarouselCard/carouselCard.spec.js on lines 29..36

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

    it('should select the next indicator when the first has focus and right arrow key is pressed', async () => {
        const carousel = new PageCarouselCard(CAROUSEL);
        const indicator = await carousel.getIndicatorItem(0);
        await indicator.click();
        await browser.keys('ArrowRight');
Severity: Major
Found in integration/specs/CarouselCard/carouselCard.spec.js and 2 other locations - About 3 hrs to fix
integration/specs/CarouselCard/carouselCard.spec.js on lines 21..28
integration/specs/CarouselCard/carouselCard.spec.js on lines 37..44

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

TimeSelect has 30 functions (exceeds 20 allowed). Consider refactoring.
Open

export default class TimeSelect extends Component {
    constructor(props) {
        super(props);
        this.state = {
            hour: getHour(props.value),
Severity: Minor
Found in src/components/TimePicker/timeSelect.js - About 3 hrs to fix

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

        it('should loose focus if another option is clicked', async () => {
            const visualPicker = new PageVisualPicker(VISUAL_PICKER);
            const option1 = await visualPicker.getItem(0);
            const option3 = await visualPicker.getItem(2);
            await option1.click();
    Severity: Major
    Found in integration/specs/VisualPicker/visualPicker-3.spec.js and 6 other locations - About 3 hrs to fix
    integration/specs/CarouselCard/carouselCard.spec.js on lines 45..52
    integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 22..29
    integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 44..51
    integration/specs/Tabset/tabset-1.spec.js on lines 38..45
    integration/specs/VisualPicker/visualPicker-1.spec.js on lines 21..28
    integration/specs/VisualPicker/visualPicker-1.spec.js on lines 35..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 108.

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

        it('should not be checked if another option is clicked', async () => {
            const visualPicker = new PageVisualPicker(VISUAL_PICKER);
            const option1 = await visualPicker.getItem(0);
            const option2 = await visualPicker.getItem(1);
            await option1.click();
    Severity: Major
    Found in integration/specs/VisualPicker/visualPicker-1.spec.js and 6 other locations - About 3 hrs to fix
    integration/specs/CarouselCard/carouselCard.spec.js on lines 45..52
    integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 22..29
    integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 44..51
    integration/specs/Tabset/tabset-1.spec.js on lines 38..45
    integration/specs/VisualPicker/visualPicker-1.spec.js on lines 21..28
    integration/specs/VisualPicker/visualPicker-3.spec.js on lines 20..27

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 108.

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

        it('should not loose the checked if another checkbox is clicked', async () => {
            const checkboxGroup = new PageCheckboxGroup(CHECKBOX_GROUP);
            const checkbox1 = await checkboxGroup.getItem(0);
            const checkbox2 = await checkboxGroup.getItem(1);
            await checkbox1.click();
    Severity: Major
    Found in integration/specs/CheckboxGroup/checkboxGroup-1.spec.js and 6 other locations - About 3 hrs to fix
    integration/specs/CarouselCard/carouselCard.spec.js on lines 45..52
    integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 22..29
    integration/specs/Tabset/tabset-1.spec.js on lines 38..45
    integration/specs/VisualPicker/visualPicker-1.spec.js on lines 21..28
    integration/specs/VisualPicker/visualPicker-1.spec.js on lines 35..42
    integration/specs/VisualPicker/visualPicker-3.spec.js on lines 20..27

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 108.

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

        it('should lost focus if other tab is selected', async () => {
            const tabset = new PageTabset(TABSET);
            const tabItem = await tabset.getItem(0);
            const tabItem2 = await tabset.getItem(1);
            await tabItem.click();
    Severity: Major
    Found in integration/specs/Tabset/tabset-1.spec.js and 6 other locations - About 3 hrs to fix
    integration/specs/CarouselCard/carouselCard.spec.js on lines 45..52
    integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 22..29
    integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 44..51
    integration/specs/VisualPicker/visualPicker-1.spec.js on lines 21..28
    integration/specs/VisualPicker/visualPicker-1.spec.js on lines 35..42
    integration/specs/VisualPicker/visualPicker-3.spec.js on lines 20..27

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 108.

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

        it('should loose focus if other indicator is selected', async () => {
            const carousel = new PageCarouselCard(CAROUSEL);
            const indicator = await carousel.getIndicatorItem(0);
            const indicator2 = await carousel.getIndicatorItem(1);
            await indicator.click();
    Severity: Major
    Found in integration/specs/CarouselCard/carouselCard.spec.js and 6 other locations - About 3 hrs to fix
    integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 22..29
    integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 44..51
    integration/specs/Tabset/tabset-1.spec.js on lines 38..45
    integration/specs/VisualPicker/visualPicker-1.spec.js on lines 21..28
    integration/specs/VisualPicker/visualPicker-1.spec.js on lines 35..42
    integration/specs/VisualPicker/visualPicker-3.spec.js on lines 20..27

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 108.

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

        it('should loose focus if another option is clicked', async () => {
            const visualPicker = new PageVisualPicker(VISUAL_PICKER);
            const option1 = await visualPicker.getItem(0);
            const option2 = await visualPicker.getItem(1);
            await option1.click();
    Severity: Major
    Found in integration/specs/VisualPicker/visualPicker-1.spec.js and 6 other locations - About 3 hrs to fix
    integration/specs/CarouselCard/carouselCard.spec.js on lines 45..52
    integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 22..29
    integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 44..51
    integration/specs/Tabset/tabset-1.spec.js on lines 38..45
    integration/specs/VisualPicker/visualPicker-1.spec.js on lines 35..42
    integration/specs/VisualPicker/visualPicker-3.spec.js on lines 20..27

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 108.

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

        it('should lost the focus if another checkbox is clicked', async () => {
            const checkboxGroup = new PageCheckboxGroup(CHECKBOX_GROUP);
            const checkbox1 = await checkboxGroup.getItem(0);
            const checkbox2 = await checkboxGroup.getItem(1);
            await checkbox1.click();
    Severity: Major
    Found in integration/specs/CheckboxGroup/checkboxGroup-1.spec.js and 6 other locations - About 3 hrs to fix
    integration/specs/CarouselCard/carouselCard.spec.js on lines 45..52
    integration/specs/CheckboxGroup/checkboxGroup-1.spec.js on lines 44..51
    integration/specs/Tabset/tabset-1.spec.js on lines 38..45
    integration/specs/VisualPicker/visualPicker-1.spec.js on lines 21..28
    integration/specs/VisualPicker/visualPicker-1.spec.js on lines 35..42
    integration/specs/VisualPicker/visualPicker-3.spec.js on lines 20..27

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 108.

    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