FluentLenium/FluentLenium

View on GitHub
fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java

Summary

Maintainability
F
5 days
Test Coverage

File FluentWaitEachElementMatcherTest.java has 333 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package io.fluentlenium.core.wait;

import io.fluentlenium.core.FluentDriver;
import io.fluentlenium.core.conditions.FluentListConditions;
import io.fluentlenium.core.conditions.WebElementConditions;

    FluentWaitEachElementMatcherTest has 21 methods (exceeds 20 allowed). Consider refactoring.
    Open

    @RunWith(MockitoJUnitRunner.class)
    @SuppressWarnings("PMD.ExcessivePublicCount")
    public class FluentWaitEachElementMatcherTest {
        @Mock
        private FluentDriver fluent;

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

          @Test
          public void isNotVerified() {
              Predicate<FluentWebElement> predicate = input -> !input.enabled();
      
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 130..156

      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
          public void isVerified() {
              Predicate<FluentWebElement> predicate = FluentWebElement::enabled;
      
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 91..116

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

      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
          public void hasAttribute() {
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
              assertThatThrownBy(() -> matcher.attribute("test", "value")).isExactlyInstanceOf(TimeoutException.class);
      
      
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 158..177

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

      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

          @Before
          public void before() {
              wait = new FluentWait(fluent);
              wait.atMost(10L, TimeUnit.MILLISECONDS);
              wait.pollingEvery(1L, TimeUnit.MILLISECONDS);
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 59..78

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

      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
          public void containsText() {
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
              assertThatThrownBy(() -> matcher.text().contains("ex")).isExactlyInstanceOf(TimeoutException.class);
      
      
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 221..240
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 242..261

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

      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
          public void hasId() {
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
              assertThatThrownBy(() -> matcher.id("value")).isExactlyInstanceOf(TimeoutException.class);
      
      
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 197..216
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 179..198
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 200..219

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

      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
          public void hasName() {
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
              assertThatThrownBy(() -> matcher.name("name")).isExactlyInstanceOf(TimeoutException.class);
      
      
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 176..195
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 179..198
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 200..219

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

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

          @Test
          public void isClickable() {
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
              assertThatThrownBy(matcher::clickable).isExactlyInstanceOf(TimeoutException.class);
      
      
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 273..292
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 304..323
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 325..344
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 367..386
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 280..299
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 311..330
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 332..351
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 353..372
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 374..393

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

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

          @Test
          public void isSelected() {
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
              assertThatThrownBy(matcher::selected).isExactlyInstanceOf(TimeoutException.class);
      
      
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 273..292
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 325..344
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 346..365
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 367..386
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 280..299
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 311..330
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 332..351
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 353..372
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 374..393

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

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

          @Test
          public void isDisplayed() {
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
              assertThatThrownBy(matcher::displayed).isExactlyInstanceOf(TimeoutException.class);
      
      
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 273..292
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 304..323
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 346..365
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 367..386
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 280..299
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 311..330
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 332..351
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 353..372
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 374..393

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

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

          @Test
          public void isEnabled() {
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
              assertThatThrownBy(matcher::enabled).isExactlyInstanceOf(TimeoutException.class);
      
      
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 304..323
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 325..344
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 346..365
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 367..386
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 280..299
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 311..330
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 332..351
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 353..372
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 374..393

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

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

          @Test
          public void isStale() {
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
              assertThatThrownBy(matcher::stale).isExactlyInstanceOf(TimeoutException.class);
      
      
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 273..292
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 304..323
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 325..344
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 346..365
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 280..299
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 311..330
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 332..351
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 353..372
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 374..393

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

      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
          public void isPresent() {
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
              assertThatThrownBy(matcher::present).isExactlyInstanceOf(TimeoutException.class);
      
      
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 263..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 117.

      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
          public void isVerifiedEmpty() {
              Predicate<FluentWebElement> predicate = FluentWebElement::enabled;
      
              FluentListConditions matcher = wait.untilEach(new ArrayList<>());
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 118..128

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

      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
          public void hasSizeBuilder() {
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
              assertThatThrownBy(() -> matcher.size().equalTo(2)).isExactlyInstanceOf(TimeoutException.class);
      
      
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 405..413

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

          @Test
          public void proxyIsEnabled() {
              when(fluentWebElement1.tagName()).thenThrow(NoSuchElementException.class);
              when(fluentWebElement2.tagName()).thenThrow(NoSuchElementException.class);
              when(fluentWebElement3.tagName()).thenThrow(NoSuchElementException.class);
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 301..309

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

      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
          public void hasSize() {
              FluentListConditions matcher = wait.untilEach(fluentWebElements);
              assertThatThrownBy(() -> matcher.size(2)).isExactlyInstanceOf(TimeoutException.class);
      
      
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 395..403

      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

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

          @After
          public void after() {
              reset(fluent);
              reset(fluentWebElement1);
              reset(fluentWebElement2);
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 80..89
      fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitSupplierListMatcherTest.java on lines 77..86

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

      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.core.wait' must match pattern '^org.[a-z]+(.[a-zA-Z_][a-zA-Z0-9_]*)*$'.
      Open

      package io.fluentlenium.core.wait;

      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