department-of-veterans-affairs/vets-website

View on GitHub
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx

Summary

Maintainability
C
1 day
Test Coverage

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

  it('should render the full name', () => {
    const view = renderWithTestData(testData);
    expect(view.queryByText(/Name/)).to.exist;
    expect(view.queryByText(/First Last/)).to.exist;
  });
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 34..38
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 39..43
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 44..48

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

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 render the VA disability rating', () => {
    const view = renderWithTestData(testData);
    expect(view.queryByText(/VA disability rating/)).to.exist;
    expect(view.queryByText(/70/)).to.exist;
  });
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 29..33
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 34..38
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 39..43

Duplicated Code

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

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

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

Tuning

This issue has a mass of 70.

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 render the latest service', () => {
    const view = renderWithTestData(testData);
    expect(view.queryByText(/Latest period of service/)).to.exist;
    expect(view.queryByText(/United States Army • 2009-2013/)).to.exist;
  });
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 29..33
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 39..43
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 44..48

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

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 render the DOD ID Number', () => {
    const view = renderWithTestData(testData);
    expect(view.queryByText(/DOD ID Number/)).to.exist;
    expect(view.queryByText(/6198661986/)).to.exist;
  });
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 29..33
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 34..38
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 44..48

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

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

    <ProofOfVeteranStatusCard
      edipi={data.edipi}
      formattedFullName={data.formattedFullName}
      latestService={data.latestService}
      totalDisabilityRating={data.totalDisabilityRating}
src/applications/appeals/10182/components/ConfirmationPageV2.jsx on lines 174..179
src/applications/appeals/996/components/ConfirmationPageV2.jsx on lines 144..149
src/applications/edu-benefits/feedback-tool/components/ListItem.jsx on lines 13..18

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

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 render the description', () => {
    const view = renderWithTestData(testData);
    expect(
      view.queryByText(/This status doesn’t entitle you to any VA benefits./),
    ).to.exist;
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 25..28
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 55..60
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 61..66

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

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 render the heading', () => {
    const view = renderWithTestData(testData);
    expect(view.queryByText(/Proof of Veteran status/)).to.exist;
  });
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 49..54
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 55..60
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 61..66

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

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 render the description', () => {
    const view = renderWithTestData(testData);
    expect(
      view.queryByText(/This status doesn’t entitle you to any VA benefits./),
    ).to.exist;
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 25..28
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 49..54
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 61..66

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

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 render the description', () => {
    const view = renderWithTestData(testData);
    expect(
      view.queryByAltText(/Seal of the U.S. Department of Veterans Affairs/),
    ).to.exist;
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 25..28
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 49..54
src/applications/personalization/profile/components/proof-of-veteran-status/ProofOfVeteranStatusCard/ProofOfVeteranStatusCard.unit.spec.jsx on lines 55..60

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

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