ICTU/quality-time

View on GitHub
components/frontend/src/report/ReportTitle.test.js

Summary

Maintainability
F
1 wk
Test Coverage

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

import { act, fireEvent, render, screen } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
import history from "history/browser"

import { createTestableSettings } from "../__fixtures__/fixtures"
Severity: Minor
Found in components/frontend/src/report/ReportTitle.test.js - About 2 hrs to fix

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

    it("sets the unknown status reaction time", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        await act(async () => {
            fireEvent.click(screen.getByText(/reaction times/))
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 7 other locations - About 4 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 99..115
    components/frontend/src/report/ReportTitle.test.js on lines 117..133
    components/frontend/src/report/ReportTitle.test.js on lines 135..151
    components/frontend/src/report/ReportTitle.test.js on lines 153..169
    components/frontend/src/report/ReportTitle.test.js on lines 171..187
    components/frontend/src/report/ReportTitle.test.js on lines 189..205
    components/frontend/src/report/ReportTitle.test.js on lines 207..223

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

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

    it("sets the near target met status reaction time", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        await act(async () => {
            fireEvent.click(screen.getByText(/reaction times/))
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 7 other locations - About 4 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 81..97
    components/frontend/src/report/ReportTitle.test.js on lines 99..115
    components/frontend/src/report/ReportTitle.test.js on lines 135..151
    components/frontend/src/report/ReportTitle.test.js on lines 153..169
    components/frontend/src/report/ReportTitle.test.js on lines 171..187
    components/frontend/src/report/ReportTitle.test.js on lines 189..205
    components/frontend/src/report/ReportTitle.test.js on lines 207..223

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

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

    it("sets the confirmed measurement entity status reaction time", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        await act(async () => {
            fireEvent.click(screen.getByText(/reaction times/))
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 7 other locations - About 4 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 81..97
    components/frontend/src/report/ReportTitle.test.js on lines 99..115
    components/frontend/src/report/ReportTitle.test.js on lines 117..133
    components/frontend/src/report/ReportTitle.test.js on lines 135..151
    components/frontend/src/report/ReportTitle.test.js on lines 171..187
    components/frontend/src/report/ReportTitle.test.js on lines 189..205
    components/frontend/src/report/ReportTitle.test.js on lines 207..223

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

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

    it("sets the false positive measurement entity status reaction time", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        await act(async () => {
            fireEvent.click(screen.getByText(/reaction times/))
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 7 other locations - About 4 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 81..97
    components/frontend/src/report/ReportTitle.test.js on lines 99..115
    components/frontend/src/report/ReportTitle.test.js on lines 117..133
    components/frontend/src/report/ReportTitle.test.js on lines 135..151
    components/frontend/src/report/ReportTitle.test.js on lines 153..169
    components/frontend/src/report/ReportTitle.test.js on lines 189..205
    components/frontend/src/report/ReportTitle.test.js on lines 207..223

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

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

    it("sets the tech debt target status reaction time", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        await act(async () => {
            fireEvent.click(screen.getByText(/reaction times/))
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 7 other locations - About 4 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 81..97
    components/frontend/src/report/ReportTitle.test.js on lines 99..115
    components/frontend/src/report/ReportTitle.test.js on lines 117..133
    components/frontend/src/report/ReportTitle.test.js on lines 153..169
    components/frontend/src/report/ReportTitle.test.js on lines 171..187
    components/frontend/src/report/ReportTitle.test.js on lines 189..205
    components/frontend/src/report/ReportTitle.test.js on lines 207..223

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

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

    it("sets the target not met status reaction time", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        await act(async () => {
            fireEvent.click(screen.getByText(/reaction times/))
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 7 other locations - About 4 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 81..97
    components/frontend/src/report/ReportTitle.test.js on lines 117..133
    components/frontend/src/report/ReportTitle.test.js on lines 135..151
    components/frontend/src/report/ReportTitle.test.js on lines 153..169
    components/frontend/src/report/ReportTitle.test.js on lines 171..187
    components/frontend/src/report/ReportTitle.test.js on lines 189..205
    components/frontend/src/report/ReportTitle.test.js on lines 207..223

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

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

    it("sets the fixed measurement entity status reaction time", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        await act(async () => {
            fireEvent.click(screen.getByText(/reaction times/))
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 7 other locations - About 4 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 81..97
    components/frontend/src/report/ReportTitle.test.js on lines 99..115
    components/frontend/src/report/ReportTitle.test.js on lines 117..133
    components/frontend/src/report/ReportTitle.test.js on lines 135..151
    components/frontend/src/report/ReportTitle.test.js on lines 153..169
    components/frontend/src/report/ReportTitle.test.js on lines 171..187
    components/frontend/src/report/ReportTitle.test.js on lines 207..223

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

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

    it("sets the won't fixed measurement entity status reaction time", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        await act(async () => {
            fireEvent.click(screen.getByText(/reaction times/))
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 7 other locations - About 4 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 81..97
    components/frontend/src/report/ReportTitle.test.js on lines 99..115
    components/frontend/src/report/ReportTitle.test.js on lines 117..133
    components/frontend/src/report/ReportTitle.test.js on lines 135..151
    components/frontend/src/report/ReportTitle.test.js on lines 153..169
    components/frontend/src/report/ReportTitle.test.js on lines 171..187
    components/frontend/src/report/ReportTitle.test.js on lines 189..205

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

    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("sets the issue tracker url", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        fireEvent.click(screen.getByText(/Issue tracker/))
        await userEvent.type(screen.getByText(/URL/), "https://jira{Enter}")
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 3 other locations - About 3 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 254..265
    components/frontend/src/report/ReportTitle.test.js on lines 267..278
    components/frontend/src/report/ReportTitle.test.js on lines 280..291

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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("sets the issue tracker password", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        fireEvent.click(screen.getByText(/Issue tracker/))
        await userEvent.type(screen.getByText(/Password/), "secret{Enter}")
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 3 other locations - About 3 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 241..252
    components/frontend/src/report/ReportTitle.test.js on lines 254..265
    components/frontend/src/report/ReportTitle.test.js on lines 280..291

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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("sets the issue tracker private token", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        fireEvent.click(screen.getByText(/Issue tracker/))
        await userEvent.type(screen.getByText(/Private token/), "secret{Enter}")
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 3 other locations - About 3 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 241..252
    components/frontend/src/report/ReportTitle.test.js on lines 254..265
    components/frontend/src/report/ReportTitle.test.js on lines 267..278

    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("sets the issue tracker username", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        fireEvent.click(screen.getByText(/Issue tracker/))
        await userEvent.type(screen.getByText(/Username/), "janedoe{Enter}")
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 3 other locations - About 3 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 241..252
    components/frontend/src/report/ReportTitle.test.js on lines 267..278
    components/frontend/src/report/ReportTitle.test.js on lines 280..291

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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("sets the comment", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        await userEvent.type(screen.getByLabelText(/Comment/), "New comment{Shift>}{Enter}", {
            initialSelectionStart: 0,
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 2 other locations - About 2 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 51..59
    components/frontend/src/report/ReportTitle.test.js on lines 61..69

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

    it("sets the title", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        await userEvent.type(screen.getByLabelText(/Report title/), "New title{Enter}", {
            initialSelectionStart: 0,
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 2 other locations - About 2 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 61..69
    components/frontend/src/report/ReportTitle.test.js on lines 71..79

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

    it("sets the subtitle", async () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        await userEvent.type(screen.getByLabelText(/Report subtitle/), "New subtitle{Enter}", {
            initialSelectionStart: 0,
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 2 other locations - About 2 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 51..59
    components/frontend/src/report/ReportTitle.test.js on lines 71..79

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

    it("shows the notification destinations", () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        fireEvent.click(screen.getByText(/Notifications/))
        expect(screen.getAllByText(/No notification destinations/).length).toBe(2)
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 1 other location - About 2 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 302..307

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 84.

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

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

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

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

    Refactorings

    Further Reading

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

    it("shows the share tab", () => {
        renderReportTitle()
        fireEvent.click(screen.getByTitle(/expand/))
        fireEvent.click(screen.getByText(/Share/))
        expect(screen.getAllByText(/Report permanent link/).length).toBe(1)
    Severity: Major
    Found in components/frontend/src/report/ReportTitle.test.js and 1 other location - About 2 hrs to fix
    components/frontend/src/report/ReportTitle.test.js on lines 309..314

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 84.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status