department-of-veterans-affairs/vets-website

View on GitHub
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx

Summary

Maintainability
F
2 wks
Test Coverage

File AppointmentDetails.unit.spec.jsx has 727 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable camelcase */
import React from 'react';
import sinon from 'sinon';
import { expect } from 'chai';
import { render } from '@testing-library/react';

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

          describe('Day-of check-in', () => {
            it('Does not render Prepare block', () => {
              const { queryByTestId } = render(
                <CheckInProvider
                  store={dayOfCheckInStore}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 545..568

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

    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

          describe("All appointments - data doesn't exist", () => {
            it('does not render doctor name if missing', () => {
              const { queryByTestId } = render(
                <CheckInProvider
                  store={preCheckInStore}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 569..592

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

    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('does not render review button when appointment is not upcoming, pre-check-in is complete', () => {
              const getPreCheckinCompleteStub = () => {
                return { complete: true };
              };
              const useStorageStub = sinon
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 362..381

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

    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('does not render subtitle when pre check in is not complete', () => {
              const getPreCheckinCompleteStub = () => {
                return { complete: false };
              };
              const useStorageStub = sinon
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 297..317

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

    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('renders correct subtitle when pre check in is complete', () => {
              const getPreCheckinCompleteStub = () => {
                return { complete: true };
              };
              const useStorageStub = sinon
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 277..296
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 342..361
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 476..495

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

    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('renders correct subtitle when pre check in is complete', () => {
              const getPreCheckinCompleteStub = () => {
                return { complete: true };
              };
              const useStorageStub = sinon
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 277..296
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 342..361
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 431..450

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

    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('renders review button when appointment is not upcoming and pre-check-in is not complete', () => {
              const getPreCheckinCompleteStub = () => {
                return { complete: false };
              };
              const useStorageStub = sinon
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 342..361
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 431..450
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 476..495

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

    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('renders correct subtitle when pre check in is complete', () => {
              const getPreCheckinCompleteStub = () => {
                return { complete: true };
              };
              const useStorageStub = sinon
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 277..296
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 431..450
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 476..495

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

    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

          describe('Day-of check-in eligible appointment', () => {
            it('Renders the check-in button and no message', () => {
              const { getByTestId, queryByTestId } = render(
                <CheckInProvider
                  store={dayOfCheckInStore}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 607..620

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

    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

          describe('Day-of check-in ineligible appointment', () => {
            it('Renders the check-in button and no message', () => {
              const { getByTestId, queryByTestId } = render(
                <CheckInProvider
                  store={dayOfCheckInStore}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 593..606

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

    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('Does not show the check-in button and message for appointment only in upcoming', () => {
              const { queryByTestId } = render(
                <CheckInProvider
                  store={dayOfCheckInStore}
                  router={upcomingAppointmentTwoRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 705..716

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 109.

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

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

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

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

    Refactorings

    Further Reading

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

              it('Renders the correct messege when canceller unknown', () => {
                const { queryByTestId } = render(
                  <CheckInProvider
                    store={dayOfCheckInStore}
                    router={upcomingAppointmentFiveRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 634..645

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 109.

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

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

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

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

    Refactorings

    Further Reading

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

            it('should display the pre-check-in incomplete info warning', () => {
              const { getByTestId } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={upcomingAppointmentTwoRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 622..633
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 646..657

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

    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('Renders the check-in button and message for appointment in both arrays', () => {
              const { getByTestId } = render(
                <CheckInProvider
                  store={dayOfCheckInStore}
                  router={upcomingAppointmentOneRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 646..657
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 658..669

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

    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 display the check-in incomplete info warning', () => {
              const { getByTestId } = render(
                <CheckInProvider
                  store={dayOfCheckInStore}
                  router={upcomingAppointmentTwoRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 622..633
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 658..669

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

    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('renders where to attend instead of need to make changes', () => {
              const { getByRole } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentTwoRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 251..263
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 451..462
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 496..508

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

    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('renders where to attend instead of need to make changes', () => {
              const { getByRole } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentTwoRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 251..263
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 382..393
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 496..508

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

    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('renders need to make changes instead of where to attend', () => {
              const { getByRole } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentSixRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 251..263
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 382..393
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 451..462

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

    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('renders need to make changes instead of where to attend', () => {
              const { getByRole } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentOneRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 382..393
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 451..462
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 496..508

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

    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('renders correct heading for appointment type', () => {
              const { getByTestId } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentSixRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 218..228
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 331..341
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 418..430

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 90.

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

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

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

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

    Refactorings

    Further Reading

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

            it('renders correct heading for appointment type', () => {
              const { getByTestId } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentOneRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 331..341
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 418..430
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 465..475

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 90.

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

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

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

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

    Refactorings

    Further Reading

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

            it('renders correct heading for appointment type', () => {
              const { getByTestId } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentTwoRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 218..228
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 418..430
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 465..475

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 90.

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

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

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

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

    Refactorings

    Further Reading

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

            it('renders correct heading for appointment type', () => {
              const { getByTestId } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentFiveRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 218..228
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 331..341
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 465..475

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 90.

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

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

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

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

    Refactorings

    Further Reading

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

            it('renders Prepare block', () => {
              const { getByTestId } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentTwoRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 264..274
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 509..519
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 522..532
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 533..543
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 671..681
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 694..704

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

    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('renders phone number if available', () => {
              const { getByTestId } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentTwoRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 264..274
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 394..404
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 509..519
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 522..532
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 671..681
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 694..704

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

    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('renders facility information', () => {
              const { getByTestId } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentOneRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 394..404
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 509..519
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 522..532
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 533..543
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 671..681
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 694..704

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

    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('Renders the canceled alert', () => {
                const { getByTestId } = render(
                  <CheckInProvider
                    store={dayOfCheckInStore}
                    router={upcomingAppointmentThreeRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 264..274
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 394..404
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 509..519
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 522..532
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 533..543
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 694..704

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

    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('renders doctor name if exists', () => {
              const { getByTestId } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentTwoRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 264..274
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 394..404
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 509..519
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 533..543
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 671..681
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 694..704

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

    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('renders facility information', () => {
              const { getByTestId } = render(
                <CheckInProvider
                  store={preCheckInStore}
                  router={appointmentSixRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 264..274
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 394..404
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 522..532
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 533..543
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 671..681
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 694..704

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

    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('Renders the correct messege for facility canceld', () => {
                const { getByTestId } = render(
                  <CheckInProvider
                    store={dayOfCheckInStore}
                    router={upcomingAppointmentFourRoute}
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 264..274
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 394..404
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 509..519
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 522..532
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 533..543
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 671..681

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

    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

        upcomingAppointments[3] = {
          ...upcomingAppointments[3],
          kind: 'clinic',
          id: '6768',
          doctorName: 'test doc',
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 41..49
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 59..67

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

    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

        upcomingAppointments[4] = {
          ...upcomingAppointments[4],
          kind: 'phone',
          id: '6769',
          doctorName: 'test doc',
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 41..49
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 50..58

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

    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

        upcomingAppointments[2] = {
          ...upcomingAppointments[2],
          kind: 'clinic',
          id: '6767',
          doctorName: 'test doc',
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 50..58
    src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 59..67

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

    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