Microsoft/fast-dna

View on GitHub
packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts

Summary

Maintainability
F
1 wk
Test Coverage

File text-field.pw.spec.ts has 554 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { spinalCase } from "@microsoft/fast-web-utilities";
import { expect, test } from "@playwright/test";
import type { Locator, Page } from "@playwright/test";
import { fixtureURL } from "../__test__/helpers.js";
import type { FASTTextField } from "./text-field.js";

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

        test.describe("with a type of `url`", () => {
            test("should report valid validity when `value` is an empty string", async () => {
                await root.evaluate(node => {
                    node.innerHTML = /* html */ `
                        <fast-text-field type="url"></fast-text-field>
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 656..684

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

    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

        test.describe("with a type of `email`", () => {
            test("should report valid validity when `value` is an empty string", async () => {
                await root.evaluate(node => {
                    node.innerHTML = /* html */ `
                        <fast-text-field type="email"></fast-text-field>
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 686..714

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

    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

        test("should fire a `change` event when the internal control emits a `change` event", async () => {
            await root.evaluate(node => {
                node.innerHTML = /* html */ `
                    <fast-text-field></fast-text-field>
                `;
    packages/web-components/fast-foundation/src/text-area/text-area.pw.spec.ts on lines 147..171

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 169.

    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

        test.beforeAll(async ({ browser }) => {
            page = await browser.newPage();
    
            element = page.locator("fast-text-field");
    
    
    packages/web-components/fast-foundation/src/tabs/tabs.pw.spec.ts on lines 26..40

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

    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

            test("should report invalid validity when `value` does not match `pattern`", async () => {
                await root.evaluate(node => {
                    node.innerHTML = /* html */ `
                        <fast-text-field type="tel" pattern="value" required value="other value"></fast-text-field>
                    `;
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 379..393
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 495..509

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

    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

            test("should report invalid validity when `value` does not match `pattern`", async () => {
                await root.evaluate(node => {
                    node.innerHTML = /* html */ `
                        <fast-text-field type="password" pattern="value" value="other value"></fast-text-field>
                    `;
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 495..509
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 511..525

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

    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

            test("should report valid validity when the `value` matches `pattern`", async () => {
                await root.evaluate(node => {
                    node.innerHTML = /* html */ `
                        <fast-text-field type="tel" pattern="\\d+" value="123456789"></fast-text-field>
                    `;
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 379..393
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 511..525

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

    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

        test("should initialize to the `initialValue` property if no value property is set", async () => {
            await root.evaluate(node => {
                node.innerHTML = /* html */ `
                    <fast-text-field></fast-text-field>
                `;
    packages/web-components/fast-foundation/src/slider/slider.pw.spec.ts on lines 103..115
    packages/web-components/fast-foundation/src/switch/switch.pw.spec.ts on lines 117..129

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 100.

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

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

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

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

    Refactorings

    Further Reading

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

        test("should initialize to the provided `value` attribute if set post-connection", async () => {
            await root.evaluate(node => {
                node.innerHTML = /* html */ `
                    <fast-text-field></fast-text-field>
                `;
    packages/web-components/fast-foundation/src/search/search.pw.spec.ts on lines 125..137

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 99.

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

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

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

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

    Refactorings

    Further Reading

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

        test("should initialize to the provided `value` attribute if set pre-connection", async () => {
            await root.evaluate(node => {
                node.innerHTML = /* html */ `
                    <fast-text-field value="foo"></fast-text-field>
                `;
    packages/web-components/fast-foundation/src/progress-ring/progress-ring.pw.spec.ts on lines 66..76
    packages/web-components/fast-foundation/src/progress/progress.pw.spec.ts on lines 61..71
    packages/web-components/fast-foundation/src/progress/progress.pw.spec.ts on lines 73..83

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

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

        test("should set the `required` attribute on the internal control", async () => {
            await root.evaluate(node => {
                node.innerHTML = /* html */ `
                    <fast-text-field required></fast-text-field>
                `;
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 41..49
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 51..58
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 60..67
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 69..76
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 34..42
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 44..52
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 54..62
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 74..82

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

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

        test("should set the `autofocus` attribute on the internal control", async () => {
            await root.evaluate(node => {
                node.innerHTML = /* html */ `
                    <fast-text-field autofocus></fast-text-field>
                `;
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 41..49
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 51..58
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 60..67
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 69..76
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 44..52
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 54..62
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 64..72
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 74..82

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

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

        test("should set the `readonly` attribute on the internal control", async () => {
            await root.evaluate(node => {
                node.innerHTML = /* html */ `
                    <fast-text-field readonly></fast-text-field>
                `;
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 41..49
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 51..58
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 60..67
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 69..76
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 34..42
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 44..52
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 64..72
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 74..82

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

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

        test("should set the `spellcheck` attribute on the internal control", async () => {
            await root.evaluate(node => {
                node.innerHTML = /* html */ `
                    <fast-text-field spellcheck></fast-text-field>
                `;
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 41..49
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 51..58
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 60..67
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 69..76
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 34..42
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 44..52
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 54..62
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 64..72

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

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

        test("should set the `disabled` attribute on the internal control", async () => {
            await root.evaluate(node => {
                node.innerHTML = /* html */ `
                    <fast-text-field disabled></fast-text-field>
                `;
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 41..49
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 51..58
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 60..67
    packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts on lines 69..76
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 34..42
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 54..62
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 64..72
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 74..82

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

    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

        test("should hide the label when start and end content are provided", async () => {
            await root.evaluate(node => {
                node.innerHTML = /* html */ `
                    <fast-text-field>
                        <div slot="start"></div>
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 193..203
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 205..215

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

    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

        test("should hide the label when start content is provided", async () => {
            await root.evaluate(node => {
                node.innerHTML = /* html */ `
                    <fast-text-field>
                        <div slot="start"></div>
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 205..215
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 217..228

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

    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

        test("should hide the label when end content is provided", async () => {
            await root.evaluate(node => {
                node.innerHTML = /* html */ `
                    <fast-text-field>
                        <div slot="end"></div>
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 193..203
    packages/web-components/fast-foundation/src/text-field/text-field.pw.spec.ts on lines 217..228

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

    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