FluentLenium/FluentLenium

View on GitHub

Showing 1,951 of 1,951 total issues

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

File FluentDriver.java has 293 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package io.fluentlenium.core;

import io.appium.java_client.AppiumDriver;
import io.fluentlenium.configuration.Configuration;
import io.fluentlenium.core.action.KeyboardActions;

    FluentSelectorTest has 26 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class FluentSelectorTest extends IntegrationFluentTest {
    
        @Test
        void checkWithNameCssSelector() {
            goTo(DEFAULT_URL);

      File ProxiesTest.java has 290 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      package io.fluentlenium.core.proxy;
      
      import io.fluentlenium.core.domain.WrapsElements;
      import org.assertj.core.api.Assertions;
      import org.junit.Before;

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

            @Test
            public void testFluentWebElementAnnotation() {
                FluentWebElementAnnotation container = new FluentWebElementAnnotation();
        
                WebElement element = mock(WebElement.class);
        fluentlenium-core/src/test/java/io/fluentlenium/core/inject/FluentInjectorHookTest.java on lines 110..135

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

        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 testFluentWebElementOption() {
                FluentWebElementOptionContainer container = new FluentWebElementOptionContainer();
        
                WebElement element = mock(WebElement.class);
        fluentlenium-core/src/test/java/io/fluentlenium/core/inject/FluentInjectorHookTest.java on lines 494..519

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

        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
            public void hasSize() {
                assertThat(conditions.size(3)).isTrue();
                assertThat(conditions.size().equalTo(3)).isTrue();
                assertThat(conditions.size(2)).isFalse();
        fluentlenium-core/src/test/java/io/fluentlenium/core/conditions/AtLeastOneElementConditionsTest.java on lines 204..223

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 183.

        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
            public void hasSize() {
                assertThat(conditions.size(3)).isTrue();
                assertThat(conditions.size().equalTo(3)).isTrue();
                assertThat(conditions.size(2)).isFalse();
        fluentlenium-core/src/test/java/io/fluentlenium/core/conditions/EachElementConditionsTest.java on lines 248..266

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

        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.until(fluentWebElements);
                assertThatThrownBy(() -> matcher.attribute("test", "value")).isExactlyInstanceOf(TimeoutException.class);
        
        
        fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 155..174

        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

        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

        Method testNavigate has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            @Test
            public void testNavigate() { // NOPMD ExcessiveMethodLength
                EventsRegistry eventsRegistry = new EventsRegistry(fluentAdapter);
        
                assertThat(eventsRegistry.getWrappedDriver()).isSameAs(driver);

          FluentListAssert has 25 methods (exceeds 20 allowed). Consider refactoring.
          Open

          @SuppressWarnings("unchecked")
          public class FluentListAssert extends AbstractFluentAssert<FluentListAssert, FluentList>
                  implements ListStateAssert, ListAttributeAssert {
          
              public FluentListAssert(FluentList<? extends FluentWebElement> actual) {

            FluentWaitElementList has 25 methods (exceeds 20 allowed). Consider refactoring.
            Open

            public class FluentWaitElementList implements FluentWaitFunctional<FluentControl>, FluentWaitConditions<FluentWaitElementList>,
                    FluentWaitConfiguration<FluentWaitElementList> {
                private final List<? extends FluentWebElement> elements;
            
                private final FluentWait controlWait;

              Method fromEachElementConditions has 70 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  @Test
                  public void fromEachElementConditions() { // NOPMD ExcessiveMethodLength
                      EachElementConditions conditions = new EachElementConditions(
                              Arrays.asList(fluentWebElement1, fluentWebElement2, fluentWebElement3));
              
              

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

                package io.fluentlenium.assertj.integration.element;
                
                import io.fluentlenium.assertj.integration.IntegrationTest;
                import org.testng.annotations.Test;
                
                
                fluentlenium-assertj/src/test/java/io/fluentlenium/assertj/integration/element/FluentWebElementClickableTest.java on lines 1..55
                fluentlenium-assertj/src/test/java/io/fluentlenium/assertj/integration/element/FluentWebElementEnabledTest.java on lines 1..54

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

                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

                package io.fluentlenium.assertj.integration.element;
                
                import io.fluentlenium.assertj.integration.IntegrationTest;
                import org.testng.annotations.Test;
                
                
                fluentlenium-assertj/src/test/java/io/fluentlenium/assertj/integration/element/FluentWebElementClickableTest.java on lines 1..55
                fluentlenium-assertj/src/test/java/io/fluentlenium/assertj/integration/element/FluentWebElementSelectedTest.java on lines 1..55

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

                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

                package io.fluentlenium.assertj.integration.element;
                
                import io.fluentlenium.assertj.integration.IntegrationTest;
                import org.testng.annotations.Test;
                
                
                fluentlenium-assertj/src/test/java/io/fluentlenium/assertj/integration/element/FluentWebElementEnabledTest.java on lines 1..54
                fluentlenium-assertj/src/test/java/io/fluentlenium/assertj/integration/element/FluentWebElementSelectedTest.java on lines 1..55

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

                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

                File FluentInjectorElementTest.java has 279 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                package io.fluentlenium.core.inject;
                
                import io.fluentlenium.adapter.FluentAdapter;
                import io.fluentlenium.core.FluentControl;
                import io.fluentlenium.core.components.ComponentInstantiator;

                  AtLeastOneElementConditionsTest has 24 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  public class AtLeastOneElementConditionsTest extends AbstractFluentListConditionsTest {
                      private AtLeastOneElementConditions conditions;
                  
                      @Before
                      public void before() {

                    FluentWaitElement has 24 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    public class FluentWaitElement implements FluentWaitFunctional<FluentControl>, FluentWaitConditions<FluentWaitElement>,
                            FluentWaitConfiguration<FluentWaitElement> {
                        private final FluentWebElement element;
                    
                        private final FluentWait controlWait;
                      Severity
                      Category
                      Status
                      Source
                      Language