nexxtway/react-rainbow

View on GitHub
src/components/Calendar/pageObject/doubleCalendar.js

Summary

Maintainability
F
4 days
Test Coverage

PageDoubleCalendar has 27 functions (exceeds 20 allowed). Consider refactoring.
Open

class PageDoubleCalendar {
    /**
     * Create a new PageCalendar page object.
     * @constructor
     * @param {string} rootElement - The selector of the PageCalendar root element.
Severity: Minor
Found in src/components/Calendar/pageObject/doubleCalendar.js - About 3 hrs to fix

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

        async clickLeftMonthDay(day) {
            const buttonEl = await $(this.rootElement)
                .$$('table[role=grid]')[0]
                .$(`button=${day}`);
            if (await buttonEl.isExisting()) {
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 3 hrs to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 210..218

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

    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 clickRightMonthDay(day) {
            const buttonEl = await $(this.rootElement)
                .$$('table[role=grid]')[1]
                .$(`button=${day}`);
            if (await buttonEl.isExisting()) {
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 3 hrs to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 91..99

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

    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 isLeftMonthDaySelected(day) {
            const buttonEl = await $(this.rootElement)
                .$$('table[role=grid]')[0]
                .$(`button=${day}`);
            return (
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 2 hrs to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 283..291

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

    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 isRightMonthDaySelected(day) {
            const buttonEl = await $(this.rootElement)
                .$$('table[role=grid]')[1]
                .$(`button=${day}`);
            return (
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 2 hrs to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 164..172

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

    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 isLeftMonthDayFocused(day) {
            const buttonEl = await $(this.rootElement)
                .$$('table[role=grid]')[0]
                .$(`button=${day}`);
            return (await buttonEl.isExisting()) && (await buttonEl.isFocused());
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 2 hrs to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 271..276

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

    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 isRightMonthDayFocused(day) {
            const buttonEl = await $(this.rootElement)
                .$$('table[role=grid]')[1]
                .$(`button=${day}`);
            return (await buttonEl.isExisting()) && (await buttonEl.isFocused());
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 2 hrs to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 152..157

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

    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 getLeftMonthSelectedDay() {
            const day = await $(this.rootElement)
                .$$('table[role=grid]')[0]
                .$('button[data-selected=true]');
            if (await day.isExisting()) return day.getText();
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 2 hrs to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 247..253

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

    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 getRightMonthSelectedDay() {
            const day = await $(this.rootElement)
                .$$('table[role=grid]')[1]
                .$('button[data-selected=true]');
            if (await day.isExisting()) return day.getText();
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 2 hrs to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 128..134

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

    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 isRightMonthDayEnabled(day) {
            const buttonEl = await $(this.rootElement)
                .$$('table[role=grid]')[1]
                .$(`button=${day}`);
            return buttonEl.isExisting();
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 1 hr to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 179..184

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

    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 isLeftMonthDayEnabled(day) {
            const buttonEl = await $(this.rootElement)
                .$$('table[role=grid]')[0]
                .$(`button=${day}`);
            return buttonEl.isExisting();
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 1 hr to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 298..303

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

    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

        async isNextMonthButtonFocused() {
            const buttonEl = (await $(this.rootElement).$$('button[data-id=button-icon-element]'))[1];
            return (await buttonEl.isExisting()) && (await buttonEl.isFocused());
        }
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 3 other locations - About 1 hr to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 62..65
    src/components/Calendar/pageObject/doubleCalendar.js on lines 191..194
    src/components/ColorPicker/pageObject/index.js on lines 139..142

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

    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

        async isPrevMonthButtonFocused() {
            const buttonEl = (await $(this.rootElement).$$('button[data-id=button-icon-element]'))[0];
            return (await buttonEl.isExisting()) && (await buttonEl.isFocused());
        }
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 3 other locations - About 1 hr to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 72..75
    src/components/Calendar/pageObject/doubleCalendar.js on lines 191..194
    src/components/ColorPicker/pageObject/index.js on lines 139..142

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

    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

        async isLeftYearSelectFocused() {
            const selectEl = (await $(this.rootElement).$$('select'))[0];
            return (await selectEl.isExisting()) && (await selectEl.isFocused());
        }
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 3 other locations - About 1 hr to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 62..65
    src/components/Calendar/pageObject/doubleCalendar.js on lines 72..75
    src/components/ColorPicker/pageObject/index.js on lines 139..142

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

    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

        async isNextMonthButtonDisabled() {
            const buttonEl = (await $(this.rootElement).$$('button[data-id=button-icon-element]'))[1];
            return !(await buttonEl.isEnabled());
        }
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 4 other locations - About 1 hr to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 42..45
    src/components/Calendar/pageObject/singleCalendar.js on lines 146..149
    src/components/Calendar/pageObject/singleCalendar.js on lines 156..159
    src/components/MonthlyCalendar/pageObject/index.js on lines 84..87

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

    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

        async isPrevMonthButtonDisabled() {
            const buttonEl = (await $(this.rootElement).$$('button[data-id=button-icon-element]'))[0];
            return !(await buttonEl.isEnabled());
        }
    Severity: Major
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 4 other locations - About 1 hr to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 52..55
    src/components/Calendar/pageObject/singleCalendar.js on lines 146..149
    src/components/Calendar/pageObject/singleCalendar.js on lines 156..159
    src/components/MonthlyCalendar/pageObject/index.js on lines 84..87

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

    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 setRightMonthYear(value) {
            await $(this.rootElement)
                .$$('select')[1]
                .selectByVisibleText(value);
        }
    Severity: Minor
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 35 mins to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 141..145

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

    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 setLeftMonthYear(value) {
            await $(this.rootElement)
                .$$('select')[0]
                .selectByVisibleText(value);
        }
    Severity: Minor
    Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 35 mins to fix
    src/components/Calendar/pageObject/doubleCalendar.js on lines 260..264

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

    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

    There are no issues that match your filters.

    Category
    Status