Katello/katello

View on GitHub
webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js

Summary

Maintainability
D
2 days
Test Coverage

File CVRpmFilterContent.test.js has 366 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import { renderWithRedux, patientlyWaitFor, fireEvent, act } from 'react-testing-lib-wrapper';
import { Route } from 'react-router-dom';

import ContentViewFilterDetails from '../ContentViewFilterDetails';

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

      const searchResults = [
        {
          completed: `name = ${lastPackageRuleName}`,
          part: 'and',
          label: `name = ${lastPackageRuleName} and`,
    webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js on lines 105..118
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js on lines 83..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 88.

    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

      await patientlyWaitFor(() => {
        expect(getByText(`name = ${lastPackageRuleName} and`)).toBeInTheDocument();
        expect(queryByText(`name = ${firstPackageRuleName} and`)).not.toBeInTheDocument();
      });
    webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js on lines 146..149
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js on lines 138..141

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

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

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

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

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

    Refactorings

    Further Reading

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

      const {
        getByText, queryByText, getByLabelText, getAllByLabelText,
      } =
        renderWithRedux(withCVRoute(<ContentViewFilterDetails
          cvId={1}
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 329..335
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 478..484
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 537..542
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 337..342

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

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

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

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

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

    Refactorings

    Further Reading

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

      const {
        getByText, queryByText, getAllByLabelText, getByLabelText,
      } =
        renderWithRedux(withCVRoute(<ContentViewFilterDetails
          cvId={1}
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 198..204
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 478..484
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 537..542
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 337..342

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

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

      const { getByText, queryByText, getByLabelText } =
        renderWithRedux(withCVRoute(<ContentViewFilterDetails
          cvId={1}
          details={details}
        />), renderOptions);
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 158..162
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 229..235
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 263..267
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 65..69
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 119..123
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 178..182
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 238..242
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 300..304
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js on lines 123..127
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js on lines 96..99
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 53..57
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 110..114
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 168..172
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 228..232
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 291..295
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 55..59
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 111..115
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 167..171
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 227..231
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 288..292
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 469..472

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

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

      const { getByText, queryByText, getAllByLabelText } =
        renderWithRedux(withCVRoute(<ContentViewFilterDetails
          cvId={1}
          details={details}
        />), renderOptions);
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 158..162
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 229..235
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 126..130
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 65..69
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 119..123
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 178..182
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 238..242
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 300..304
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js on lines 123..127
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js on lines 96..99
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 53..57
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 110..114
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 168..172
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 228..232
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 291..295
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 55..59
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 111..115
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 167..171
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 227..231
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 288..292
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 469..472

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

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

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

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

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

    Refactorings

    Further Reading

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

      await patientlyWaitFor(() => {
        expect(getByText(cvFilterName)).toBeInTheDocument();
        expect(getAllByLabelText('Actions')[1]).toBeInTheDocument();
      });
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 271..274
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 283..286

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

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

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

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

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

    Refactorings

    Further Reading

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

      await patientlyWaitFor(() => {
        expect(getByText(cvFilterName)).toBeInTheDocument();
        expect(getAllByLabelText('Actions')[1]).toBeInTheDocument();
      });
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 283..286
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 339..342

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

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

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

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

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

    Refactorings

    Further Reading

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

      await patientlyWaitFor(() => {
        expect(getByText(cvFilterName)).toBeInTheDocument();
        expect(getAllByLabelText('Actions')[1]).toBeInTheDocument();
      });
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 271..274
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 339..342

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

    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

      await patientlyWaitFor(() => {
        expect(getByText(cvFilterName)).toBeInTheDocument();
        expect(getByText(firstPackageRuleName)).toBeInTheDocument();
      });
    webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js on lines 135..138
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js on lines 130..133

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

    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

      await patientlyWaitFor(() => {
        expect(getAllByLabelText('Search input')[0]).toBeInTheDocument();
        expect(queryByText('Cancel')).toBeInTheDocument();
      });
    webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js on lines 159..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 54.

    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

      const {
        queryByLabelText, queryByText, getAllByLabelText,
      } =
        renderWithRedux(withCVRoute(<ContentViewFilterDetails
          cvId={1}
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 316..320
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js on lines 178..181

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

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

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

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

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

    Refactorings

    Further Reading

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

      await patientlyWaitFor(() => {
        expect(getByText(cvFilterName)).toBeInTheDocument();
        expect(getByLabelText('add_rpm_rule')).toBeInTheDocument();
      });
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 74..77
    webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 489..492
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 62..65
    webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 64..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 50.

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

      const { getByText, queryByText } =
        renderWithRedux(withCVRoute(<ContentViewFilterDetails
          cvId={1}
          details={details}
        />), renderOptions);
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 56..60
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 99..103
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js on lines 52..56
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js on lines 45..46
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 89..92
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 235..238
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetailsEmpty.test.js on lines 51..54
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 65..68
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 200..205
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 401..406
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 441..444

    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