FluentLenium/FluentLenium

View on GitHub
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java

Summary

Maintainability
C
1 day
Test Coverage

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

    @Test
    void testDisabled() {
        goTo(DEFAULT_URL);
        FluentWebElement first = $("#disabled").first();
        assertThat(first).hasToString("By.cssSelector: #disabled (first) (Lazy Element)");
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 47..61

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

    @Test
    void testDisabledDefaultLabelListInjection() {
        goTo(DEFAULT_URL);
        FluentList<FluentWebElement> list = disabledDefaultLabelList;
        assertThat(list).hasToString("FluentWaitMessageWithHookTest.disabledDefaultLabelList (Lazy Element List)");
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 143..158
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 84..98

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

    @Test
    void testDisabledDefaultLabelInjection() {
        goTo(DEFAULT_URL);
        FluentWebElement first = disabledDefaultLabel;
        assertThat(first).hasToString("FluentWaitMessageWithHookTest.disabledDefaultLabel (Lazy Element)");
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 143..158
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 150..165

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

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

    @Test
    void testDisabledList() {
        goTo(DEFAULT_URL);
        FluentList<FluentWebElement> list = $("#disabled");
        assertThat(list).hasToString("By.cssSelector: #disabled (Lazy Element List)");
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 111..124

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

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
    void testDisabledCustomLabelInjection() {
        goTo(DEFAULT_URL);
        FluentWebElement first = disabledCustomLabel;
        assertThat(first).hasToString("custom [hint] (Lazy Element)");
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 63..76
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 78..93
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 95..109
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 126..141
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 160..174
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 67..82
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 133..148
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 167..182

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

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
    void testDisabledCustomLabelListInjection() {
        goTo(DEFAULT_URL);
        FluentList<FluentWebElement> list = disabledCustomLabelList;
        assertThat(list).hasToString("custom [hint] (Lazy Element List)");
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 63..76
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 78..93
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 95..109
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 126..141
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 160..174
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 67..82
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 100..115
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 133..148

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

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
    void testDisabledInjection() {
        goTo(DEFAULT_URL);
        FluentWebElement first = disabled;
        assertThat(first).hasToString("By.cssSelector: #disabled (first) (Lazy Element)");
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 63..76
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 78..93
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 95..109
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 126..141
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 160..174
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 100..115
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 133..148
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 167..182

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

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
    void testDisabledListInjection() {
        goTo(DEFAULT_URL);
        FluentList<FluentWebElement> list = disabledList;
        assertThat(list).hasToString("By.cssSelector: #disabled (Lazy Element List)");
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 63..76
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 78..93
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 95..109
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 126..141
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 160..174
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 67..82
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 100..115
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageWithHookTest.java on lines 167..182

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

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
    void testMessageContextWithLabelBefore() {
        goTo(DEFAULT_URL);
        FluentWebElement select = $("#select").withLabel("My Value Select").withLabelHint("hint1", "hint2").first();

fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 206..214

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

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
    void testNotFoundList() {
        goTo(DEFAULT_URL);
        FluentList<FluentWebElement> list = $("#not-found");
        assertThat(list).hasToString("By.cssSelector: #not-found (Lazy Element List)");
fluentlenium-integration-tests/src/test/java/io/fluentlenium/test/await/FluentWaitMessageTest.java on lines 226..234

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

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

Name 'io.fluentlenium.test.await' must match pattern '^org.[a-z]+(.[a-zA-Z_][a-zA-Z0-9_]*)*$'.
Open

package io.fluentlenium.test.await;

Checks that package names conform to a specified pattern.

The default value of format for module PackageName has beenchosen to match the requirements in the JavaLanguage specification and the Sun coding conventions. Howeverboth underscores and uppercase letters are rather uncommon, so mostconfigurations should probably assign value ^[a-z]+(\.[a-z][a-z0-9]*)*$ toformat for module PackageName.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

There are no issues that match your filters.

Category
Status