nexxtway/react-rainbow

View on GitHub
integration/specs/TimePicker/timePicker-1.spec.js

Summary

Maintainability
F
3 wks
Test Coverage

File timePicker-1.spec.js has 529 lines of code (exceeds 250 allowed). Consider refactoring.
Open

const PageTimePicker = require('../../../src/components/TimePicker/pageObject');
const {
    ARROW_LEFT_KEY,
    ARROW_RIGHT_KEY,
    ARROW_UP_KEY,
Severity: Major
Found in integration/specs/TimePicker/timePicker-1.spec.js - About 1 day to fix

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

        it('should set the right minutes input value and focus am-pm selector when type "56" and minutes input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 5 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 363..372

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should set the right minutes input value and focus am-pm selector when type "09" and minutes input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 5 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 373..382

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

    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 minutes input value to "00" when press up key after reset minutes input', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setMinutesValue('03');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 435..444
    integration/specs/TimePicker/timePicker-1.spec.js on lines 445..454
    integration/specs/TimePicker/timePicker-1.spec.js on lines 465..474

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

    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 hour input value to "12" when press down key after reset hour input', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setHourValue('05');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 435..444
    integration/specs/TimePicker/timePicker-1.spec.js on lines 465..474
    integration/specs/TimePicker/timePicker-1.spec.js on lines 485..494

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

    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 hour input value to "01" when press up key after reset hour input', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setHourValue('05');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 445..454
    integration/specs/TimePicker/timePicker-1.spec.js on lines 465..474
    integration/specs/TimePicker/timePicker-1.spec.js on lines 485..494

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

    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 minutes input value to "59" when press down key after reset minutes input', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setMinutesValue('34');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 435..444
    integration/specs/TimePicker/timePicker-1.spec.js on lines 445..454
    integration/specs/TimePicker/timePicker-1.spec.js on lines 485..494

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should set the right hour input value and focus minutes input when type "02" and hour input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys('0');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 252..260

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should set the right hour input value and focus minutes input when type "15" and hour input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys('1');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 243..251

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should set the right minutes input value and keep the focus on minutes input when type "5" and minutes input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 354..362

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should set the right minutes input value and focus am-pm selector when type "6" and minutes input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 383..391

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

    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 set minutes input value to "00" when press up button after reset minutes input', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setMinutesValue('03');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 2 other locations - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 455..464
    integration/specs/TimePicker/timePicker-1.spec.js on lines 475..484

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

    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 set hour input value to "12" when press down button after reset hour input', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setHourValue('05');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 2 other locations - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 475..484
    integration/specs/TimePicker/timePicker-1.spec.js on lines 495..504

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

    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 set minutes input value to "59" when press down button after reset minutes input', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setMinutesValue('34');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 2 other locations - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 455..464
    integration/specs/TimePicker/timePicker-1.spec.js on lines 495..504

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should close the time selector when press escape key while time selector is open', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await expect(await timePicker.isOpen()).toBe(true);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
    integration/specs/DatePicker/datepicker-1.spec.js on lines 34..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 125.

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

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

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

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

    Refactorings

    Further Reading

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

        it('should open the time selector when space key is pressed while TimePicker is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ESCAPE_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 81..90

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should close the time selector when press cancel button while time selector is open', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await expect(await timePicker.isOpen()).toBe(true);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 46..54

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should open the time selector when enter key is pressed while TimePicker is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ESCAPE_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 71..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 124.

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

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

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

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

    Refactorings

    Further Reading

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

        it('should close the time selector when press ok button while time selector is open', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await expect(await timePicker.isOpen()).toBe(true);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 55..63

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

    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 select pm input when am input is selected and down key is pressed', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 112..120
    integration/specs/TimePicker/timePicker-1.spec.js on lines 121..129
    integration/specs/TimePicker/timePicker-1.spec.js on lines 154..162

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

    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 keep the focus on am-pm selector when right key is pressed while am-pm selector is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 112..120
    integration/specs/TimePicker/timePicker-1.spec.js on lines 145..153
    integration/specs/TimePicker/timePicker-1.spec.js on lines 154..162

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

    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 focus the minutes input when the left key is pressed while am-pm selector is focused and the time selector is open', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 121..129
    integration/specs/TimePicker/timePicker-1.spec.js on lines 145..153
    integration/specs/TimePicker/timePicker-1.spec.js on lines 154..162

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

    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 set the right hour input value and focus minutes input when type "2" and hour input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys('2');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 2 other locations - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 261..268
    integration/specs/TimePicker/timePicker-1.spec.js on lines 269..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 113.

    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 set the right hour input value and keep the focus on hour input when type "0"', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys('0');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 2 other locations - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 235..242
    integration/specs/TimePicker/timePicker-1.spec.js on lines 269..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 113.

    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 select pm input when am input is selected and up key is pressed', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 112..120
    integration/specs/TimePicker/timePicker-1.spec.js on lines 121..129
    integration/specs/TimePicker/timePicker-1.spec.js on lines 145..153

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

    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 set the right hour input value and keep the focus on hour input when type "1"', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys('1');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 2 other locations - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 235..242
    integration/specs/TimePicker/timePicker-1.spec.js on lines 261..268

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should set the right time on TimePicker input when hour input and minutes input has values and press enter key', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setHourValue('02');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 172..180

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should reset minutes input when has a value and press delete key while minutes input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setMinutesValue('56');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 417..425

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should not set any time on TimePicker when hour input and minutes input has values and press escape key', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setHourValue('02');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 514..522

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should reset hour input when has a value and press delete key while hour input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setHourValue('02');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 426..434

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

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 112.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 112.

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

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

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

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

    Refactorings

    Further Reading

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

        it('should set hour input value to "02" when press twice on up key while hour input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_UP_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 3 hrs to fix
    integration/specs/Picklist/picklist-1.spec.js on lines 103..110
    integration/specs/TimePicker/timePicker-1.spec.js on lines 308..315
    integration/specs/TimePicker/timePicker-1.spec.js on lines 392..399

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

    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 minutes input value to "00" when press up key while minutes input value is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 3 hrs to fix
    integration/specs/Picklist/picklist-1.spec.js on lines 103..110
    integration/specs/TimePicker/timePicker-1.spec.js on lines 205..212
    integration/specs/TimePicker/timePicker-1.spec.js on lines 308..315

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

    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 minutes input value to "59" when press down key while minutes input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 3 hrs to fix
    integration/specs/Picklist/picklist-1.spec.js on lines 103..110
    integration/specs/TimePicker/timePicker-1.spec.js on lines 205..212
    integration/specs/TimePicker/timePicker-1.spec.js on lines 392..399

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should select am input by default when any time is set yet and the time selector is open', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 104..111

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should focus am-pm selector when the right key is pressed while minutes input is focused and the time selector is open', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 137..144

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should select am input by default when the hour input has a value less than 12 while am-pm selector is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setHourValue('11');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 189..196

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should select pm input by default when the hour input has a value greater than 11 while am-pm selector is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setHourValue('14');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 181..188

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should set hour input value to "01" when hour input has "0" as value and press up button while hour input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setHourValue('0');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 523..530

    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

        it('should set hour input value to "12" when hour input has "0" as value and press down button while hour input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setHourValue('0');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 227..234

    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

        it('should set minutes input value to "00" when press up button while minutes input value is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 336..343

    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

        it('should set minutes input value to "59" when press down button while minutes input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 400..407

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

        it('should keep focus the TimePicker component when time selector is closed', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ESCAPE_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 2 hrs to fix
    integration/specs/Picklist/picklist-1.spec.js on lines 56..62
    integration/specs/TimePicker/timePicker-1.spec.js on lines 97..103
    integration/specs/TimePicker/timePicker-1.spec.js on lines 130..136

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

    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 keep the focus hour input when left key is pressed while hour input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_LEFT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 2 hrs to fix
    integration/specs/Picklist/picklist-1.spec.js on lines 56..62
    integration/specs/TimePicker/timePicker-1.spec.js on lines 64..70
    integration/specs/TimePicker/timePicker-1.spec.js on lines 97..103

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

    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 focus the minutes input when the right key is pressed while hour input is focused and the time selector is open', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 3 other locations - About 2 hrs to fix
    integration/specs/Picklist/picklist-1.spec.js on lines 56..62
    integration/specs/TimePicker/timePicker-1.spec.js on lines 64..70
    integration/specs/TimePicker/timePicker-1.spec.js on lines 130..136

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

    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 focus the hour input by default when the time selector is open', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await expect(await timePicker.hasFocusHourInput()).toBe(true);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 6 other locations - About 1 hr to fix
    integration/specs/DatePicker/datepicker-1.spec.js on lines 22..27
    integration/specs/DatePicker/datepicker-1.spec.js on lines 28..33
    integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 14..19
    integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 20..25
    integration/specs/TimePicker/timePicker-1.spec.js on lines 25..30
    integration/specs/TimePicker/timePicker-1.spec.js on lines 31..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 74.

    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 open the time selector when click on TimePicker component', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await expect(await timePicker.isOpen()).toBe(true);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 6 other locations - About 1 hr to fix
    integration/specs/DatePicker/datepicker-1.spec.js on lines 22..27
    integration/specs/DatePicker/datepicker-1.spec.js on lines 28..33
    integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 14..19
    integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 20..25
    integration/specs/TimePicker/timePicker-1.spec.js on lines 31..36
    integration/specs/TimePicker/timePicker-1.spec.js on lines 91..96

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

    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 open the time selector when click on the label of the TimePicker component', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickLabel();
            await timePicker.waitUntilOpen();
            await expect(await timePicker.isOpen()).toBe(true);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 6 other locations - About 1 hr to fix
    integration/specs/DatePicker/datepicker-1.spec.js on lines 22..27
    integration/specs/DatePicker/datepicker-1.spec.js on lines 28..33
    integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 14..19
    integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 20..25
    integration/specs/TimePicker/timePicker-1.spec.js on lines 25..30
    integration/specs/TimePicker/timePicker-1.spec.js on lines 91..96

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

    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