id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
2088736_93 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasNotTextKo() {\n when(fluentList.texts()).thenReturn(Lists.newArrayList(\"some text\", \"other text\"));\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasNotText(\"other text\"))\n .hasMessage(\"At least one selected elements contains text: othe... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasNotText(String textToFind) {\n List<String> actualTexts = requiresNonEmpty(actual.texts());\n for (String text : actualTexts) {\n if (text.contains(textToFind)) {\n failWithMessage(\n \"At least one sel... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_295 | {
"fields": [
{
"declarator": "factory = new PerformanceTimingMetricsFactory()",
"modifier": "private final",
"original_string": "private final PerformanceTimingMetricsFactory factory = new PerformanceTimingMetricsFactory();",
"type": "PerformanceTimingMetricsFactory",
"var_name": "f... | {
"body": "@Test\n public void shouldThrowExceptionForUnknownImplementation() {\n assertThatExceptionOfType(UnknownPerformanceTimingImplementationException.class)\n .isThrownBy(() -> factory.createFor(Arrays.asList(\"some\", \"value\")))\n .withMessageContaining(\"The object wa... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/performance/PerformanceTimingMetricsFactory.java",
"identifier": "PerformanceTimingMetricsFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "PerformanceTimingMetricsFactory.createFor(Object performanceT... | {
"body": "@SuppressWarnings(\"unchecked\")\n public PerformanceTimingMetrics createFor(Object performanceTiming) {\n PerformanceTimingMetrics metrics;\n\n if (performanceTiming instanceof Map) {\n metrics = new DefaultPerformanceTimingMetrics((Map<String, Object>) performanceTiming);\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_411 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/EqualMatcherTest.java",
"identifier": "EqualMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldNotEqualToPattern() {\n EndsWithMatcher matcher = new EndsWithMatcher(Pattern.compile(\"value.*\"));\n\n assertThat(matcher.isSatisfiedBy(\"non-matching\")).isFalse();\n }",
"class_method_signature": "EqualMatcherTest.shouldNotEqualToPattern()",
"constructo... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/EqualMatcher.java",
"identifier": "EqualMatcher",
"interfaces": "",
"methods": [
{
"class_method_signature": "EqualMatcher.EqualMatcher(String value)",
"constructor": true,
"full_signature": "pu... | {
"body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return CalculateService.equal(getPattern(), getValue(), currentValue);\n }",
"class_method_signature": "EqualMatcher.isSatisfiedBy(String currentValue)",
"constructor": false,
"full_signature": "@Override public boolean is... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_104 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasSizeLessThanKo() {\n when(fluentList.count()).thenReturn(7);\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasSize().lessThan(7))\n .hasMessage(\"Actual size: 7 is not less than: 7\");\n assertThatAssertionErrorIsThrownBy(() -> listA... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasSize(int expectedSize) {\n int actualSize = actual.count();\n if (actualSize != expectedSize) {\n failWithMessage(\"Expected size: \" + expectedSize + \". Actual size: \" + actualSize + \".\");\n }\n return this;\n }",
"c... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_554 | {
"fields": [
{
"declarator": "driver",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebDriver driver;",
"type": "WebDriver",
"var_name": "driver"
},
{
"declarator": "search",
"modifier": "@Mock\n private",
"original_string": "... | {
"body": "@Test\n public void testFillList() {\n FluentList<FluentWebElement> list = fluentAdapter.asFluentList(element1, element2, element3, element4);\n FillSelect fillConstructor = new FillSelect(list);\n\n WebElement option1 = mock(WebElement.class);\n WebElement option2 = mock(Web... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/action/FillSelect.java",
"identifier": "FillSelect",
"interfaces": "",
"methods": [
{
"class_method_signature": "FillSelect.FillSelect(FluentList<E> list)",
"constructor": true,
"full_signature": "public Fill... | {
"body": "public FillSelect withText(String text) {\n return doSelect(select -> select.selectByVisibleText(text));\n }",
"class_method_signature": "FillSelect.withText(String text)",
"constructor": false,
"full_signature": "public FillSelect withText(String text)",
"identifier": "withText",
"invo... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_387 | {
"fields": [
{
"declarator": "capabilitiesProvider = new FluentDriverWrappedCapabilitiesProvider()",
"modifier": "private final",
"original_string": "private final FluentDriverWrappedCapabilitiesProvider capabilitiesProvider = new FluentDriverWrappedCapabilitiesProvider();",
"type": "Flue... | {
"body": "@Test\n public void shouldReturnInnerMostWrappedDriverCapabilities() {\n when(((WrapsDriver) webDriverNotHaveCapabilities).getWrappedDriver()).thenReturn(webDriverHasCapabilities);\n when(((HasCapabilities) webDriverHasCapabilities).getCapabilities()).thenReturn(wrappedCapabilities);\n\n ... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/FluentDriverWrappedCapabilitiesProvider.java",
"identifier": "FluentDriverWrappedCapabilitiesProvider",
"interfaces": "",
"methods": [
{
"class_method_signature": "FluentDriverWrappedCapabilitiesProvider.getCapabilities(W... | {
"body": "public Capabilities getCapabilities(WebDriver driver) {\n WebDriver currentDriver = driver;\n Capabilities capabilities = capabilitiesOf(currentDriver);\n while (currentDriver instanceof WrapsDriver && capabilities == null) {\n currentDriver = ((WrapsDriver) currentDriver).g... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_368 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java",
"identifier": "StringConditionsImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnFalseForMatchesPatternIfTargetStringIsNull() {\n StringConditions stringConditions = new StringConditionsImpl(null);\n\n assertThat(stringConditions.matches(Pattern.compile(\"magical\"))).isFalse();\n }",
"class_method_signature": "StringConditionsImplT... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/StringConditionsImpl.java",
"identifier": "StringConditionsImpl",
"interfaces": "implements StringConditions",
"methods": [
{
"class_method_signature": "StringConditionsImpl.StringConditionsImpl(String string)"... | {
"body": "@Override\n public boolean matches(String regex) {\n return verify(input -> {\n if (input == null) {\n return false;\n }\n return input.matches(regex);\n });\n }",
"class_method_signature": "StringConditionsImpl.matches(String regex)",
... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_523 | {
"fields": [
{
"declarator": "keyboard",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private Keyboard keyboard;",
"type": "Keyboard",
"var_name": "keyboard"
},
{
"declarator": "mouse",
"modifier": "@Mock\n private",
"original_string"... | {
"body": "@Test\n public void testKeyDownFluentWebElement() {\n when(fluentWebElement.getElement()).thenReturn(element);\n\n KeyboardElementActions actions = new KeyboardElementActions(driver, fluentWebElement);\n actions.keyDown(Keys.SHIFT);\n\n verify(mouse).click(coordinates);\n ... | {
"fields": [
{
"declarator": "driver",
"modifier": "private final",
"original_string": "private final WebDriver driver;",
"type": "WebDriver",
"var_name": "driver"
},
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final ... | {
"body": "public KeyboardElementActions keyDown(Keys theKey) {\n loadElementAndPerform(actions().keyDown(element, theKey));\n return this;\n }",
"class_method_signature": "KeyboardElementActions.keyDown(Keys theKey)",
"constructor": false,
"full_signature": "public KeyboardElementActions keyDo... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_173 | {
"fields": [
{
"declarator": "DRIVER_LIFECYCLE = \"driverLifecycle\"",
"modifier": "private static final",
"original_string": "private static final String DRIVER_LIFECYCLE = \"driverLifecycle\";",
"type": "String",
"var_name": "DRIVER_LIFECYCLE"
},
{
"declarator": "ret... | {
"body": "@Test\n public void screenshotMode() {\n assertThat(getConfiguration().getScreenshotMode()).isNull();\n\n mockProperty(\"screenshotMode\", ConfigurationProperties.TriggerMode.AUTOMATIC_ON_FAIL);\n assertThat(getConfiguration().getScreenshotMode()).isEqualTo(ConfigurationProperties.T... | {
"fields": [
{
"declarator": "PROPERTIES_PREFIX = \"fluentlenium.\"",
"modifier": "static final",
"original_string": "static final String PROPERTIES_PREFIX = \"fluentlenium.\";",
"type": "String",
"var_name": "PROPERTIES_PREFIX"
},
{
"declarator": "prefixes",
"mo... | {
"body": "@Override\n public TriggerMode getScreenshotMode() {\n return getEnumProperty(TriggerMode.class, \"screenshotMode\");\n }",
"class_method_signature": "PropertiesBackendConfiguration.getScreenshotMode()",
"constructor": false,
"full_signature": "@Override public TriggerMode getScreenshotM... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_489 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentWebElement",
"modifier": "@M... | {
"body": "@Test\n public void until() {\n wait.until();\n Mockito.verify(fluentControlWait).until(fluentWebElement);\n }",
"class_method_signature": "FluentWaitElementTest.until()",
"constructor": false,
"full_signature": "@Test public void until()",
"identifier": "until",
"invocations"... | {
"fields": [
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "controlWait",
"modifier": "private final",
"original_str... | {
"body": "public FluentConditions until() {\n return controlWait.until(element);\n }",
"class_method_signature": "FluentWaitElement.until()",
"constructor": false,
"full_signature": "public FluentConditions until()",
"identifier": "until",
"invocations": [
"until"
],
"modifiers": "public"... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_466 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentList",
"modifier": "@Mock\n ... | {
"body": "@Test\n public void pollingEveryMillis() {\n assertThat(wait.pollingEvery(10)).isSameAs(wait);\n Mockito.verify(fluentControlWait).pollingEvery(Duration.ofMillis(10));\n }",
"class_method_signature": "FluentWaitElementListTest.pollingEveryMillis()",
"constructor": false,
"full_sig... | {
"fields": [
{
"declarator": "elements",
"modifier": "private final",
"original_string": "private final List<? extends FluentWebElement> elements;",
"type": "List<? extends FluentWebElement>",
"var_name": "elements"
},
{
"declarator": "controlWait",
"modifier": "... | {
"body": "@Override\n public FluentWaitElementList pollingEvery(Duration duration) {\n controlWait.pollingEvery(duration);\n return this;\n }",
"class_method_signature": "FluentWaitElementList.pollingEvery(Duration duration)",
"constructor": false,
"full_signature": "@Override public Fluent... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_348 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java",
"identifier": "StringConditionsImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnTrueIfContainsString() {\n StringConditions stringConditions = new StringConditionsImpl(\"Some magical text.\");\n\n assertThat(stringConditions.contains(\"magical\")).isTrue();\n }",
"class_method_signature": "StringConditionsImplTest.shouldReturnTrueI... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/StringConditionsImpl.java",
"identifier": "StringConditionsImpl",
"interfaces": "implements StringConditions",
"methods": [
{
"class_method_signature": "StringConditionsImpl.StringConditionsImpl(String string)"... | {
"body": "@Override\n public boolean contains(CharSequence charSequence) {\n return verify(input -> {\n if (input == null) {\n return false;\n }\n return input.contains(charSequence);\n });\n }",
"class_method_signature": "StringConditionsImpl.con... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_124 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void shouldNotHaveClassWhenNoElementHasClass() {\n when(fluentList.attributes(\"class\")).thenReturn(Lists.newArrayList(null, null));\n listAssert.hasNotClass(\"clazz\");\n }",
"class_method_signature": "FluentListAssertTest.shouldNotHaveClassWhenNoElementHasClass()",
... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasNotClass(String htmlClass) {\n notHasClasses(\"At least one selected element has class: \", htmlClass);\n return this;\n }",
"class_method_signature": "FluentListAssert.hasNotClass(String htmlClass)",
"constructor": false,
"full_signature": "... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_574 | {
"fields": [
{
"declarator": "element1",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element1;",
"type": "FluentWebElement",
"var_name": "element1"
},
{
"declarator": "element2",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void testLast() {\n assertThat(list.last()).isSameAs(element3);\n\n assertThatThrownBy(() -> emptyList.last()).isExactlyInstanceOf(NoSuchElementException.class);\n }",
"class_method_signature": "FluentListImplTest.testLast()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5)",
"modifier": "private static final",
"original_string": "private static final Duration DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5);",
"type": "Duration",
"var_name": "DEFAULT_WAIT_AND_... | {
"body": "@Override\n public E last() {\n if (!LocatorProxies.loaded(proxy)) {\n E component = instantiator.newComponent(componentClass, LocatorProxies.last(proxy));\n configureComponentWithLabel(component);\n configureComponentWithHooks(component);\n return comp... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_431 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/NotEndsWithMatcherTest.java",
"identifier": "NotEndsWithMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldEndWithString() {\n NotEndsWithMatcher matcher = new NotEndsWithMatcher(\"me value\");\n\n assertThat(matcher.isSatisfiedBy(\"some value\")).isFalse();\n }",
"class_method_signature": "NotEndsWithMatcherTest.shouldEndWithString()",
"constructor": false,
"... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/NotEndsWithMatcher.java",
"identifier": "NotEndsWithMatcher",
"interfaces": "",
"methods": [
{
"class_method_signature": "NotEndsWithMatcher.NotEndsWithMatcher(String value)",
"constructor": true,
... | {
"body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return !CalculateService.endsWith(getPattern(), getValue(), currentValue);\n }",
"class_method_signature": "NotEndsWithMatcher.isSatisfiedBy(String currentValue)",
"constructor": false,
"full_signature": "@Override public ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_1 | {
"fields": [
{
"declarator": "context",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ExtensionContext context;",
"type": "ExtensionContext",
"var_name": "context"
},
{
"declarator": "sut",
"modifier": "private",
"original_string"... | {
"body": "@Test\n void testAfterEachSuccessful() {\n when(context.getExecutionException()).thenReturn(Optional.empty());\n\n sut.afterEach(context);\n\n verify(test)._finished(eq(Test1.class), eq(\"test1\"));\n verify(test, never())._failed(any(), any(), any());\n }",
"class_metho... | {
"fields": [],
"file": "fluentlenium-junit-jupiter/src/main/java/org/fluentlenium/adapter/junit/jupiter/FluentJUnitJupiter.java",
"identifier": "FluentJUnitJupiter",
"interfaces": "implements BeforeEachCallback, AfterEachCallback, AfterAllCallback",
"methods": [
{
"class_method_signature": "FluentJ... | {
"body": "@Override\n public void afterEach(ExtensionContext context) {\n FluentTest instance = testInstanceOf(context);\n Optional<Throwable> throwable = context.getExecutionException();\n\n if (throwable.isPresent()) {\n instance._failed(throwable.get(), testClassOf(context), tes... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_562 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/events/ListenerPriorityComparatorTest.java",
"identifier": "ListenerPriorityComparatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnZeroArgumentsPriorityEqual() {\n String aString = \"a_string\";\n String anotherString = \"another_string\";\n\n ListenerPriorityComparator comparator = new ListenerPriorityComparator();\n\n assertThat(comparator.compare(aString, anotherString)... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/events/ListenerPriorityComparator.java",
"identifier": "ListenerPriorityComparator",
"interfaces": "implements Comparator<Object>",
"methods": [
{
"class_method_signature": "ListenerPriorityComparator.compare(Object o1, O... | {
"body": "@Override\n public int compare(Object o1, Object o2) {\n return Integer.compare(getPriority(o2), getPriority(o1));\n }",
"class_method_signature": "ListenerPriorityComparator.compare(Object o1, Object o2)",
"constructor": false,
"full_signature": "@Override public int compare(Object o1, ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_132 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasMultipleClassesOk() {\n when(fluentList.attributes(\"class\")).thenReturn(singletonList(\"yolokitten mark\"));\n listAssert.hasClass(\"mark\");\n }",
"class_method_signature": "FluentListAssertTest.testHasMultipleClassesOk()",
"constructor": false,
"full... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasClass(String classToFind) {\n return validateHasClasses(\"No selected elements have class: \", classToFind);\n }",
"class_method_signature": "FluentListAssert.hasClass(String classToFind)",
"constructor": false,
"full_signature": "@Override public F... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_427 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/NotContainsMatcherTest.java",
"identifier": "NotContainsMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldContainString() {\n NotContainsMatcher matcher = new NotContainsMatcher(\"me value\");\n\n assertThat(matcher.isSatisfiedBy(\"some value\")).isFalse();\n }",
"class_method_signature": "NotContainsMatcherTest.shouldContainString()",
"constructor": false,
"... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/NotContainsMatcher.java",
"identifier": "NotContainsMatcher",
"interfaces": "",
"methods": [
{
"class_method_signature": "NotContainsMatcher.NotContainsMatcher(String value)",
"constructor": true,
... | {
"body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return !CalculateService.contains(getPattern(), getValue(), currentValue);\n }",
"class_method_signature": "NotContainsMatcher.isSatisfiedBy(String currentValue)",
"constructor": false,
"full_signature": "@Override public ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_309 | {
"fields": [
{
"declarator": "fluentControl",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentControl fluentControl;",
"type": "FluentControl",
"var_name": "fluentControl"
},
{
"declarator": "element",
"modifier": "@Mock\n privat... | {
"body": "@Test\n public void testElementFound() {\n WebElement childElement = mock(WebElement.class);\n\n when(locator.findElement()).thenReturn(childElement);\n\n WebElement found = waitHook.findElement();\n assertThat(found).isSameAs(childElement);\n }",
"class_method_signature... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/hook/wait/WaitHook.java",
"identifier": "WaitHook",
"interfaces": "",
"methods": [
{
"class_method_signature": "WaitHook.WaitHook(FluentControl control, ComponentInstantiator instantiator, Supplier<WebElement> elementSupp... | {
"body": "@Override\n public WebElement findElement() {\n return buildAwait().until(new Function<FluentControl, WebElement>() {\n\n @Override\n public WebElement apply(FluentControl input) {\n return WaitHook.super.findElement();\n }\n\n @Override\... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_165 | {
"fields": [
{
"declarator": "DRIVER_LIFECYCLE = \"driverLifecycle\"",
"modifier": "private static final",
"original_string": "private static final String DRIVER_LIFECYCLE = \"driverLifecycle\";",
"type": "String",
"var_name": "DRIVER_LIFECYCLE"
},
{
"declarator": "ret... | {
"body": "@Test\n public void awaitAtMost() {\n assertThat(getConfiguration().getAwaitAtMost()).isNull();\n\n mockProperty(\"awaitAtMost\", 1000L);\n assertThat(getConfiguration().getAwaitAtMost()).isEqualTo(1000L);\n }",
"class_method_signature": "PropertiesBackendConfigurationTest.awai... | {
"fields": [
{
"declarator": "PROPERTIES_PREFIX = \"fluentlenium.\"",
"modifier": "static final",
"original_string": "static final String PROPERTIES_PREFIX = \"fluentlenium.\";",
"type": "String",
"var_name": "PROPERTIES_PREFIX"
},
{
"declarator": "prefixes",
"mo... | {
"body": "@Override\n public Long getAwaitAtMost() {\n return getLongProperty(\"awaitAtMost\");\n }",
"class_method_signature": "PropertiesBackendConfiguration.getAwaitAtMost()",
"constructor": false,
"full_signature": "@Override public Long getAwaitAtMost()",
"identifier": "getAwaitAtMost",
"... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_535 | {
"fields": [
{
"declarator": "keyboard",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private Keyboard keyboard;",
"type": "Keyboard",
"var_name": "keyboard"
},
{
"declarator": "mouse",
"modifier": "@Mock\n private",
"original_string"... | {
"body": "@Test\n public void moveToElementOffset() {\n MouseElementActions actions = new MouseElementActions(driver, element);\n actions.moveToElement(10, 20);\n\n verify(mouse).mouseMove(coordinates, 10, 20);\n }",
"class_method_signature": "MouseElementActionsTest.moveToElementOffset(... | {
"fields": [
{
"declarator": "driver",
"modifier": "private final",
"original_string": "private final WebDriver driver;",
"type": "WebDriver",
"var_name": "driver"
},
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final ... | {
"body": "public MouseElementActions moveToElement() {\n loadElementAndPerform(actions().moveToElement(element));\n return this;\n }",
"class_method_signature": "MouseElementActions.moveToElement()",
"constructor": false,
"full_signature": "public MouseElementActions moveToElement()",
"ident... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_470 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentList",
"modifier": "@Mock\n ... | {
"body": "@Test\n public void untilPredicate() {\n Predicate<FluentControl> predicate = mock(Predicate.class);\n\n wait.untilPredicate(predicate);\n Mockito.verify(fluentControlWait).untilPredicate(predicate);\n }",
"class_method_signature": "FluentWaitElementListTest.untilPredicate()",
... | {
"fields": [
{
"declarator": "elements",
"modifier": "private final",
"original_string": "private final List<? extends FluentWebElement> elements;",
"type": "List<? extends FluentWebElement>",
"var_name": "elements"
},
{
"declarator": "controlWait",
"modifier": "... | {
"body": "@Override\n public void untilPredicate(Predicate<FluentControl> predicate) {\n controlWait.untilPredicate(predicate);\n }",
"class_method_signature": "FluentWaitElementList.untilPredicate(Predicate<FluentControl> predicate)",
"constructor": false,
"full_signature": "@Override public void... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_237 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBaseUrlNullUrlNull() {\n String test = UrlUtils.concat(null, null);\n Assertions.assertThat(test).isNull();\n }",
"class_method_signature": "UrlUtilsTest.testBaseUrlNullUrlNull()",
"constructor": false,
"full_signature": "@Test public void testBaseUrlNullUr... | {
"fields": [
{
"declarator": "PATH_SEPARATOR = \"/\"",
"modifier": "private static final",
"original_string": "private static final String PATH_SEPARATOR = \"/\";",
"type": "String",
"var_name": "PATH_SEPARATOR"
},
{
"declarator": "HTTP = \"http\"",
"modifier": "... | {
"body": "public static String concat(String baseUriSpec, String uriSpec) { // NOPMD CyclomaticComplexity NPathComplexity\n if (baseUriSpec != null && !baseUriSpec.endsWith(PATH_SEPARATOR)) {\n baseUriSpec = baseUriSpec + PATH_SEPARATOR;\n }\n URI baseUri = uriFromSpec(baseUriSpec);\n... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_372 | {
"fields": [
{
"declarator": "webElement",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebElement webElement;",
"type": "WebElement",
"var_name": "webElement"
},
{
"declarator": "webDriver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void isEnabled() {\n assertThat(conditions.enabled()).isFalse();\n\n when(webElement.isEnabled()).thenReturn(true);\n\n assertThat(conditions.enabled()).isTrue();\n }",
"class_method_signature": "WebElementConditionsTest.isEnabled()",
"constructor": false,
"f... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/WebElementConditions.java",
"identifier": "WebElementConditions",
"interfaces": "implements FluentConditions",
"methods": [
{
"class_method_signature": "WebElementConditions.WebElementConditions(FluentWebElemen... | {
"body": "@Override\n public boolean enabled() {\n return verify(FluentWebElement::enabled);\n }",
"class_method_signature": "WebElementConditions.enabled()",
"constructor": false,
"full_signature": "@Override public boolean enabled()",
"identifier": "enabled",
"invocations": [
"verify"
... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_31 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testHasAttributeValueKoWhenAttributeIsMissing() {\n assertThatAssertionErrorIsThrownBy(() -> elementAssert.hasAttributeValue(\"attribute\", \"some value\"))\n .hasMessage(\"The element does not have attribute attribute\");\n }",
"class_method_signature": "F... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert hasAttributeValue(String attribute, String value) {\n String actualValue = actual.attribute(attribute);\n\n if (actualValue == null) {\n failWithMessage(\"The element does not have attribute \" + attribute);\n }\n\n if (!ac... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_260 | {
"fields": [
{
"declarator": "componentsManager",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ComponentsManager componentsManager;",
"type": "ComponentsManager",
"var_name": "componentsManager"
},
{
"declarator": "validator",
"modifie... | {
"body": "@Test\n public void shouldReturnFalseWhenFieldHasNoGenericTypeForListOfComponent() throws NoSuchFieldException {\n Field listWithoutGenericTypeField = getField(\"listWithoutGenericType\");\n\n assertThat(validator.isListOfComponent(listWithoutGenericTypeField)).isFalse();\n }",
"class... | {
"fields": [
{
"declarator": "componentsManager",
"modifier": "private final",
"original_string": "private final ComponentsManager componentsManager;",
"type": "ComponentsManager",
"var_name": "componentsManager"
}
],
"file": "fluentlenium-core/src/main/java/org/fluentlenium... | {
"body": "boolean isListOfComponent(Field field) {\n //Don't replace the predicate with a method reference\n return isFieldListOf(field, genericType -> componentsManager.isComponentClass(genericType));\n }",
"class_method_signature": "FluentElementInjectionSupportValidator.isListOfComponent(Field ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_630 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void testFill() {\n when(element.isEnabled()).thenReturn(true);\n when(element.isDisplayed()).thenReturn(true);\n\n fluentElement.fill().withText(\"test\");\n }",
"class_method_signature": "FluentWebElementTest.testFill()",
"constructor": false,
"full_signatu... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "@Override\n public Fill<FluentWebElement> fill() {\n return new Fill<>(this);\n }",
"class_method_signature": "FluentWebElement.fill()",
"constructor": false,
"full_signature": "@Override public Fill<FluentWebElement> fill()",
"identifier": "fill",
"invocations": [],
"modifiers": "... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_89 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasTextContainingKo() {\n when(fluentList.texts()).thenReturn(Lists.newArrayList(\"some text to contain\", \"other text to contain\"));\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasTextContaining(\"absent text\"))\n .hasMessage(\"No selected e... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasTextContaining(String textToFind) {\n List<String> actualTexts = requiresNonEmpty(actual.texts());\n if (actualTexts.stream().noneMatch(text -> text.contains(textToFind))) {\n failWithMessage(\"No selected elements contains text: \" + textT... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_66 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "fluentPage",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void hasElementKo() {\n when(element.present()).thenReturn(false);\n assertThatAssertionErrorIsThrownBy(() -> pageAssert.hasElement(element))\n .hasMessage(\"Element element is not present on current page\");\n }",
"class_method_signature": "PageAssertTes... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/PageAssert.java",
"identifier": "PageAssert",
"interfaces": "implements PageStateAssert",
"methods": [
{
"class_method_signature": "PageAssert.PageAssert(FluentPage actual)",
"constructor": true,
... | {
"body": "@Override\n public PageAssert hasElement(FluentWebElement element) {\n if (!element.present()) {\n failWithMessage(\"Element \" + element.toString() + \" is not present on current page\");\n }\n return this;\n }",
"class_method_signature": "PageAssert.hasElement(Flue... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_325 | {
"fields": [
{
"declarator": "locator",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ElementLocator locator;",
"type": "ElementLocator",
"var_name": "locator"
},
{
"declarator": "invocationHandler",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testLoadedToString() throws Throwable {\n WebElement proxy = mock(WebElement.class);\n Method toString = getMethod(\"toString\");\n when(invocationHandler.loaded()).thenReturn(true);\n when(invocationHandler.getInvocationTarget(toString)).thenReturn(proxy)... | {
"fields": [
{
"declarator": "TO_STRING = getMethod(Object.class, \"toString\")",
"modifier": "private static final",
"original_string": "private static final Method TO_STRING = getMethod(Object.class, \"toString\");",
"type": "Method",
"var_name": "TO_STRING"
},
{
"de... | {
"body": "@Override\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n Object invocationResult = null;\n if (TO_STRING.equals(method)) {\n invocationResult = proxyToString(loaded() ? (String) invoke(method, args) : null);\n } else if (loaded()) ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_519 | {
"fields": [
{
"declarator": "configuration",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private Configuration configuration;",
"type": "Configuration",
"var_name": "configuration"
},
{
"declarator": "fluentControl",
"modifier": "@Mock\n ... | {
"body": "@Test\n public void shouldConfigurePollingEvery() {\n when(configuration.getAwaitAtMost()).thenReturn(null);\n when(configuration.getAwaitPollingEvery()).thenReturn(2L);\n Duration defaultSeleniumTimeout = Duration.ofSeconds(5L);\n\n FluentWait fluentWait = fluentDriverWait.a... | {
"fields": [
{
"declarator": "configuration",
"modifier": "private final",
"original_string": "private final Configuration configuration;",
"type": "Configuration",
"var_name": "configuration"
}
],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/FluentDriverWa... | {
"body": "public FluentWait await(FluentControl control) {\n FluentWait fluentWait = new FluentWait(control);\n configureWithAwaitAtMost(fluentWait);\n configureWithPollingEvery(fluentWait);\n return fluentWait;\n }",
"class_method_signature": "FluentDriverWait.await(FluentControl co... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_149 | {
"fields": [
{
"declarator": "retriever",
"modifier": "private",
"original_string": "private CapabilitiesConfigurationPropertyRetriever retriever;",
"type": "CapabilitiesConfigurationPropertyRetriever",
"var_name": "retriever"
}
],
"file": "fluentlenium-core/src/test/java/or... | {
"body": "@Test\n public void shouldFailWithExceptionWhenURLCannotBeRead() {\n assertThatExceptionOfType(ConfigurationException.class)\n .isThrownBy(() -> retriever.getCapabilitiesProperty(\"https://www.fluentlenium.com/\", null))\n .withMessage(\"Can't read Capabilities defin... | {
"fields": [
{
"declarator": "jsonConverter = new Json()",
"modifier": "private final",
"original_string": "private final Json jsonConverter = new Json();",
"type": "Json",
"var_name": "jsonConverter"
}
],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/configurati... | {
"body": "Capabilities getCapabilitiesProperty(String capabilities, ConfigurationProperties globalConfiguration) {\n String property = readCapabilitiesFromUrl(capabilities);\n return Optional.ofNullable(createCapabilitiesFromFactory(property, globalConfiguration))\n .orElseGet(() -> conv... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_626 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void testFind() {\n when(element.findElements(By.cssSelector(\".test\")))\n .thenReturn(Arrays.asList(mock(WebElement.class), mock(WebElement.class)));\n\n fluentElement.$(\".test\");\n fluentElement.$(By.cssSelector(\".test\"));\n\n fluentElemen... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "@Override\n public FluentList<FluentWebElement> find(By locator, SearchFilter... filters) {\n return search.find(locator, filters);\n }",
"class_method_signature": "FluentWebElement.find(By locator, SearchFilter... filters)",
"constructor": false,
"full_signature": "@Override public Flue... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_276 | {
"fields": [
{
"declarator": "componentsManager",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ComponentsManager componentsManager;",
"type": "ComponentsManager",
"var_name": "componentsManager"
},
{
"declarator": "validator",
"modifie... | {
"body": "@Test\n public void shouldReturnFalseIfFieldHasNoGenericTypeForListOfElement() throws NoSuchFieldException {\n Field listWithoutGenericTypeField = getField(\"listWithoutGenericType\");\n\n assertThat(FluentElementInjectionSupportValidator.isListOfWebElement(listWithoutGenericTypeField)).is... | {
"fields": [
{
"declarator": "componentsManager",
"modifier": "private final",
"original_string": "private final ComponentsManager componentsManager;",
"type": "ComponentsManager",
"var_name": "componentsManager"
}
],
"file": "fluentlenium-core/src/main/java/org/fluentlenium... | {
"body": "static boolean isListOfWebElement(Field field) {\n return isFieldListOf(field, WebElement.class::isAssignableFrom);\n }",
"class_method_signature": "FluentElementInjectionSupportValidator.isListOfWebElement(Field field)",
"constructor": false,
"full_signature": "static boolean isListOfWebEl... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_299 | {
"fields": [
{
"declarator": "LOAD_EVENT_END_SCRIPT = \"return window.performance.timing.loadEventEnd;\"",
"modifier": "private static final",
"original_string": "private static final String LOAD_EVENT_END_SCRIPT = \"return window.performance.timing.loadEventEnd;\";",
"type": "String",
... | {
"body": "@Test\n public void shouldThrowExceptionForNullEvent() {\n assertThatIllegalArgumentException().isThrownBy(() -> performanceTiming.getEventValue(null))\n .withMessage(\"The event should not be null.\");\n }",
"class_method_signature": "DefaultPerformanceTimingTest.shouldThrowE... | {
"fields": [
{
"declarator": "PERFORMANCE_TIMING_SCRIPT = \"return window.performance.timing;\"",
"modifier": "private static final",
"original_string": "private static final String PERFORMANCE_TIMING_SCRIPT = \"return window.performance.timing;\";",
"type": "String",
"var_name": "P... | {
"body": "@Override\n public long getEventValue(PerformanceTimingEvent event) {\n checkArgument(event, \"The event should not be null.\");\n return timePassedUntil(execute(scriptFor(event)));\n }",
"class_method_signature": "DefaultPerformanceTiming.getEventValue(PerformanceTimingEvent event)",... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_333 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebElement element;",
"type": "WebElement",
"var_name": "element"
}
],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/proxy/ElementInstanceLocator... | {
"body": "@Test\n public void testWithNullElement() {\n ElementInstanceLocator locator = new ElementInstanceLocator(null);\n\n Assertions.assertThat(locator.findElement()).isNull();\n Assertions.assertThat(locator.findElements()).isEmpty();\n\n Assertions.assertThat(locator.getWrappedE... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/proxy/ElementInstanceLocator.java",
"identifier": "ElementInstanceLocator",
"interfaces": "implements WrapsElement",
"methods": [
{
"class_method_signature": "ElementInstanceLocator.ElementInstanceLocator(WebElement eleme... | {
"body": "@Override\n public WebElement getWrappedElement() {\n return findElement();\n }",
"class_method_signature": "ElementInstanceLocator.getWrappedElement()",
"constructor": false,
"full_signature": "@Override public WebElement getWrappedElement()",
"identifier": "getWrappedElement",
"inv... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_70 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "fluentPage",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void hasElementsKo() {\n when(list.isEmpty()).thenReturn(true);\n assertThatAssertionErrorIsThrownBy(() -> pageAssert.hasElements(list))\n .hasMessage(\"No element selected by 'list' is present on the page.\");\n }",
"class_method_signature": "PageAssertT... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/PageAssert.java",
"identifier": "PageAssert",
"interfaces": "implements PageStateAssert",
"methods": [
{
"class_method_signature": "PageAssert.PageAssert(FluentPage actual)",
"constructor": true,
... | {
"body": "@Override\n public PageAssert hasElements(FluentList<? extends FluentWebElement> fluentList) {\n if (fluentList.isEmpty()) {\n failWithMessage(\"No element selected by '\"\n + fluentList.toString() + \"' is present on the page.\");\n }\n return this;\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_221 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/configuration/ConfigurationFactoryProviderTest.java",
"identifier": "ConfigurationFactoryProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPrivateCustomConfiguration() {\n Configuration configuration = ConfigurationFactoryProvider.newConfiguration(PrivateDefaultsContainer.class);\n assertThat(configuration).isNotNull();\n }",
"class_method_signature": "ConfigurationFactoryProviderTest.testPrivateC... | {
"fields": [
{
"declarator": "BOOTSTRAP_FACTORY = new DefaultConfigurationFactory()",
"modifier": "private static final",
"original_string": "private static final ConfigurationFactory BOOTSTRAP_FACTORY = new DefaultConfigurationFactory();",
"type": "ConfigurationFactory",
"var_name"... | {
"body": "public static Configuration newConfiguration(Class<?> container) {\n ConfigurationFactory configurationFactory = getConfigurationFactory(container);\n Configuration configuration = configurationFactory.newConfiguration(container, new ConfigurationDefaults());\n\n if (configuration.getC... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_27 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testHasTagNameOk() {\n when(element.tagName()).thenReturn(\"some tag\");\n elementAssert.hasTagName(\"some tag\");\n }",
"class_method_signature": "FluentWebElementAssertTest.testHasTagNameOk()",
"constructor": false,
"full_signature": "@Test public void testHa... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert hasTagName(String tagName) {\n String actualTag = actual.tagName();\n if (!actualTag.equals(tagName)) {\n failWithMessage(\"The element does not have tag: \" + tagName\n + \". Actual tag found : \" + actualTag);\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_364 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java",
"identifier": "StringConditionsImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnFalseIsNotMatchesString() {\n StringConditions stringConditions = new StringConditionsImpl(\"Some MAGICAL text.\");\n\n assertThat(stringConditions.matches(\"magical\")).isFalse();\n }",
"class_method_signature": "StringConditionsImplTest.shouldReturnFa... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/StringConditionsImpl.java",
"identifier": "StringConditionsImpl",
"interfaces": "implements StringConditions",
"methods": [
{
"class_method_signature": "StringConditionsImpl.StringConditionsImpl(String string)"... | {
"body": "@Override\n public boolean matches(String regex) {\n return verify(input -> {\n if (input == null) {\n return false;\n }\n return input.matches(regex);\n });\n }",
"class_method_signature": "StringConditionsImpl.matches(String regex)",
... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_558 | {
"fields": [
{
"declarator": "configuration",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private Configuration configuration;",
"type": "Configuration",
"var_name": "configuration"
},
{
"declarator": "webDriver",
"modifier": "@Mock(extraInte... | {
"body": "@Test\n public void shouldCreateScreenshotFromDriverWithNoConfiguration() throws IOException {\n mockScreenshotFromWebDriver();\n initializeDestinationFile();\n\n screenshotPersister.persistScreenshot(destinationFile.getAbsolutePath());\n\n assertThat(destinationFile).exists(... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(FluentDriverScreenshotPersister.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(FluentDriverScreenshotPersister.class);",
"type": "Logger",
... | {
"body": "public void persistScreenshot(String fileName) {\n try {\n File destFile;\n if (configuration.getScreenshotPath() == null) {\n destFile = new File(fileName);\n } else {\n destFile = Paths.get(configuration.getScreenshotPath(), fileName).... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_108 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasSizeGreaterThanKo() {\n when(fluentList.count()).thenReturn(7);\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasSize().greaterThan(7))\n .hasMessage(\"Actual size: 7 is not greater than: 7\");\n assertThatAssertionErrorIsThrownBy(()... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasSize(int expectedSize) {\n int actualSize = actual.count();\n if (actualSize != expectedSize) {\n failWithMessage(\"Expected size: \" + expectedSize + \". Actual size: \" + actualSize + \".\");\n }\n return this;\n }",
"c... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_380 | {
"fields": [
{
"declarator": "webElement",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebElement webElement;",
"type": "WebElement",
"var_name": "webElement"
},
{
"declarator": "webDriver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void className() {\n assertThat(conditions.className(\"some-class-2\")).isFalse();\n\n when(webElement.getAttribute(\"class\")).thenReturn(\"some-class-1 some-class-2 some-class-3\");\n\n assertThat(conditions.className(\"some-class-1\")).isTrue();\n assertThat... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/WebElementConditions.java",
"identifier": "WebElementConditions",
"interfaces": "implements FluentConditions",
"methods": [
{
"class_method_signature": "WebElementConditions.WebElementConditions(FluentWebElemen... | {
"body": "@Override\n public boolean className(String className) {\n FluentWebElement element = getActualObject();\n String classAttribute = element.attribute(\"class\");\n\n if (classAttribute == null) {\n return false;\n }\n\n String[] classes = classAttribute.split... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_416 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/EndsWithMatcherTest.java",
"identifier": "EndsWithMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldEndWithString() {\n EndsWithMatcher matcher = new EndsWithMatcher(\"me value\");\n\n assertThat(matcher.isSatisfiedBy(\"some value\")).isTrue();\n }",
"class_method_signature": "EndsWithMatcherTest.shouldEndWithString()",
"constructor": false,
"full_signa... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/EndsWithMatcher.java",
"identifier": "EndsWithMatcher",
"interfaces": "",
"methods": [
{
"class_method_signature": "EndsWithMatcher.EndsWithMatcher(String value)",
"constructor": true,
"full_sig... | {
"body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return CalculateService.endsWith(getPattern(), getValue(), currentValue);\n }",
"class_method_signature": "EndsWithMatcher.isSatisfiedBy(String currentValue)",
"constructor": false,
"full_signature": "@Override public bool... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_103 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasSizeLessThanOk() {\n when(fluentList.count()).thenReturn(7);\n listAssert.hasSize().lessThan(9);\n }",
"class_method_signature": "FluentListAssertTest.testHasSizeLessThanOk()",
"constructor": false,
"full_signature": "@Test public void testHasSizeLessTha... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasSize(int expectedSize) {\n int actualSize = actual.count();\n if (actualSize != expectedSize) {\n failWithMessage(\"Expected size: \" + expectedSize + \". Actual size: \" + actualSize + \".\");\n }\n return this;\n }",
"c... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_553 | {
"fields": [
{
"declarator": "driver",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebDriver driver;",
"type": "WebDriver",
"var_name": "driver"
},
{
"declarator": "search",
"modifier": "@Mock\n private",
"original_string": "... | {
"body": "@Test\n public void testFillCss() {\n FluentList<FluentWebElement> list = fluentAdapter.asFluentList(element1, element2, element3);\n FillSelect fillConstructor = new FillSelect(list);\n\n WebElement option1 = mock(WebElement.class);\n WebElement option2 = mock(WebElement.cla... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/action/FillSelect.java",
"identifier": "FillSelect",
"interfaces": "",
"methods": [
{
"class_method_signature": "FillSelect.FillSelect(FluentList<E> list)",
"constructor": true,
"full_signature": "public Fill... | {
"body": "public FillSelect withIndex(int index) {\n boolean noSuchElement = true;\n for (E element : getElements()) {\n Select select = new Select(element.getElement());\n try {\n select.selectByIndex(index);\n noSuchElement = false;\n } c... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_94 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasNotTextContainingOk() {\n when(fluentList.texts()).thenReturn(singletonList(\"other text\"));\n listAssert.hasNotTextContaining(\"some text\");\n }",
"class_method_signature": "FluentListAssertTest.testHasNotTextContainingOk()",
"constructor": false,
"fu... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasNotTextContaining(String textToFind) {\n List<String> actualTexts = requiresNonEmpty(actual.texts());\n for (String text : actualTexts) {\n if (text.contains(textToFind)) {\n failWithMessage(\n \"At least o... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_338 | {
"fields": [
{
"declarator": "locatorHandler",
"modifier": "private",
"original_string": "private TestLocatorHandler locatorHandler;",
"type": "TestLocatorHandler",
"var_name": "locatorHandler"
},
{
"declarator": "locator",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void shouldNotBeLoadedWhenResultIsNull() {\n locatorHandler.result = null;\n\n assertThat(locatorHandler.loaded()).isFalse();\n }",
"class_method_signature": "AbstractLocatorHandlerTest.shouldNotBeLoadedWhenResultIsNull()",
"constructor": false,
"full_signature": "@... | {
"fields": [
{
"declarator": "DEFAULT_LAZY_ELEMENT_TO_STRING = \"Lazy Element\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_LAZY_ELEMENT_TO_STRING = \"Lazy Element\";",
"type": "String",
"var_name": "DEFAULT_LAZY_ELEMENT_TO_STRING"
... | {
"body": "@Override\n public boolean loaded() {\n return result != null;\n }",
"class_method_signature": "AbstractLocatorHandler.loaded()",
"constructor": false,
"full_signature": "@Override public boolean loaded()",
"identifier": "loaded",
"invocations": [],
"modifiers": "@Override public",... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_292 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/url/UrlTemplateTest.java",
"identifier": "UrlTemplateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testThrowsExceptionForInvalidParameterName() {\n UrlTemplate urlParametersTemplate = new UrlTemplate(\"/abc/{param1}/def{?/param2}/ghi{?/param3}\");\n\n assertThatIllegalArgumentException().isThrownBy(() -> urlParametersTemplate.put(\"param4\", \"test4\"))\n ... | {
"fields": [
{
"declarator": "PARAM_REGEX = Pattern.compile(\"\\\\{(.+?)\\\\}\")",
"modifier": "private static final",
"original_string": "private static final Pattern PARAM_REGEX = Pattern.compile(\"\\\\{(.+?)\\\\}\");",
"type": "Pattern",
"var_name": "PARAM_REGEX"
},
{
... | {
"body": "public UrlTemplate put(String name, String value) {\n UrlParameter parameter = parameters.get(name);\n if (parameter == null) {\n throw new IllegalArgumentException(\"Invalid parameter name: \" + name);\n }\n properties.put(parameter, value);\n return this;\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_441 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/CalculateServiceTest.java",
"identifier": "CalculateServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void checkPatternContainsOk() {\n assertThat(CalculateService.contains(Pattern.compile(\"[to]*\"), null, \"toto\")).isTrue();\n\n }",
"class_method_signature": "CalculateServiceTest.checkPatternContainsOk()",
"constructor": false,
"full_signature": "@Test public void check... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/CalculateService.java",
"identifier": "CalculateService",
"interfaces": "",
"methods": [
{
"class_method_signature": "CalculateService.CalculateService()",
"constructor": true,
"full_signature":... | {
"body": "public static boolean contains(Pattern patternValue, String referenceValue, String currentValue) {\n if (currentValue == null) {\n return false;\n }\n if (patternValue == null) {\n return currentValue.contains(referenceValue);\n }\n return patternVal... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_504 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentWebElement",
"modifier": "@M... | {
"body": "@Test\n public void untilElement() {\n FluentWebElement element = mock(FluentWebElement.class);\n\n wait.until(element);\n Mockito.verify(fluentControlWait).until(element);\n }",
"class_method_signature": "FluentWaitElementTest.untilElement()",
"constructor": false,
"full_s... | {
"fields": [
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "controlWait",
"modifier": "private final",
"original_str... | {
"body": "@Override\n public FluentConditions untilElement(Supplier<? extends FluentWebElement> selector) {\n return controlWait.untilElement(selector);\n }",
"class_method_signature": "FluentWaitElement.untilElement(Supplier<? extends FluentWebElement> selector)",
"constructor": false,
"full_sign... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_154 | {
"fields": [
{
"declarator": "DRIVER_LIFECYCLE = \"driverLifecycle\"",
"modifier": "private static final",
"original_string": "private static final String DRIVER_LIFECYCLE = \"driverLifecycle\";",
"type": "String",
"var_name": "DRIVER_LIFECYCLE"
},
{
"declarator": "ret... | {
"body": "@Test\n public void webDriver() {\n assertThat(getConfiguration().getWebDriver()).isNull();\n\n mockProperty(\"webDriver\", \"firefox\");\n assertThat(getConfiguration().getWebDriver()).isEqualTo(\"firefox\");\n }",
"class_method_signature": "PropertiesBackendConfigurationTest.... | {
"fields": [
{
"declarator": "PROPERTIES_PREFIX = \"fluentlenium.\"",
"modifier": "static final",
"original_string": "static final String PROPERTIES_PREFIX = \"fluentlenium.\";",
"type": "String",
"var_name": "PROPERTIES_PREFIX"
},
{
"declarator": "prefixes",
"mo... | {
"body": "@Override\n public String getWebDriver() {\n return getStringProperty(\"webDriver\");\n }",
"class_method_signature": "PropertiesBackendConfiguration.getWebDriver()",
"constructor": false,
"full_signature": "@Override public String getWebDriver()",
"identifier": "getWebDriver",
"invo... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_82 | {
"fields": [
{
"declarator": "alert",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private AlertImpl alert;",
"type": "AlertImpl",
"var_name": "alert"
},
{
"declarator": "alertAssert",
"modifier": "private",
"original_string": "private A... | {
"body": "@Test\n public void testHasTextNegative() {\n when(alert.getText()).thenReturn(\"other text\");\n assertThatThrownBy(() -> alertAssert.hasText(\"some text\"))\n .isInstanceOf(AssertionError.class)\n .hasMessage(\"The alert box does not contain the text: some t... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/AlertAssert.java",
"identifier": "AlertAssert",
"interfaces": "implements AlertStateAssert",
"methods": [
{
"class_method_signature": "AlertAssert.AlertAssert(AlertImpl actual)",
"constructor": true,
... | {
"body": "@Override\n public AlertStateAssert hasText(String text) {\n try {\n String actualText = actual.getText();\n if (!actualText.contains(text)) {\n failWithMessage(\n \"The alert box does not contain the text: \" + text + \". Actual text fo... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_284 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/url/UrlTemplateTest.java",
"identifier": "UrlTemplateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseOptionalMiddleParameter() {\n UrlTemplate urlParametersTemplate = new UrlTemplate(\"/abc/{param1}/def{?/param2}/ghi/{param3}\");\n assertThat(getParameterNames(urlParametersTemplate)).containsExactly(\"param1\", \"param2\", \"param3\");\n assertThat(getP... | {
"fields": [
{
"declarator": "PARAM_REGEX = Pattern.compile(\"\\\\{(.+?)\\\\}\")",
"modifier": "private static final",
"original_string": "private static final Pattern PARAM_REGEX = Pattern.compile(\"\\\\{(.+?)\\\\}\");",
"type": "Pattern",
"var_name": "PARAM_REGEX"
},
{
... | {
"body": "public ParsedUrlTemplate parse(String input) {\n String noQueryInput;\n List<NameValuePair> queryParameters;\n\n try {\n URIBuilder uriBuilder = new URIBuilder(input);\n queryParameters = uriBuilder.getQueryParams();\n uriBuilder.setCustomQuery(null);\n... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_457 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/StartsWithMatcherTest.java",
"identifier": "StartsWithMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldNotStartWithPattern() {\n StartsWithMatcher matcher = new StartsWithMatcher(Pattern.compile(\"value.*\"));\n\n assertThat(matcher.isSatisfiedBy(\"non-matching\")).isFalse();\n }",
"class_method_signature": "StartsWithMatcherTest.shouldNotStartWithPattern()",
... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/StartsWithMatcher.java",
"identifier": "StartsWithMatcher",
"interfaces": "",
"methods": [
{
"class_method_signature": "StartsWithMatcher.StartsWithMatcher(String value)",
"constructor": true,
"... | {
"body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return CalculateService.startsWith(getPattern(), getValue(), currentValue);\n }",
"class_method_signature": "StartsWithMatcher.isSatisfiedBy(String currentValue)",
"constructor": false,
"full_signature": "@Override public ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_142 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void emptyListErrorMessage() {\n when(fluentList.texts()).thenReturn(emptyList());\n\n assertThatThrownBy(() -> listAssert.hasText(\"John\"))\n .isInstanceOf(AssertionError.class)\n .hasMessageContaining(\"List is empty. Please make sure you use... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasText(String textToFind) {\n List<String> actualTexts = requiresNonEmpty(actual.texts());\n if (actualTexts.stream().noneMatch(text -> text.contains(textToFind))) {\n failWithMessage(\"No selected elements contains text: \" + textToFind\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_512 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentWebElement",
"modifier": "@M... | {
"body": "@Test\n public void untilPagePage() {\n FluentPage page = mock(FluentPage.class);\n\n wait.untilPage(page);\n Mockito.verify(fluentControlWait).untilPage(page);\n }",
"class_method_signature": "FluentWaitElementTest.untilPagePage()",
"constructor": false,
"full_signature": ... | {
"fields": [
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "controlWait",
"modifier": "private final",
"original_str... | {
"body": "@Override\n public FluentWaitPageConditions untilPage() {\n return controlWait.untilPage();\n }",
"class_method_signature": "FluentWaitElement.untilPage()",
"constructor": false,
"full_signature": "@Override public FluentWaitPageConditions untilPage()",
"identifier": "untilPage",
"in... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_396 | {
"fields": [
{
"declarator": "attributeFilter",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private AttributeFilter attributeFilter;",
"type": "AttributeFilter",
"var_name": "attributeFilter"
},
{
"declarator": "fluentWebElement",
"modifier":... | {
"body": "@Test\n public void textAttributeShouldSatisfyMatcher() {\n setupPredicateAndMatcher(\"text attribute value\");\n when(attributeFilter.getAttribute()).thenReturn(\"text\");\n when(fluentWebElement.text()).thenReturn(\"text attribute value\");\n\n assertThat(attributeFilterPre... | {
"fields": [
{
"declarator": "filter",
"modifier": "private final",
"original_string": "private final AttributeFilter filter;",
"type": "AttributeFilter",
"var_name": "filter"
}
],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/AttributeFilterPredicate... | {
"body": "@Override\n public boolean test(FluentWebElement element) {\n String attribute = getAttributeValue(element);\n return filter.getMatcher().isSatisfiedBy(attribute);\n }",
"class_method_signature": "AttributeFilterPredicate.test(FluentWebElement element)",
"constructor": false,
"ful... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_379 | {
"fields": [
{
"declarator": "webElement",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebElement webElement;",
"type": "WebElement",
"var_name": "webElement"
},
{
"declarator": "webDriver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void hasName() {\n assertThat(conditions.name(\"value\")).isFalse();\n\n when(webElement.getAttribute(\"name\")).thenReturn(\"value\");\n\n assertThat(conditions.name(\"value\")).isTrue();\n }",
"class_method_signature": "WebElementConditionsTest.hasName()",
"c... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/WebElementConditions.java",
"identifier": "WebElementConditions",
"interfaces": "implements FluentConditions",
"methods": [
{
"class_method_signature": "WebElementConditions.WebElementConditions(FluentWebElemen... | {
"body": "@Override\n public StringConditions name() {\n return new StringConditionsImpl(object.name(), negation);\n }",
"class_method_signature": "WebElementConditions.name()",
"constructor": false,
"full_signature": "@Override public StringConditions name()",
"identifier": "name",
"invocatio... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_400 | {
"fields": [
{
"declarator": "A_VALUE = \"value\"",
"modifier": "private static final",
"original_string": "private static final String A_VALUE = \"value\";",
"type": "String",
"var_name": "A_VALUE"
},
{
"declarator": "A_REGEX_VALUE = \"regex.*\"",
"modifier": "p... | {
"body": "@Test\n public void shouldGetCSSFilterWithEmptyMatcherSymbol() {\n AbstractMatcher matcher = new EqualMatcher(A_VALUE);\n AttributeFilter attributeFilter = new AttributeFilter(\"id\", matcher);\n\n String cssFilter = \"[id=\\\"value\\\"]\";\n\n assertThat(attributeFilter.getC... | {
"fields": [
{
"declarator": "attributeName",
"modifier": "private final",
"original_string": "private final String attributeName;",
"type": "String",
"var_name": "attributeName"
},
{
"declarator": "matcher",
"modifier": "private final",
"original_string": ... | {
"body": "@Override\n public String getCssFilter() {\n String matcherAttribute = Optional.ofNullable(matcher).map(AbstractMatcher::getMatcherSymbol).orElse(\"\");\n return \"[\" + getAttribute() + matcherAttribute + \"=\\\"\" + matcher.getValue() + \"\\\"]\";\n }",
"class_method_signature": "At... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_545 | {
"fields": [
{
"declarator": "keyboard",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private Keyboard keyboard;",
"type": "Keyboard",
"var_name": "keyboard"
},
{
"declarator": "mouse",
"modifier": "@Mock\n private",
"original_string"... | {
"body": "@Test\n public void testDoubleClick() {\n MouseActions actions = new MouseActions(driver);\n actions.doubleClick();\n\n verify(mouse, never()).mouseMove(any(Coordinates.class));\n verify(mouse).doubleClick(any());\n }",
"class_method_signature": "MouseActionsTest.testDou... | {
"fields": [
{
"declarator": "driver",
"modifier": "private final",
"original_string": "private final WebDriver driver;",
"type": "WebDriver",
"var_name": "driver"
}
],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/action/MouseActions.java",
"identifier": ... | {
"body": "public MouseActions doubleClick() {\n actions().doubleClick().perform();\n return this;\n }",
"class_method_signature": "MouseActions.doubleClick()",
"constructor": false,
"full_signature": "public MouseActions doubleClick()",
"identifier": "doubleClick",
"invocations": [
"pe... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_115 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasNameOk() {\n when(fluentList.names()).thenReturn(Lists.newArrayList(\"name-one\", \"name-two\"));\n listAssert.hasName(\"name-one\");\n }",
"class_method_signature": "FluentListAssertTest.testHasNameOk()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasName(String name) {\n List<String> actualNames = requiresNonEmpty(actual.names());\n if (!actualNames.contains(name)) {\n failWithMessage(\"No selected elements have name: \" + name\n + \". Actual names found : \" + actua... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_302 | {
"fields": [
{
"declarator": "LOAD_EVENT_END_SCRIPT = \"return window.performance.timing.loadEventEnd;\"",
"modifier": "private static final",
"original_string": "private static final String LOAD_EVENT_END_SCRIPT = \"return window.performance.timing.loadEventEnd;\";",
"type": "String",
... | {
"body": "@Test\n public void shouldReturnSecureConnectionStartAsLongAsObject() {\n when(((JavascriptExecutor) driver).executeScript(SECURE_CONNECTION_START_SCRIPT)).thenReturn(\"undefined\");\n\n assertThat(performanceTiming.secureConnectionStart()).isEqualTo(\"undefined\");\n\n verify(((Jav... | {
"fields": [
{
"declarator": "PERFORMANCE_TIMING_SCRIPT = \"return window.performance.timing;\"",
"modifier": "private static final",
"original_string": "private static final String PERFORMANCE_TIMING_SCRIPT = \"return window.performance.timing;\";",
"type": "String",
"var_name": "P... | {
"body": "@Override\n public Object secureConnectionStart() {\n Object secureConnectionStart = execute(scriptFor(SECURE_CONNECTION_START));\n if (secureConnectionStart instanceof Long) {\n secureConnectionStart = timePassedUntil(secureConnectionStart);\n }\n return secureCon... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_41 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testHasClassKo() {\n when(element.attribute(\"class\")).thenReturn(\"other-class\");\n assertThatAssertionErrorIsThrownBy(() -> elementAssert.hasClass(\"some-class\"))\n .hasMessage(\"The element does not have the class: some-class. Actual class found : o... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert hasClass(String classToFind) {\n String actualClasses = actual.attribute(CLASS_ATTRIBUTE);\n if (!getClasses(actualClasses).contains(classToFind)) {\n failWithMessage(\"The element does not have the class: \" + classToFind\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_247 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/inject/LabelAnnotationsTest.java",
"identifier": "LabelAnnotationsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldSetLabelHintIfLabelHintAnnotationIsPresent() throws NoSuchFieldException {\n LabelAnnotations labelAnnotations = createLabelAnnotationsForField(\"fieldWithLabelHint\");\n\n assertThat(labelAnnotations.getLabelHints()).containsExactly(\"labelhint\", \"otherlabelhin... | {
"fields": [
{
"declarator": "label",
"modifier": "private",
"original_string": "private String label;",
"type": "String",
"var_name": "label"
},
{
"declarator": "labelHints",
"modifier": "private",
"original_string": "private String[] labelHints;",
"... | {
"body": "@SuppressWarnings(\"PMD.MethodReturnsInternalArray\")\n @Override\n public String[] getLabelHints() {\n return labelHints;\n }",
"class_method_signature": "LabelAnnotations.getLabelHints()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"PMD.MethodReturnsInternalArray\")... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_617 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void testIsEnabled() {\n assertThat(fluentElement.enabled()).isFalse();\n when(element.isEnabled()).thenReturn(true);\n assertThat(fluentElement.enabled()).isTrue();\n }",
"class_method_signature": "FluentWebElementTest.testIsEnabled()",
"constructor": false,
... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "public boolean enabled() {\n boolean enabled;\n try {\n enabled = webElement.isEnabled();\n } catch (NoSuchElementException e) {\n enabled = false;\n }\n return enabled;\n }",
"class_method_signature": "FluentWebElement.enabled()",
"constructo... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_494 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentWebElement",
"modifier": "@M... | {
"body": "@Test\n public void pollingEvery() {\n assertThat(wait.pollingEvery(10, TimeUnit.MILLISECONDS)).isSameAs(wait);\n Mockito.verify(fluentControlWait).pollingEvery(Duration.ofMillis(10));\n }",
"class_method_signature": "FluentWaitElementTest.pollingEvery()",
"constructor": false,
"f... | {
"fields": [
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "controlWait",
"modifier": "private final",
"original_str... | {
"body": "@Override\n public FluentWaitElement pollingEvery(Duration duration) {\n controlWait.pollingEvery(duration);\n return this;\n }",
"class_method_signature": "FluentWaitElement.pollingEvery(Duration duration)",
"constructor": false,
"full_signature": "@Override public FluentWaitElem... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_181 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private static",
"original_string": "private static AnnotationConfiguration configuration;",
"type": "AnnotationConfiguration",
"var_name": "configuration"
},
{
"declarator": "defaultConfiguration",
"modi... | {
"body": "@Test\n public void capabilities() {\n Assertions.assertThat(noConfiguration.getCapabilities()).isNull();\n Assertions.assertThat(defaultConfiguration.getCapabilities()).isNull();\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setJavascriptEn... | {
"fields": [
{
"declarator": "configuration",
"modifier": "private final",
"original_string": "private final FluentConfiguration configuration;",
"type": "FluentConfiguration",
"var_name": "configuration"
},
{
"declarator": "customProperties = new HashMap<>()",
"... | {
"body": "@Override\n public Capabilities getCapabilities() {\n return getConfig(() -> getCapabilitiesValue(configuration.capabilities()));\n }",
"class_method_signature": "AnnotationConfiguration.getCapabilities()",
"constructor": false,
"full_signature": "@Override public Capabilities getCapabil... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_16 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testIsDisplayedKo() {\n when(element.present()).thenReturn(true);\n when(element.displayed()).thenReturn(false);\n assertThatAssertionErrorIsThrownBy(() -> elementAssert.isDisplayed())\n .hasMessage(\"Element in assertion is present but not display... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert isDisplayed() {\n isPresentAndIs(() -> !actual.displayed(), \"Element in assertion is present but not displayed\");\n return this;\n }",
"class_method_signature": "FluentWebElementAssert.isDisplayed()",
"constructor": false,
"full_signatur... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_355 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java",
"identifier": "StringConditionsImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnFalseIsNotEndsWithString() {\n StringConditions stringConditions = new StringConditionsImpl(\"Some magical text.\");\n\n assertThat(stringConditions.endsWith(\"magical\")).isFalse();\n }",
"class_method_signature": "StringConditionsImplTest.shouldReturn... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/StringConditionsImpl.java",
"identifier": "StringConditionsImpl",
"interfaces": "implements StringConditions",
"methods": [
{
"class_method_signature": "StringConditionsImpl.StringConditionsImpl(String string)"... | {
"body": "@Override\n public boolean endsWith(String suffix) {\n return verify(input -> {\n if (input == null) {\n return false;\n }\n return input.endsWith(suffix);\n });\n }",
"class_method_signature": "StringConditionsImpl.endsWith(String suffi... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_640 | {
"fields": [
{
"declarator": "driver",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebDriver driver;",
"type": "WebDriver",
"var_name": "driver"
},
{
"declarator": "searchContext",
"modifier": "@Mock\n private",
"original_str... | {
"body": "@Test\n public void findPostSelectorFilterWithFilterOnText() {\n String name = \"cssStyle\";\n AttributeFilter[] filters = new AttributeFilter[]{filter1};\n when(filter1.isCssFilterSupported()).thenReturn(false);\n WebElement webElement = mock(WebElement.class);\n when... | {
"fields": [
{
"declarator": "searchContext",
"modifier": "private final",
"original_string": "private final SearchContext searchContext;",
"type": "SearchContext",
"var_name": "searchContext"
},
{
"declarator": "container",
"modifier": "private final",
"or... | {
"body": "@Override\n public FluentList<FluentWebElement> find(String selector, SearchFilter... filters) {\n StringBuilder stringBuilder = new StringBuilder(selector);\n List<SearchFilter> postFilterSelector = new ArrayList<>();\n if (filters != null && filters.length > 0) {\n for ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_210 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private",
"original_string": "private ProgrammaticConfiguration configuration;",
"type": "ProgrammaticConfiguration",
"var_name": "configuration"
},
{
"declarator": "configurationProperties1",
"modifier":... | {
"body": "@Test\n public void pageLoadTimeout() {\n testImpl(ConfigurationProperties::getPageLoadTimeout, input -> {\n composed.setPageLoadTimeout(input);\n return null;\n }, null, 1000L, 2000L);\n }",
"class_method_signature": "ComposedConfigurationTest.pageLoadTimeout()"... | {
"fields": [
{
"declarator": "configurations",
"modifier": "private final",
"original_string": "private final ConfigurationProperties[] configurations;",
"type": "ConfigurationProperties[]",
"var_name": "configurations"
},
{
"declarator": "writableConfiguration",
... | {
"body": "@Override\n public void setPageLoadTimeout(Long pageLoadTimeout) {\n getWritableConfiguration().setPageLoadTimeout(pageLoadTimeout);\n }",
"class_method_signature": "ComposedConfiguration.setPageLoadTimeout(Long pageLoadTimeout)",
"constructor": false,
"full_signature": "@Override public... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_139 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void shouldFailWhenNoElementHasAttribute() {\n when(fluentList.attributes(\"name\")).thenReturn(Lists.newArrayList(null, null));\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasAttribute(\"name\"))\n .hasMessage(\"No selected element has attribute nam... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public ListAssert<String> hasAttribute(String attribute) {\n List<String> actualValues = requiresNonEmpty(actual.attributes(attribute));\n if (actualValues.stream().allMatch(Objects::isNull)) {\n failWithMessage(\"No selected element has attribute \" + attribute);\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_569 | {
"fields": [
{
"declarator": "webDriver",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebDriver webDriver;",
"type": "WebDriver",
"var_name": "webDriver"
},
{
"declarator": "manage",
"modifier": "@Mock\n private",
"original_s... | {
"body": "@Test\n public void shouldConfigurePageLoadTimeout() {\n mockWebDriver();\n mockConfigurationValues(2000L, null, null);\n\n timeoutConfigurer.configureDriver();\n\n verify(timeouts).pageLoadTimeout(2000L, TimeUnit.MILLISECONDS);\n verifyNoMoreInteractions(timeouts);\n ... | {
"fields": [
{
"declarator": "configuration",
"modifier": "private final",
"original_string": "private final Configuration configuration;",
"type": "Configuration",
"var_name": "configuration"
},
{
"declarator": "driver",
"modifier": "private final",
"origi... | {
"body": "public void configureDriver() {\n if (driver != null && driver.manage() != null && driver.manage().timeouts() != null) {\n configurePageLoadTimeout();\n configureImplicitlyWait();\n configureScriptTimeout();\n }\n }",
"class_method_signature": "FluentDriv... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_586 | {
"fields": [
{
"declarator": "element1",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element1;",
"type": "FluentWebElement",
"var_name": "element1"
},
{
"declarator": "element2",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void testSubmit() {\n when(element2.enabled()).thenReturn(true);\n when(element3.enabled()).thenReturn(true);\n\n list.submit();\n\n verify(element1, never()).submit();\n verify(element2).submit();\n verify(element3).submit();\n\n assertTha... | {
"fields": [
{
"declarator": "DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5)",
"modifier": "private static final",
"original_string": "private static final Duration DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5);",
"type": "Duration",
"var_name": "DEFAULT_WAIT_AND_... | {
"body": "@Override\n public FluentList<E> submit() {\n return perform(FluentWebElement::submit, FluentWebElement::enabled,\n \" has no element enabled. At least one element should be enabled to perform a submit.\");\n }",
"class_method_signature": "FluentListImpl.submit()",
"construc... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_343 | {
"fields": [
{
"declarator": "locatorHandler",
"modifier": "private",
"original_string": "private TestLocatorHandler locatorHandler;",
"type": "TestLocatorHandler",
"var_name": "locatorHandler"
},
{
"declarator": "locator",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void shouldReturnDefaultToStringIfElementToStringIsNull() {\n assertThat(locatorHandler.proxyToString(null)).isEqualTo(\"locator (Lazy Element)\");\n }",
"class_method_signature": "AbstractLocatorHandlerTest.shouldReturnDefaultToStringIfElementToStringIsNull()",
"constructor... | {
"fields": [
{
"declarator": "DEFAULT_LAZY_ELEMENT_TO_STRING = \"Lazy Element\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_LAZY_ELEMENT_TO_STRING = \"Lazy Element\";",
"type": "String",
"var_name": "DEFAULT_LAZY_ELEMENT_TO_STRING"
... | {
"body": "public String proxyToString(String elementToString) {\n if (elementToString == null) {\n elementToString = getLazyToString();\n }\n\n return locator instanceof WrapsElement ? elementToString : locator + \" (\" + elementToString + \")\";\n }",
"class_method_signature": "... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_206 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private",
"original_string": "private ProgrammaticConfiguration configuration;",
"type": "ProgrammaticConfiguration",
"var_name": "configuration"
},
{
"declarator": "configurationProperties1",
"modifier":... | {
"body": "@Test\n public void webDriver() {\n testImpl(ConfigurationProperties::getWebDriver, input -> {\n composed.setWebDriver(input);\n return null;\n }, null, \"firefox\", \"chrome\");\n }",
"class_method_signature": "ComposedConfigurationTest.webDriver()",
"construc... | {
"fields": [
{
"declarator": "configurations",
"modifier": "private final",
"original_string": "private final ConfigurationProperties[] configurations;",
"type": "ConfigurationProperties[]",
"var_name": "configurations"
},
{
"declarator": "writableConfiguration",
... | {
"body": "@Override\n public void setWebDriver(String webDriver) {\n getWritableConfiguration().setWebDriver(webDriver);\n }",
"class_method_signature": "ComposedConfiguration.setWebDriver(String webDriver)",
"constructor": false,
"full_signature": "@Override public void setWebDriver(String webDri... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_656 | {
"fields": [
{
"declarator": "webDriver",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebDriver webDriver;",
"type": "WebDriver",
"var_name": "webDriver"
},
{
"declarator": "configuration",
"modifier": "@Mock\n private",
"ori... | {
"body": "@Test\n public void shouldFailGoToInNewTabWhenNoUrlIsPresent() {\n fluentDriver = spy(new FluentDriver(webDriver, configuration, adapter));\n\n assertThatIllegalArgumentException().isThrownBy(() -> fluentDriver.goToInNewTab(null))\n .withMessage(\... | {
"fields": [
{
"declarator": "LOGGER =\n LoggerFactory.getLogger(FluentDriver.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER =\n LoggerFactory.getLogger(FluentDriver.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@Override\n public void goToInNewTab(String url) {\n checkArgument(url, \"It is required to specify a URL to navigate to (in a new tab).\");\n String newTab;\n synchronized (getClass()) {\n Set<String> initialTabs = getDriver().getWindowHandles();\n executeScri... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_590 | {
"fields": [
{
"declarator": "element1",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element1;",
"type": "FluentWebElement",
"var_name": "element1"
},
{
"declarator": "element2",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void shouldClearList() {\n list.clearList();\n\n assertThat(((FluentListImpl<FluentWebElement>) list).getList()).isEmpty();\n }",
"class_method_signature": "FluentListImplTest.shouldClearList()",
"constructor": false,
"full_signature": "@Test public void shouldClear... | {
"fields": [
{
"declarator": "DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5)",
"modifier": "private static final",
"original_string": "private static final Duration DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5);",
"type": "Duration",
"var_name": "DEFAULT_WAIT_AND_... | {
"body": "@Override\n public void clearList() {\n list.clear();\n }",
"class_method_signature": "FluentListImpl.clearList()",
"constructor": false,
"full_signature": "@Override public void clearList()",
"identifier": "clearList",
"invocations": [
"clear"
],
"modifiers": "@Override publ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_57 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testHasNotTextNegative() {\n when(element.text()).thenReturn(\"Something written here\");\n assertThatAssertionErrorIsThrownBy(() -> elementAssert.hasNotText(\"Something\"))\n .hasMessage(\"The element contains the text: Something\");\n }",
"class_me... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert hasNotText(String textToFind) {\n if (actual.text().contains(textToFind)) {\n failWithMessage(\"The element contains the text: \" + textToFind);\n }\n return this;\n }",
"class_method_signature": "FluentWebElementAssert.hasNo... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_314 | {
"fields": [
{
"declarator": "fluentControl",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentControl fluentControl;",
"type": "FluentControl",
"var_name": "fluentControl"
},
{
"declarator": "element",
"modifier": "@Mock\n privat... | {
"body": "@Test\n public void testElementClear() {\n WebElement childElement = mock(WebElement.class);\n\n waitHook.clear();\n verify(element).clear();\n }",
"class_method_signature": "WaitHookTest.testElementClear()",
"constructor": false,
"full_signature": "@Test public void testEl... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/hook/wait/WaitHook.java",
"identifier": "WaitHook",
"interfaces": "",
"methods": [
{
"class_method_signature": "WaitHook.WaitHook(FluentControl control, ComponentInstantiator instantiator, Supplier<WebElement> elementSupp... | {
"body": "@Override\n public void clear() {\n buildAwait().until(() -> getFluentWebElement().displayed() && getFluentWebElement().enabled());\n super.clear();\n }",
"class_method_signature": "WaitHook.clear()",
"constructor": false,
"full_signature": "@Override public void clear()",
"iden... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_601 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void testMouse() {\n fluentElement.mouse().click();\n verify(mouse).click(any());\n }",
"class_method_signature": "FluentWebElementTest.testMouse()",
"constructor": false,
"full_signature": "@Test public void testMouse()",
"identifier": "testMouse",
"invocations... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "public MouseElementActions mouse() {\n return mouseActions;\n }",
"class_method_signature": "FluentWebElement.mouse()",
"constructor": false,
"full_signature": "public MouseElementActions mouse()",
"identifier": "mouse",
"invocations": [],
"modifiers": "public",
"parameters": "()",
... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_251 | {
"fields": [
{
"declarator": "css",
"modifier": "@FindBy(css = \"css\")\n private",
"original_string": "@FindBy(css = \"css\")\n private FluentWebElement css;",
"type": "FluentWebElement",
"var_name": "css"
},
{
"declarator": "xpath",
"modifier": "@FindBy(x... | {
"body": "@Test\n public void shouldInjectIosAccessibilityIdField() throws NoSuchFieldException {\n Field accessibilityField = this.getClass().getDeclaredField(\"iosAccessibilityId\");\n InjectionAnnotations annotations = new InjectionAnnotations(accessibilityField, getIosCapablities());\n By... | {
"fields": [
{
"declarator": "classAnnotations",
"modifier": "private final",
"original_string": "private final ClassAnnotations classAnnotations;",
"type": "ClassAnnotations",
"var_name": "classAnnotations"
},
{
"declarator": "fieldAnnotations",
"modifier": "pri... | {
"body": "@Override\n public By buildBy() {\n if (mobileElement) {\n return defaultElementByBuilder.buildBy();\n }\n By fieldBy = fieldAnnotations.buildBy();\n By classBy = classAnnotations.buildBy();\n\n if (classBy != null && fieldBy instanceof ByIdOrName) {\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_178 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private static",
"original_string": "private static AnnotationConfiguration configuration;",
"type": "AnnotationConfiguration",
"var_name": "configuration"
},
{
"declarator": "defaultConfiguration",
"modi... | {
"body": "@Test\n public void defaultConfigurationDefaults() {\n Assertions.assertThat(defaultConfiguration.getConfigurationDefaults()).isNull();\n }",
"class_method_signature": "AnnotationConfigurationTest.defaultConfigurationDefaults()",
"constructor": false,
"full_signature": "@Test public void... | {
"fields": [
{
"declarator": "configuration",
"modifier": "private final",
"original_string": "private final FluentConfiguration configuration;",
"type": "FluentConfiguration",
"var_name": "configuration"
},
{
"declarator": "customProperties = new HashMap<>()",
"... | {
"body": "@Override\n public Class<? extends ConfigurationProperties> getConfigurationDefaults() {\n return getConfig(() -> getConfigurationDefaultsClassValue(configuration.configurationDefaults()));\n }",
"class_method_signature": "AnnotationConfiguration.getConfigurationDefaults()",
"constructor":... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_482 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentList",
"modifier": "@Mock\n ... | {
"body": "@Test\n public void untilPagePage() {\n FluentPage page = mock(FluentPage.class);\n\n wait.untilPage(page);\n Mockito.verify(fluentControlWait).untilPage(page);\n }",
"class_method_signature": "FluentWaitElementListTest.untilPagePage()",
"constructor": false,
"full_signatur... | {
"fields": [
{
"declarator": "elements",
"modifier": "private final",
"original_string": "private final List<? extends FluentWebElement> elements;",
"type": "List<? extends FluentWebElement>",
"var_name": "elements"
},
{
"declarator": "controlWait",
"modifier": "... | {
"body": "@Override\n public FluentWaitPageConditions untilPage() {\n return controlWait.untilPage();\n }",
"class_method_signature": "FluentWaitElementList.untilPage()",
"constructor": false,
"full_signature": "@Override public FluentWaitPageConditions untilPage()",
"identifier": "untilPage",
... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_528 | {
"fields": [
{
"declarator": "keyboard",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private Keyboard keyboard;",
"type": "Keyboard",
"var_name": "keyboard"
},
{
"declarator": "mouse",
"modifier": "@Mock\n private",
"original_string"... | {
"body": "@Test\n public void testClickWebElement() {\n MouseElementActions actions = new MouseElementActions(driver, element);\n actions.click();\n\n verify(mouse).mouseMove(coordinates);\n verify(mouse).click(coordinates);\n }",
"class_method_signature": "MouseElementActionsTest... | {
"fields": [
{
"declarator": "driver",
"modifier": "private final",
"original_string": "private final WebDriver driver;",
"type": "WebDriver",
"var_name": "driver"
},
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final ... | {
"body": "public MouseElementActions click() {\n loadElementAndPerform(actions().click(element));\n return this;\n }",
"class_method_signature": "MouseElementActions.click()",
"constructor": false,
"full_signature": "public MouseElementActions click()",
"identifier": "click",
"invocations"... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_197 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private static",
"original_string": "private static AnnotationConfiguration configuration;",
"type": "AnnotationConfiguration",
"var_name": "configuration"
},
{
"declarator": "defaultConfiguration",
"modi... | {
"body": "@Test\n public void eventsEnabled() {\n Assertions.assertThat(noConfiguration.getEventsEnabled()).isNull();\n Assertions.assertThat(defaultConfiguration.getEventsEnabled()).isNull();\n\n Assertions.assertThat(configuration.getEventsEnabled()).isFalse();\n }",
"class_method_sign... | {
"fields": [
{
"declarator": "configuration",
"modifier": "private final",
"original_string": "private final FluentConfiguration configuration;",
"type": "FluentConfiguration",
"var_name": "configuration"
},
{
"declarator": "customProperties = new HashMap<>()",
"... | {
"body": "@Override\n public Boolean getEventsEnabled() {\n return getConfig(() -> configuration.eventsEnabled().asBoolean());\n }",
"class_method_signature": "AnnotationConfiguration.getEventsEnabled()",
"constructor": false,
"full_signature": "@Override public Boolean getEventsEnabled()",
"ide... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_226 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/utils/ReflectionUtilsTest.java",
"identifier": "ReflectionUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNewInstance()\n throws NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException {\n TestClass testClass = ReflectionUtils.newInstance(TestClass.class);\n\n assertThat(testClass).isExactlyInstanceOf(TestClass.class);... | {
"fields": [
{
"declarator": "EMPTY_CLASS_ARRAY = new Class<?>[0]",
"modifier": "private static final",
"original_string": "private static final Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[0];",
"type": "Class<?>[]",
"var_name": "EMPTY_CLASS_ARRAY"
},
{
"declarator": "... | {
"body": "public static <T> T newInstance(Class<T> cls, Object... args)\n throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n Constructor<T> declaredConstructor = args.length == 0 ? getConstructor(cls) : getConstructor(cls, args);\n boo... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_363 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java",
"identifier": "StringConditionsImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnTrueIfMatchesString() {\n StringConditions stringConditions = new StringConditionsImpl(\"Some magical text.\");\n\n assertThat(stringConditions.matches(\"^Some .* text.$\")).isTrue();\n }",
"class_method_signature": "StringConditionsImplTest.shouldRetur... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/StringConditionsImpl.java",
"identifier": "StringConditionsImpl",
"interfaces": "implements StringConditions",
"methods": [
{
"class_method_signature": "StringConditionsImpl.StringConditionsImpl(String string)"... | {
"body": "@Override\n public boolean matches(String regex) {\n return verify(input -> {\n if (input == null) {\n return false;\n }\n return input.matches(regex);\n });\n }",
"class_method_signature": "StringConditionsImpl.matches(String regex)",
... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_20 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testIsNotSelectedKo() {\n when(element.present()).thenReturn(true);\n when(element.selected()).thenReturn(true);\n assertThatAssertionErrorIsThrownBy(() -> elementAssert.isNotSelected())\n .hasMessage(\"Element in assertion is present but selected\... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert isNotSelected() {\n isPresentAndIs(() -> actual.selected(), \"Element in assertion is present but selected\");\n return this;\n }",
"class_method_signature": "FluentWebElementAssert.isNotSelected()",
"constructor": false,
"full_signature":... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_158 | {
"fields": [
{
"declarator": "DRIVER_LIFECYCLE = \"driverLifecycle\"",
"modifier": "private static final",
"original_string": "private static final String DRIVER_LIFECYCLE = \"driverLifecycle\";",
"type": "String",
"var_name": "DRIVER_LIFECYCLE"
},
{
"declarator": "ret... | {
"body": "@Test\n public void baseUrlWithPrefix() {\n assertThat(getConfiguration().getBaseUrl()).isNull();\n\n mockProperty(\"baseUrl\", \"http://localhost:3000\");\n assertThat(getConfiguration().getBaseUrl()).isEqualTo(\"http://localhost:3000\");\n }",
"class_method_signature": "Prope... | {
"fields": [
{
"declarator": "PROPERTIES_PREFIX = \"fluentlenium.\"",
"modifier": "static final",
"original_string": "static final String PROPERTIES_PREFIX = \"fluentlenium.\";",
"type": "String",
"var_name": "PROPERTIES_PREFIX"
},
{
"declarator": "prefixes",
"mo... | {
"body": "@Override\n public String getBaseUrl() {\n return getStringProperty(\"baseUrl\");\n }",
"class_method_signature": "PropertiesBackendConfiguration.getBaseUrl()",
"constructor": false,
"full_signature": "@Override public String getBaseUrl()",
"identifier": "getBaseUrl",
"invocations": ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_508 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentWebElement",
"modifier": "@M... | {
"body": "@Test\n public void untilElementsSupplier() {\n Supplier<? extends List<? extends FluentWebElement>> selector = mock(Supplier.class);\n\n wait.untilElements(selector);\n Mockito.verify(fluentControlWait).untilElements(selector);\n }",
"class_method_signature": "FluentWaitElemen... | {
"fields": [
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "controlWait",
"modifier": "private final",
"original_str... | {
"body": "@Override\n public FluentListConditions untilElements(Supplier<? extends List<? extends FluentWebElement>> selector) {\n return controlWait.untilElements(selector);\n }",
"class_method_signature": "FluentWaitElement.untilElements(Supplier<? extends List<? extends FluentWebElement>> selector)... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_621 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void testIsClickable() {\n assertThat(fluentElement.clickable()).isFalse();\n when(element.isEnabled()).thenReturn(true);\n when(element.isDisplayed()).thenReturn(true);\n assertThat(fluentElement.clickable()).isTrue();\n }",
"class_method_signature": "Flu... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "public boolean clickable() {\n boolean clickable;\n try {\n clickable = ExpectedConditions.elementToBeClickable(getElement())\n .apply(control.getDriver()) != null;\n } catch (NoSuchElementException | StaleElementReferenceException\n | Eleme... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_271 | {
"fields": [
{
"declarator": "componentsManager",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ComponentsManager componentsManager;",
"type": "ComponentsManager",
"var_name": "componentsManager"
},
{
"declarator": "validator",
"modifie... | {
"body": "@Test\n public void shouldReturnTrueIfFieldIsListOfFluentWebElement() throws NoSuchFieldException {\n Field listOfFluentWebElementField = getField(\"listOfFluentWebElements\");\n\n assertThat(FluentElementInjectionSupportValidator.isListOfFluentWebElement(listOfFluentWebElementField)).isTr... | {
"fields": [
{
"declarator": "componentsManager",
"modifier": "private final",
"original_string": "private final ComponentsManager componentsManager;",
"type": "ComponentsManager",
"var_name": "componentsManager"
}
],
"file": "fluentlenium-core/src/main/java/org/fluentlenium... | {
"body": "static boolean isListOfFluentWebElement(Field field) {\n return isFieldListOf(field, FluentWebElement.class::isAssignableFrom);\n }",
"class_method_signature": "FluentElementInjectionSupportValidator.isListOfFluentWebElement(Field field)",
"constructor": false,
"full_signature": "static boo... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_98 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasSizeNotEmptyKo() {\n when(fluentList.count()).thenReturn(0);\n assertThatAssertionErrorIsThrownBy(() -> listAssert.isNotEmpty()).hasMessage(\"Actual size: 0 is equal to: 0\");\n }",
"class_method_signature": "FluentListAssertTest.testHasSizeNotEmptyKo()",
... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert isNotEmpty() {\n return hasSize().notEqualTo(0);\n }",
"class_method_signature": "FluentListAssert.isNotEmpty()",
"constructor": false,
"full_signature": "@Override public FluentListAssert isNotEmpty()",
"identifier": "isNotEmpty",
"invocations": [... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_77 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "fluentPage",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void hasPageSourceContainingKo() {\n doReturn(\"<html></html>\").when(driver).getPageSource();\n assertThatAssertionErrorIsThrownBy(() -> pageAssert.hasPageSourceContaining(\"<body>\"))\n .hasMessage(\"Current page source does not contain: <body>\");\n }",
... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/PageAssert.java",
"identifier": "PageAssert",
"interfaces": "implements PageStateAssert",
"methods": [
{
"class_method_signature": "PageAssert.PageAssert(FluentPage actual)",
"constructor": true,
... | {
"body": "@Override\n public PageAssert hasPageSourceContaining(String value) {\n String pageSource = actual.getDriver().getPageSource();\n if (!pageSource.contains(value)) {\n failWithMessage(\"Current page source does not contain: \" + value);\n }\n return this;\n }",
... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_334 | {
"fields": [
{
"declarator": "locatorHandler",
"modifier": "private",
"original_string": "private TestLocatorHandler locatorHandler;",
"type": "TestLocatorHandler",
"var_name": "locatorHandler"
},
{
"declarator": "locator",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void shouldSetHooksWhenHookDefinitionsAreNotEmpty() {\n HookChainBuilder hookChainBuilder = mock(HookChainBuilder.class);\n HookDefinition<?> hookDefinition1 = mock(HookDefinition.class);\n HookDefinition<?> hookDefinition2 = mock(HookDefinition.class);\n List<... | {
"fields": [
{
"declarator": "DEFAULT_LAZY_ELEMENT_TO_STRING = \"Lazy Element\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_LAZY_ELEMENT_TO_STRING = \"Lazy Element\";",
"type": "String",
"var_name": "DEFAULT_LAZY_ELEMENT_TO_STRING"
... | {
"body": "@Override\n public void setHooks(HookChainBuilder hookChainBuilder, List<HookDefinition<?>> hookDefinitions) {\n if (isEmpty(hookDefinitions)) {\n this.hookChainBuilder = null;\n this.hookDefinitions = null;\n hooks = null;\n } else {\n this.hook... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_267 | {
"fields": [
{
"declarator": "componentsManager",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ComponentsManager componentsManager;",
"type": "ComponentsManager",
"var_name": "componentsManager"
},
{
"declarator": "validator",
"modifie... | {
"body": "@Test\n public void shouldReturnTrueIfFieldIsComponentList() throws NoSuchFieldException {\n Field componentListField = getField(\"componentList\");\n when(componentsManager.isComponentListClass((Class<? extends List<?>>) componentListField.getType())).thenReturn(true);\n when(compo... | {
"fields": [
{
"declarator": "componentsManager",
"modifier": "private final",
"original_string": "private final ComponentsManager componentsManager;",
"type": "ComponentsManager",
"var_name": "componentsManager"
}
],
"file": "fluentlenium-core/src/main/java/org/fluentlenium... | {
"body": "boolean isComponentList(Field field) {\n if (isList(field)) {\n boolean componentListClass = componentsManager.isComponentListClass((Class<? extends List<?>>) field.getType());\n if (componentListClass) {\n Class<?> genericType = ReflectionUtils.getFirstGenericTy... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_637 | {
"fields": [
{
"declarator": "driver",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebDriver driver;",
"type": "WebDriver",
"var_name": "driver"
},
{
"declarator": "searchContext",
"modifier": "@Mock\n private",
"original_str... | {
"body": "@Test\n public void findCheckCssIsWellFormedWithPostSelectorAndByLocator() {\n WebElement webElement = mock(WebElement.class);\n WebElement webElement2 = mock(WebElement.class);\n List<WebElement> webElements = new ArrayList<>(Arrays.asList(webElement, webElement2));\n\n when... | {
"fields": [
{
"declarator": "searchContext",
"modifier": "private final",
"original_string": "private final SearchContext searchContext;",
"type": "SearchContext",
"var_name": "searchContext"
},
{
"declarator": "container",
"modifier": "private final",
"or... | {
"body": "@Override\n public FluentList<FluentWebElement> find(String selector, SearchFilter... filters) {\n StringBuilder stringBuilder = new StringBuilder(selector);\n List<SearchFilter> postFilterSelector = new ArrayList<>();\n if (filters != null && filters.length > 0) {\n for ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.