id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
2088736_322 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebElement element;",
"type": "WebElement",
"var_name": "element"
},
{
"declarator": "locator",
"modifier": "@Mock\n private",
"original_stri... | {
"body": "@Test\n public void testBuildHook() {\n List<HookDefinition<?>> hookDefinitions = new ArrayList<>();\n\n hookDefinitions.add(new HookDefinition<>(NanoHook.class));\n hookDefinitions.add(new HookDefinition<>(NanoHook.class, new NanoHookOptions(\"option\")));\n hookDefinitions.... | {
"fields": [
{
"declarator": "control",
"modifier": "private final",
"original_string": "private final FluentControl control;",
"type": "FluentControl",
"var_name": "control"
},
{
"declarator": "instantiator",
"modifier": "private final",
"original_string":... | {
"body": "@Override\n public List<FluentHook> build(Supplier<WebElement> elementSupplier, Supplier<ElementLocator> locator,\n Supplier<String> toStringSupplier, List<HookDefinition<?>> hooks) {\n List<FluentHook> chain = new ArrayList<>();\n\n Supplier<WebElement> currentSupplier = elemen... | {
"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_288 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/url/UrlTemplateTest.java",
"identifier": "UrlTemplateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseNotMatchingOptionalMiddleParameter() {\n UrlTemplate urlParametersTemplate = new UrlTemplate(\"/abc/{param1}/def{?/param2}/ghi/{param3}\");\n assertThat(getParameterNames(urlParametersTemplate)).containsExactly(\"param1\", \"param2\", \"param3\");\n asse... | {
"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_61 | {
"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 testHasTextWithSpecialCharactersInElement() {\n String textWithStringFormatError = \"%A\";\n when(element.text()).thenReturn(textWithStringFormatError);\n elementAssert.hasText(textWithStringFormatError);\n }",
"class_method_signature": "FluentWebElementAsse... | {
"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 hasText(String textToFind) {\n String actualText = actual.text();\n if (!actualText.contains(textToFind)) {\n failWithMessage(\"The element does not contain the text: \" + textToFind\n + \". Actual text found : \" + 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_119 | {
"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 testHasIdEmptyKo() {\n when(fluentList.ids()).thenReturn(emptyList());\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasId(\"some-id\"))\n .hasMessage(\"List is empty. Please make sure you use correct selector.\");\n }",
"class_method_signatu... | {
"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 hasId(String idToFind) {\n List<String> actualIds = requiresNonEmpty(actual.ids());\n if (!actualIds.contains(idToFind)) {\n failWithMessage(\"No selected elements have id: \" + idToFind\n + \". Actual ids 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_549 | {
"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 testKeyDown() {\n KeyboardActions actions = new KeyboardActions(driver);\n actions.keyDown(Keys.SHIFT);\n\n verify(mouse, never()).mouseMove(any(Coordinates.class));\n verify(keyboard).pressKey(Keys.SHIFT);\n }",
"class_method_signature": "KeyboardAct... | {
"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/KeyboardActions.java",
"identifier... | {
"body": "public KeyboardActions keyDown(Keys theKey) {\n actions().keyDown(theKey).perform();\n return this;\n }",
"class_method_signature": "KeyboardActions.keyDown(Keys theKey)",
"constructor": false,
"full_signature": "public KeyboardActions keyDown(Keys theKey)",
"identifier": "keyDown"... | {
"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_230 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBaseUrlWithPathWithTrailingSlash() {\n String test = UrlUtils.concat(\"http://fluentlenium.com/path/\", \"abc/def\");\n Assertions.assertThat(test).isEqualTo(\"http://fluentlenium.com/path/abc/def\");\n }",
"class_method_signature": "UrlUtilsTest.testBaseUrlWit... | {
"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_36 | {
"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 testHasIdOk() {\n when(element.id()).thenReturn(\"some id\");\n elementAssert.hasId(\"some id\");\n }",
"class_method_signature": "FluentWebElementAssertTest.testHasIdOk()",
"constructor": false,
"full_signature": "@Test public void testHasIdOk()",
"identifie... | {
"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 hasId(String idToFind) {\n String actualId = actual.id();\n if (!actualId.equals(idToFind)) {\n failWithMessage(\"The element does not have the id: \" + idToFind\n + \". Actual id found : \" + actualId);\n }\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_375 | {
"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 hasText() {\n when(webElement.getText()).thenReturn(\"Some Text\");\n\n assertThat(conditions.text().equalTo(\"Some Text\")).isTrue();\n assertThat(conditions.text().equalTo(\"Other Text\")).isFalse();\n }",
"class_method_signature": "WebElementConditionsTes... | {
"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 text() {\n return new StringConditionsImpl(object.text(), negation);\n }",
"class_method_signature": "WebElementConditions.text()",
"constructor": false,
"full_signature": "@Override public StringConditions text()",
"identifier": "text",
"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_162 | {
"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 implicitlyWait() {\n assertThat(getConfiguration().getImplicitlyWait()).isNull();\n\n mockProperty(\"implicitlyWait\", 1000L);\n assertThat(getConfiguration().getImplicitlyWait()).isEqualTo(1000L);\n }",
"class_method_signature": "PropertiesBackendConfigurat... | {
"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 getImplicitlyWait() {\n return getLongProperty(\"implicitlyWait\");\n }",
"class_method_signature": "PropertiesBackendConfiguration.getImplicitlyWait()",
"constructor": false,
"full_signature": "@Override public Long getImplicitlyWait()",
"identifier": "getImpli... | {
"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_498 | {
"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 ignoring() {\n Class<? extends RuntimeException> exceptionType = RuntimeException.class;\n\n assertThat(wait.ignoring(exceptionType)).isSameAs(wait);\n Mockito.verify(fluentControlWait).ignoring(exceptionType);\n }",
"class_method_signature": "FluentWaitElem... | {
"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 ignoring(Class<? extends RuntimeException> exceptionType) {\n controlWait.ignoring(exceptionType);\n return this;\n }",
"class_method_signature": "FluentWaitElement.ignoring(Class<? extends RuntimeException> exceptionType)",
"constructor": false,... | {
"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_532 | {
"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 testRelease() {\n MouseElementActions actions = new MouseElementActions(driver, element);\n actions.release();\n\n verify(mouse).mouseMove(coordinates);\n verify(mouse).mouseUp(coordinates);\n }",
"class_method_signature": "MouseElementActionsTest.tes... | {
"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 release() {\n loadElementAndPerform(actions().release(element));\n return this;\n }",
"class_method_signature": "MouseElementActions.release()",
"constructor": false,
"full_signature": "public MouseElementActions release()",
"identifier": "release",
"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_477 | {
"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 untilElementSupplier() {\n Supplier<? extends FluentWebElement> selector = mock(Supplier.class);\n\n wait.untilElement(selector);\n Mockito.verify(fluentControlWait).untilElement(selector);\n }",
"class_method_signature": "FluentWaitElementListTest.untilElem... | {
"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 FluentConditions untilElement(Supplier<? extends FluentWebElement> selector) {\n return controlWait.untilElement(selector);\n }",
"class_method_signature": "FluentWaitElementList.untilElement(Supplier<? extends FluentWebElement> selector)",
"constructor": false,
"full_... | {
"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_565 | {
"fields": [
{
"declarator": "CSS_TEXT = \"some: css\"",
"modifier": "private static final",
"original_string": "private static final String CSS_TEXT = \"some: css\";",
"type": "String",
"var_name": "CSS_TEXT"
},
{
"declarator": "javascriptControl",
"modifier": "... | {
"body": "@Test\n public void shouldInjectResource() {\n when(javascriptControl.executeScript(anyString())).thenReturn(fluentJavascript);\n\n cssSupport.injectResource(\"/org/fluentlenium/core/css/dummy_resource.js\");\n\n verify(javascriptControl, times(1)).executeScript(startsWith(\"cssText... | {
"fields": [
{
"declarator": "INJECTOR_JS_PATH = \"/org/fluentlenium/core/css/injector.js\"",
"modifier": "private static final",
"original_string": "private static final String INJECTOR_JS_PATH = \"/org/fluentlenium/core/css/injector.js\";",
"type": "String",
"var_name": "INJECTOR_... | {
"body": "@Override\n public void injectResource(String cssResourceName) {\n inject(getContentOf(cssResourceName));\n }",
"class_method_signature": "CssSupportImpl.injectResource(String cssResourceName)",
"constructor": false,
"full_signature": "@Override public void injectResource(String cssResou... | {
"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_135 | {
"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 testHasDimensionKo() {\n Dimension dimensionOne = new Dimension(1, 2);\n Dimension dimensionTwo = new Dimension(3, 4);\n when(fluentList.dimensions()).thenReturn(Lists.newArrayList(dimensionOne, dimensionTwo));\n assertThatAssertionErrorIsThrownBy(() -> li... | {
"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 hasDimension(Dimension dimension) {\n List<Dimension> actualDimensions = requiresNonEmpty(actual.dimensions());\n if (!actualDimensions.contains(dimension)) {\n failWithMessage(\"No selected elements have dimension: \" + dimension.toString()\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_420 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/ContainsWordMatcherTest.java",
"identifier": "ContainsWordMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldContainWord() {\n ContainsWordMatcher matcher = new ContainsWordMatcher(\"value\");\n\n assertThat(matcher.isSatisfiedBy(\"some value\")).isTrue();\n }",
"class_method_signature": "ContainsWordMatcherTest.shouldContainWord()",
"constructor": false,
"full_... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/ContainsWordMatcher.java",
"identifier": "ContainsWordMatcher",
"interfaces": "",
"methods": [
{
"class_method_signature": "ContainsWordMatcher.ContainsWordMatcher(String value)",
"constructor": true,... | {
"body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return CalculateService.contains(getPattern(), getValue(), currentValue);\n }",
"class_method_signature": "ContainsWordMatcher.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_359 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java",
"identifier": "StringConditionsImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnFalseForEqualToIfTargetStringIsNull() {\n StringConditions stringConditions = new StringConditionsImpl(null);\n\n assertThat(stringConditions.equalTo(\"magical\")).isFalse();\n }",
"class_method_signature": "StringConditionsImplTest.shouldReturnFalseFor... | {
"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 equalTo(String anotherString) {\n return verify(input -> {\n if (input == null) {\n return false;\n }\n return input.equals(anotherString);\n });\n }",
"class_method_signature": "StringConditionsImpl.equalTo(St... | {
"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_6 | {
"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 testIsNotEnabledKo() {\n when(element.present()).thenReturn(true);\n when(element.enabled()).thenReturn(true);\n assertThatAssertionErrorIsThrownBy(() -> elementAssert.isNotEnabled())\n .hasMessage(\"Element in assertion is present but enabled\");\... | {
"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 isNotEnabled() {\n isPresentAndIs(() -> actual.enabled(), \"Element in assertion is present but enabled\");\n return this;\n }",
"class_method_signature": "FluentWebElementAssert.isNotEnabled()",
"constructor": false,
"full_signature": "@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_123 | {
"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 shouldNotHaveClass() {\n when(fluentList.attributes(\"class\")).thenReturn(Lists.newArrayList(\"some-class\", \"unknown-class\"));\n listAssert.hasNotClass(\"clazz\");\n }",
"class_method_signature": "FluentListAssertTest.shouldNotHaveClass()",
"constructor": fal... | {
"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_573 | {
"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 testFirst() {\n assertThat(list.first()).isSameAs(element1);\n\n assertThatThrownBy(() -> emptyList.first()).isExactlyInstanceOf(NoSuchElementException.class);\n }",
"class_method_signature": "FluentListImplTest.testFirst()",
"constructor": false,
"full_signatu... | {
"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 first() {\n if (!LocatorProxies.loaded(proxy)) {\n E component = instantiator.newComponent(componentClass, LocatorProxies.first(proxy));\n configureComponentWithLabel(component);\n configureComponentWithHooks(component);\n return 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_436 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/CalculateServiceTest.java",
"identifier": "CalculateServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void checkPatternEqualOk() {\n assertThat(CalculateService.equal(Pattern.compile(\"[to]*\"), null, \"toto\")).isTrue();\n\n }",
"class_method_signature": "CalculateServiceTest.checkPatternEqualOk()",
"constructor": false,
"full_signature": "@Test public void checkPatternEq... | {
"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 equal(Pattern patternValue, String referenceValue, String currentValue) {\n if (currentValue == null) {\n return false;\n }\n if (patternValue == null) {\n return currentValue.equals(referenceValue);\n }\n return patternValue.ma... | {
"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_524 | {
"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 testKeyUp() {\n KeyboardElementActions actions = new KeyboardElementActions(driver, element);\n actions.keyUp(Keys.SHIFT);\n\n verify(mouse).click(coordinates);\n verify(keyboard).releaseKey(Keys.SHIFT);\n }",
"class_method_signature": "KeyboardElemen... | {
"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 keyUp(Keys theKey) {\n loadElementAndPerform(actions().keyUp(element, theKey));\n return this;\n }",
"class_method_signature": "KeyboardElementActions.keyUp(Keys theKey)",
"constructor": false,
"full_signature": "public KeyboardElementActions keyUp(Keys ... | {
"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_174 | {
"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 htmlDumpMode() {\n assertThat(getConfiguration().getHtmlDumpMode()).isNull();\n\n mockProperty(\"htmlDumpMode\", ConfigurationProperties.TriggerMode.AUTOMATIC_ON_FAIL);\n assertThat(getConfiguration().getHtmlDumpMode()).isEqualTo(ConfigurationProperties.TriggerMo... | {
"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 getHtmlDumpMode() {\n return getEnumProperty(TriggerMode.class, \"htmlDumpMode\");\n }",
"class_method_signature": "PropertiesBackendConfiguration.getHtmlDumpMode()",
"constructor": false,
"full_signature": "@Override public TriggerMode getHtmlDumpMode()",
... | {
"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_461 | {
"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 atMost() {\n assertThat(wait.atMost(10, TimeUnit.MILLISECONDS)).isSameAs(wait);\n Mockito.verify(fluentControlWait).atMost(Duration.ofMillis(10));\n }",
"class_method_signature": "FluentWaitElementListTest.atMost()",
"constructor": false,
"full_signature": "@Te... | {
"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 atMost(Duration duration) {\n controlWait.atMost(duration);\n return this;\n }",
"class_method_signature": "FluentWaitElementList.atMost(Duration duration)",
"constructor": false,
"full_signature": "@Override public FluentWaitElementList 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_318 | {
"fields": [
{
"declarator": "webDriver",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebDriver webDriver;",
"type": "WebDriver",
"var_name": "webDriver"
},
{
"declarator": "element",
"modifier": "@Mock(extraInterfaces = Locatable.cla... | {
"body": "@Test\n public void testDelegatesLocator() {\n hook.findElement();\n verify(element, never()).findElement(any(By.class));\n verify(locator).findElement();\n }",
"class_method_signature": "BaseHookTest.testDelegatesLocator()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [
{
"declarator": "instantiator",
"modifier": "private final",
"original_string": "private final ComponentInstantiator instantiator;",
"type": "ComponentInstantiator",
"var_name": "instantiator"
},
{
"declarator": "locatorSupplier",
"modifier": "privat... | {
"body": "public WebElement findElement(By by) {\n return getElement().findElement(by);\n }",
"class_method_signature": "BaseHook.findElement(By by)",
"constructor": false,
"full_signature": "public WebElement findElement(By by)",
"identifier": "findElement",
"invocations": [
"findElement",
... | {
"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_319 | {
"fields": [
{
"declarator": "webDriver",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebDriver webDriver;",
"type": "WebDriver",
"var_name": "webDriver"
},
{
"declarator": "element",
"modifier": "@Mock(extraInterfaces = Locatable.cla... | {
"body": "@Test\n public void testNoOptionHook() {\n Object defaultOptions = new Object();\n\n BaseHook noOptionHook = new BaseHook<Object>(fluentAdapter, instantiator, () -> element, () -> locator, () -> \"hook\",\n null) {\n @Override\n protected Object newOpti... | {
"fields": [
{
"declarator": "instantiator",
"modifier": "private final",
"original_string": "private final ComponentInstantiator instantiator;",
"type": "ComponentInstantiator",
"var_name": "instantiator"
},
{
"declarator": "locatorSupplier",
"modifier": "privat... | {
"body": "@Override\n public T getOptions() {\n return options;\n }",
"class_method_signature": "BaseHook.getOptions()",
"constructor": false,
"full_signature": "@Override public T getOptions()",
"identifier": "getOptions",
"invocations": [],
"modifiers": "@Override 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_525 | {
"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 testSendKeys() {\n KeyboardElementActions actions = new KeyboardElementActions(driver, element);\n actions.sendKeys(Keys.ENTER, Keys.SPACE);\n\n verify(mouse).click(coordinates);\n verify(keyboard).sendKeys(Keys.ENTER, Keys.SPACE);\n }",
"class_method... | {
"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 sendKeys(CharSequence... keysToSend) {\n loadElementAndPerform(actions().sendKeys(element, keysToSend));\n return this;\n }",
"class_method_signature": "KeyboardElementActions.sendKeys(CharSequence... keysToSend)",
"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_175 | {
"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 configurationFactory() {\n Assertions.assertThat(configuration.getConfigurationFactory()).isEqualTo(DummyConfigurationFactory.class);\n }",
"class_method_signature": "AnnotationConfigurationTest.configurationFactory()",
"constructor": false,
"full_signature": "@Test p... | {
"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 ConfigurationFactory> getConfigurationFactory() {\n return getConfig(() -> getConfigurationFactoryClassValue(configuration.configurationFactory()));\n }",
"class_method_signature": "AnnotationConfiguration.getConfigurationFactory()",
"constructor": false,... | {
"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_460 | {
"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 getWait() {\n wait.getWait();\n Mockito.verify(fluentControlWait).getWait();\n }",
"class_method_signature": "FluentWaitElementListTest.getWait()",
"constructor": false,
"full_signature": "@Test public void getWait()",
"identifier": "getWait",
"invocations"... | {
"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 org.openqa.selenium.support.ui.FluentWait getWait() {\n return controlWait.getWait();\n }",
"class_method_signature": "FluentWaitElementList.getWait()",
"constructor": false,
"full_signature": "@Override public org.openqa.selenium.support.ui.FluentWait getWait()",
"i... | {
"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_122 | {
"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 testHasClassEmptyKo() {\n when(fluentList.attributes(\"class\")).thenReturn(emptyList());\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasClass(\"some-class\"))\n .hasMessage(\"List is empty. Please make sure you use correct selector.\");\n }"... | {
"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_572 | {
"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 shouldNotConfigureAnyTimeout() {\n FluentDriverTimeoutConfigurer configurer = new FluentDriverTimeoutConfigurer(configuration, null);\n\n configurer.configureDriver();\n\n verify(webDriver, never()).manage();\n }",
"class_method_signature": "FluentDriverTime... | {
"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_437 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/CalculateServiceTest.java",
"identifier": "CalculateServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void checkPatternEqualNok() {\n assertThat(CalculateService.equal(Pattern.compile(\"[to]?\"), null, \"tot\")).isFalse();\n }",
"class_method_signature": "CalculateServiceTest.checkPatternEqualNok()",
"constructor": false,
"full_signature": "@Test public void checkPatternEq... | {
"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 equal(Pattern patternValue, String referenceValue, String currentValue) {\n if (currentValue == null) {\n return false;\n }\n if (patternValue == null) {\n return currentValue.equals(referenceValue);\n }\n return patternValue.ma... | {
"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_358 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java",
"identifier": "StringConditionsImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnFalseIsNotEqualToString() {\n StringConditions stringConditions = new StringConditionsImpl(\"Some magical text.\");\n\n assertThat(stringConditions.equalTo(\"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 equalTo(String anotherString) {\n return verify(input -> {\n if (input == null) {\n return false;\n }\n return input.equals(anotherString);\n });\n }",
"class_method_signature": "StringConditionsImpl.equalTo(St... | {
"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_7 | {
"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 testIsClickableOk() {\n when(element.present()).thenReturn(true);\n when(element.clickable()).thenReturn(true);\n elementAssert.isClickable();\n }",
"class_method_signature": "FluentWebElementAssertTest.testIsClickableOk()",
"constructor": false,
"full_s... | {
"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 isClickable() {\n isPresentAndIs(() -> !actual.clickable(), \"Element in assertion is present but not clickable\");\n return this;\n }",
"class_method_signature": "FluentWebElementAssert.isClickable()",
"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_564 | {
"fields": [
{
"declarator": "CSS_TEXT = \"some: css\"",
"modifier": "private static final",
"original_string": "private static final String CSS_TEXT = \"some: css\";",
"type": "String",
"var_name": "CSS_TEXT"
},
{
"declarator": "javascriptControl",
"modifier": "... | {
"body": "@Test\n public void shouldInjectUnescapedCss() {\n when(javascriptControl.executeScript(anyString())).thenReturn(fluentJavascript);\n\n cssSupport.inject(\"#location {\\ndisplay: none\\n}\");\n\n verify(javascriptControl, times(1)).executeScript(startsWith(\"cssText = \\\"#location ... | {
"fields": [
{
"declarator": "INJECTOR_JS_PATH = \"/org/fluentlenium/core/css/injector.js\"",
"modifier": "private static final",
"original_string": "private static final String INJECTOR_JS_PATH = \"/org/fluentlenium/core/css/injector.js\";",
"type": "String",
"var_name": "INJECTOR_... | {
"body": "@Override\n public void inject(String cssText) {\n cssText = cssText.replace(\"\\r\\n\", \"\").replace(\"\\n\", \"\");\n cssText = StringEscapeUtils.escapeEcmaScript(cssText);\n executeScriptRetry(\"cssText = \\\"\" + cssText + \"\\\";\\n\" + getContentOf(INJECTOR_JS_PATH));\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_134 | {
"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 testHasDimensionOk() {\n Dimension dimensionOne = new Dimension(1, 2);\n Dimension dimensionTwo = new Dimension(3, 4);\n when(fluentList.dimensions()).thenReturn(Lists.newArrayList(dimensionOne, dimensionTwo));\n listAssert.hasDimension(new Dimension(1, 2)... | {
"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 hasDimension(Dimension dimension) {\n List<Dimension> actualDimensions = requiresNonEmpty(actual.dimensions());\n if (!actualDimensions.contains(dimension)) {\n failWithMessage(\"No selected elements have dimension: \" + dimension.toString()\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_421 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/ContainsWordMatcherTest.java",
"identifier": "ContainsWordMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldNotContainWord() {\n ContainsWordMatcher matcher = new ContainsWordMatcher(\"some value\");\n\n assertThat(matcher.isSatisfiedBy(\"non-matching\")).isFalse();\n }",
"class_method_signature": "ContainsWordMatcherTest.shouldNotContainWord()",
"constructor": f... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/ContainsWordMatcher.java",
"identifier": "ContainsWordMatcher",
"interfaces": "",
"methods": [
{
"class_method_signature": "ContainsWordMatcher.ContainsWordMatcher(String value)",
"constructor": true,... | {
"body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return CalculateService.contains(getPattern(), getValue(), currentValue);\n }",
"class_method_signature": "ContainsWordMatcher.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_163 | {
"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 implicitlyWaitNotNumber() {\n assertThat(getConfiguration().getImplicitlyWait()).isNull();\n\n mockProperty(\"implicitlyWait\", \"dummy\");\n assertThat(getConfiguration().getImplicitlyWait()).isNull();\n }",
"class_method_signature": "PropertiesBackendConfi... | {
"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 getImplicitlyWait() {\n return getLongProperty(\"implicitlyWait\");\n }",
"class_method_signature": "PropertiesBackendConfiguration.getImplicitlyWait()",
"constructor": false,
"full_signature": "@Override public Long getImplicitlyWait()",
"identifier": "getImpli... | {
"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_499 | {
"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 ignoringTwoTypes() {\n Class<? extends RuntimeException> firstType = RuntimeException.class;\n Class<? extends RuntimeException> secondType = RuntimeException.class;\n\n assertThat(wait.ignoring(firstType, secondType)).isSameAs(wait);\n Mockito.verify(flue... | {
"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 ignoring(Class<? extends RuntimeException> exceptionType) {\n controlWait.ignoring(exceptionType);\n return this;\n }",
"class_method_signature": "FluentWaitElement.ignoring(Class<? extends RuntimeException> exceptionType)",
"constructor": false,... | {
"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_533 | {
"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 moveToElement() {\n MouseElementActions actions = new MouseElementActions(driver, element);\n actions.moveToElement();\n\n verify(mouse).mouseMove(coordinates);\n }",
"class_method_signature": "MouseElementActionsTest.moveToElement()",
"constructor": false... | {
"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_476 | {
"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 untilEach() {\n FluentList<? extends FluentWebElement> elements = mock(FluentList.class);\n\n wait.untilEach(elements);\n Mockito.verify(fluentControlWait).untilEach(elements);\n }",
"class_method_signature": "FluentWaitElementListTest.untilEach()",
"const... | {
"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": "public FluentConditions untilEach() {\n return controlWait.untilEach(elements);\n }",
"class_method_signature": "FluentWaitElementList.untilEach()",
"constructor": false,
"full_signature": "public FluentConditions untilEach()",
"identifier": "untilEach",
"invocations": [
"untilEach"... | {
"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_231 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBaseUrlWithoutTrailingSlashRootPath() {\n String test = UrlUtils.concat(\"http://fluentlenium.com\", \"/abc/def\");\n Assertions.assertThat(test).isEqualTo(\"http://fluentlenium.com/abc/def\");\n }",
"class_method_signature": "UrlUtilsTest.testBaseUrlWithoutTra... | {
"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_37 | {
"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 testHasIdKo() {\n when(element.id()).thenReturn(\"other id\");\n assertThatAssertionErrorIsThrownBy(() -> elementAssert.hasId(\"some id\"))\n .hasMessage(\"The element does not have the id: some id. Actual id found : other id\");\n }",
"class_method_... | {
"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 hasId(String idToFind) {\n String actualId = actual.id();\n if (!actualId.equals(idToFind)) {\n failWithMessage(\"The element does not have the id: \" + idToFind\n + \". Actual id found : \" + actualId);\n }\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_374 | {
"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 isSelected() {\n assertThat(conditions.selected()).isFalse();\n\n when(webElement.isSelected()).thenReturn(true);\n\n assertThat(conditions.selected()).isTrue();\n }",
"class_method_signature": "WebElementConditionsTest.isSelected()",
"constructor": false,... | {
"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 selected() {\n return verify(FluentWebElement::selected);\n }",
"class_method_signature": "WebElementConditions.selected()",
"constructor": false,
"full_signature": "@Override public boolean selected()",
"identifier": "selected",
"invocations": [
"verif... | {
"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_118 | {
"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 testHasTagNamedKo() {\n when(fluentList.tagNames()).thenReturn(Lists.newArrayList(\"span\", \"div\"));\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasTagName(\"p\"))\n .hasMessage(\"No selected elements have tag: p. Actual tags found : [span, di... | {
"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 hasTagName(String tagName) {\n List<String> actualTags = requiresNonEmpty(actual.tagNames());\n if (!actualTags.contains(tagName)) {\n failWithMessage(\"No selected elements have tag: \" + tagName\n + \". Actual tags found :... | {
"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_548 | {
"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 moveByOffset() {\n MouseActions actions = new MouseActions(driver);\n actions.moveByOffset(1, 1);\n verify(mouse).mouseMove(null, 1, 1);\n }",
"class_method_signature": "MouseActionsTest.moveByOffset()",
"constructor": false,
"full_signature": "@Test pub... | {
"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 moveByOffset(int xOffset, int yOffset) {\n actions().moveByOffset(xOffset, yOffset).perform();\n return this;\n }",
"class_method_signature": "MouseActions.moveByOffset(int xOffset, int yOffset)",
"constructor": false,
"full_signature": "public MouseActions moveBy... | {
"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_266 | {
"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 shouldReturnFalseIfFieldHasNoGenericTypeForComponentList() throws NoSuchFieldException {\n Field componentListWithoutGenericTypeField = getField(\"componentListWithoutGenericType\");\n when(componentsManager.isComponentListClass((Class<? extends List<?>>) componentListW... | {
"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_636 | {
"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 findCheckCssIsWellFormedWithPostSelector() {\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(searchConte... | {
"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_323 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebElement element;",
"type": "WebElement",
"var_name": "element"
},
{
"declarator": "locator",
"modifier": "@Mock\n private",
"original_stri... | {
"body": "@Test\n public void testInvalidConstructorHook() {\n List<HookDefinition<?>> hookDefinitions = new ArrayList<>();\n\n hookDefinitions.add(new HookDefinition<>(InvalidConstructorHook.class));\n\n Assertions\n .assertThatThrownBy(() -> hookChainBuilder.build(() -> eleme... | {
"fields": [
{
"declarator": "control",
"modifier": "private final",
"original_string": "private final FluentControl control;",
"type": "FluentControl",
"var_name": "control"
},
{
"declarator": "instantiator",
"modifier": "private final",
"original_string":... | {
"body": "@Override\n public List<FluentHook> build(Supplier<WebElement> elementSupplier, Supplier<ElementLocator> locator,\n Supplier<String> toStringSupplier, List<HookDefinition<?>> hooks) {\n List<FluentHook> chain = new ArrayList<>();\n\n Supplier<WebElement> currentSupplier = elemen... | {
"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_289 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/url/UrlTemplateTest.java",
"identifier": "UrlTemplateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseNotMatchingUrl() {\n UrlTemplate urlParametersTemplate = new UrlTemplate(\"/abc/{param1}/def/{param2}{?/param3}\");\n assertThat(getParameterNames(urlParametersTemplate)).containsExactly(\"param1\", \"param2\", \"param3\");\n assertThat(getParameterOptio... | {
"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_60 | {
"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 testHasTextContainingWithSpecialCharactersInElement() {\n String textWithStringFormatError = \"%A\";\n when(element.text()).thenReturn(textWithStringFormatError);\n elementAssert.hasTextContaining(textWithStringFormatError);\n }",
"class_method_signature": "... | {
"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 hasTextContaining(String text) {\n String actualText = actual.text();\n if (!actualText.contains(text)) {\n failWithMessage(\"The element does not contain the text: \" + text\n + \". Actual text found : \" + actualText);\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_620 | {
"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 shouldReturnFalseForSelectedIfNoSuchElement() {\n when(element.isSelected()).thenThrow(NoSuchElementException.class);\n assertThat(fluentElement.selected()).isFalse();\n }",
"class_method_signature": "FluentWebElementTest.shouldReturnFalseForSelectedIfNoSuchElement... | {
"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 selected() {\n boolean selected;\n try {\n selected = webElement.isSelected();\n } catch (NoSuchElementException e) {\n selected = false;\n }\n return selected;\n }",
"class_method_signature": "FluentWebElement.selected()",
"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_270 | {
"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 shouldReturnFalseIfFieldHasNoGenericTypeForListOfFluentWebElement() throws NoSuchFieldException {\n Field listWithoutGenericTypeField = getField(\"listWithoutGenericType\");\n\n assertThat(FluentElementInjectionSupportValidator.isListOfFluentWebElement(listWithoutGeneri... | {
"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_99 | {
"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 testHasSizeZeroInBuilder() {\n when(fluentList.count()).thenReturn(0);\n listAssert.hasSize().equalTo(0);\n }",
"class_method_signature": "FluentListAssertTest.testHasSizeZeroInBuilder()",
"constructor": false,
"full_signature": "@Test public void testHasSizeZe... | {
"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_76 | {
"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 hasPageSourceContainingOk() {\n String source = \"<html></html>\";\n doReturn(source).when(driver).getPageSource();\n pageAssert.hasPageSourceContaining(source);\n }",
"class_method_signature": "PageAssertTest.hasPageSourceContainingOk()",
"constructor": f... | {
"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_335 | {
"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 shouldSetHooksToNullWhenHookDefinitionsAreEmpty() {\n HookChainBuilder hookChainBuilder = mock(HookChainBuilder.class);\n\n locatorHandler.setHooks(hookChainBuilder, emptyList());\n\n assertThat(locatorHandler.hookChainBuilder).isNull();\n assertThat(locat... | {
"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_159 | {
"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 baseUrlNull() {\n assertThat(getConfiguration().getBaseUrl()).isNull();\n\n mockProperty(\"baseUrl\", null);\n assertThat(getConfiguration().getBaseUrl()).isNull();\n }",
"class_method_signature": "PropertiesBackendConfigurationTest.baseUrlNull()",
"constr... | {
"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_509 | {
"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 untilEachElements() {\n Supplier<? extends List<? extends FluentWebElement>> selector = mock(Supplier.class);\n\n wait.untilEachElements(selector);\n Mockito.verify(fluentControlWait).untilEachElements(selector);\n }",
"class_method_signature": "FluentWaitEl... | {
"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 untilEachElements(Supplier<? extends List<? extends FluentWebElement>> selector) {\n return controlWait.untilEachElements(selector);\n }",
"class_method_signature": "FluentWaitElement.untilEachElements(Supplier<? extends List<? extends FluentWebElement... | {
"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_227 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBaseUrlWithoutTrailingSlash() {\n String test = UrlUtils.concat(\"http://fluentlenium.com\", \"abc/def\");\n Assertions.assertThat(test).isEqualTo(\"http://fluentlenium.com/abc/def\");\n }",
"class_method_signature": "UrlUtilsTest.testBaseUrlWithoutTrailingSlas... | {
"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_362 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java",
"identifier": "StringConditionsImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnFalseForEqualToIgnoreCaseIfTargetStringIsNull() {\n StringConditions stringConditions = new StringConditionsImpl(null);\n\n assertThat(stringConditions.equalToIgnoreCase(\"magical\")).isFalse();\n }",
"class_method_signature": "StringConditionsImplTest.... | {
"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 equalToIgnoreCase(String anotherString) {\n return verify(input -> {\n if (input == null) {\n return false;\n }\n return input.equalsIgnoreCase(anotherString);\n });\n }",
"class_method_signature": "StringCondi... | {
"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_21 | {
"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 testIsSelectedOk() {\n when(element.present()).thenReturn(true);\n when(element.selected()).thenReturn(true);\n elementAssert.isSelected();\n }",
"class_method_signature": "FluentWebElementAssertTest.testIsSelectedOk()",
"constructor": false,
"full_signa... | {
"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 isSelected() {\n isPresentAndIs(() -> !actual.selected(), \"Element in assertion is present but not selected\");\n return this;\n }",
"class_method_signature": "FluentWebElementAssert.isSelected()",
"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_179 | {
"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 webDriver() {\n Assertions.assertThat(noConfiguration.getWebDriver()).isNull();\n Assertions.assertThat(defaultConfiguration.getWebDriver()).isNull();\n\n Assertions.assertThat(configuration.getWebDriver()).isEqualTo(\"firefox\");\n }",
"class_method_signatu... | {
"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 String getWebDriver() {\n return getConfig(() -> getStringValue(configuration.webDriver()));\n }",
"class_method_signature": "AnnotationConfiguration.getWebDriver()",
"constructor": false,
"full_signature": "@Override public String getWebDriver()",
"identifier": "get... | {
"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_483 | {
"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 explicitlyFor() {\n long amount = 10;\n TimeUnit timeUnit = TimeUnit.MILLISECONDS;\n\n wait.explicitlyFor(amount, timeUnit);\n Mockito.verify(fluentControlWait).explicitlyFor(amount, timeUnit);\n }",
"class_method_signature": "FluentWaitElementListTes... | {
"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 explicitlyFor(long amount, TimeUnit timeUnit) {\n controlWait.explicitlyFor(amount, timeUnit);\n return this;\n }",
"class_method_signature": "FluentWaitElementList.explicitlyFor(long amount, TimeUnit timeUnit)",
"constructor": false,
"full... | {
"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_529 | {
"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 testClickFluentWebElement() {\n when(fluentWebElement.getElement()).thenReturn(element);\n\n MouseElementActions actions = new MouseElementActions(driver, fluentWebElement);\n actions.click();\n\n verify(mouse).mouseMove(coordinates);\n verify(mouse... | {
"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_196 | {
"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 scriptTimeout() {\n Assertions.assertThat(noConfiguration.getScriptTimeout()).isNull();\n Assertions.assertThat(defaultConfiguration.getScriptTimeout()).isNull();\n\n Assertions.assertThat(configuration.getScriptTimeout()).isEqualTo(3000L);\n }",
"class_meth... | {
"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 Long getScriptTimeout() {\n return getConfig(() -> getLongValue(configuration.scriptTimeout()));\n }",
"class_method_signature": "AnnotationConfiguration.getScriptTimeout()",
"constructor": false,
"full_signature": "@Override public Long getScriptTimeout()",
"identif... | {
"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_56 | {
"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 testHasNotTextPositive() {\n when(element.text()).thenReturn(\"Something\");\n elementAssert.hasNotText(\"Text which isn't above\");\n }",
"class_method_signature": "FluentWebElementAssertTest.testHasNotTextPositive()",
"constructor": false,
"full_signature": "... | {
"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_315 | {
"fields": [
{
"declarator": "wait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait wait;",
"type": "FluentWait",
"var_name": "wait"
},
{
"declarator": "waitHookOptions",
"modifier": "private",
"original_string": "privat... | {
"body": "@Test\n public void testDefaultValuesConfigureAwait() {\n waitHookOptions.configureAwait(wait);\n\n Mockito.verify(wait, never()).atMost(any(Integer.class));\n Mockito.verify(wait, never()).atMost(any(Integer.class), any(TimeUnit.class));\n Mockito.verify(wait, never()).polli... | {
"fields": [
{
"declarator": "timeUnit",
"modifier": "private",
"original_string": "private TimeUnit timeUnit;",
"type": "TimeUnit",
"var_name": "timeUnit"
},
{
"declarator": "atMost",
"modifier": "private",
"original_string": "private Long atMost;",
... | {
"body": "protected FluentWait configureAwait(FluentWait await) {\n if (atMost != null) {\n await.atMost(atMost, timeUnit);\n }\n\n if (pollingEvery != null) {\n await.pollingEvery(pollingEvery, pollingTimeUnit);\n }\n\n if (withNoDefaultsException) {\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_600 | {
"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 testConditions() {\n when(element.isEnabled()).thenReturn(true);\n assertThat(fluentElement.conditions().enabled()).isTrue();\n }",
"class_method_signature": "FluentWebElementTest.testConditions()",
"constructor": false,
"full_signature": "@Test public void tes... | {
"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 FluentConditions conditions() {\n return conditions;\n }",
"class_method_signature": "FluentWebElement.conditions()",
"constructor": false,
"full_signature": "public FluentConditions conditions()",
"identifier": "conditions",
"invocations": [],
"modifiers": "public",
"paramet... | {
"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_250 | {
"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 shouldInjectXpathField() throws NoSuchFieldException {\n Field xpathField = this.getClass().getDeclaredField(\"xpath\");\n InjectionAnnotations annotations = new InjectionAnnotations(xpathField, null);\n By by = annotations.buildBy();\n assertThat(by).isIn... | {
"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_591 | {
"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 shouldReturnOptionalIfListIsPresent() {\n assertThat(list.optional()).hasValue(list);\n }",
"class_method_signature": "FluentListImplTest.shouldReturnOptionalIfListIsPresent()",
"constructor": false,
"full_signature": "@Test public void shouldReturnOptionalIfListIsPre... | {
"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 Optional<FluentList<E>> optional() {\n if (present()) {\n return Optional.of(this);\n } else {\n return Optional.empty();\n }\n }",
"class_method_signature": "FluentListImpl.optional()",
"constructor": false,
"full_signature": "@Over... | {
"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_342 | {
"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 shouldReturnLocatorSpecificDefaultToStringIfElementToStringIsNull() {\n ElementLocator elementLocator = mock(ElementLocator.class, withSettings().extraInterfaces(WrapsElement.class));\n TestLocatorHandler handler = new TestLocatorHandler(elementLocator);\n\n asse... | {
"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_207 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private",
"original_string": "private ProgrammaticConfiguration configuration;",
"type": "ProgrammaticConfiguration",
"var_name": "configuration"
},
{
"declarator": "configurationProperties1",
"modifier":... | {
"body": "@Test\n public void browserTimeout() {\n testImpl(ConfigurationProperties::getBrowserTimeout, input -> {\n composed.setBrowserTimeout(input);\n return null;\n }, null, 10L, 0L);\n }",
"class_method_signature": "ComposedConfigurationTest.browserTimeout()",
"cons... | {
"fields": [
{
"declarator": "configurations",
"modifier": "private final",
"original_string": "private final ConfigurationProperties[] configurations;",
"type": "ConfigurationProperties[]",
"var_name": "configurations"
},
{
"declarator": "writableConfiguration",
... | {
"body": "@Override\n public void setBrowserTimeout(Long timeout) {\n getWritableConfiguration().setBrowserTimeout(timeout);\n }",
"class_method_signature": "ComposedConfiguration.setBrowserTimeout(Long timeout)",
"constructor": false,
"full_signature": "@Override public void setBrowserTimeout(Lon... | {
"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_657 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/adapter/DefaultSharedMutatorTest.java",
"identifier": "DefaultSharedMutatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDefaultMutator() {\n DefaultSharedMutator sharedMutator = new DefaultSharedMutator();\n\n Class<?> testClass = Object.class;\n String testName = \"test\";\n DriverLifecycle driverLifecycle = DriverLifecycle.METHOD;\n\n SharedMutator.EffectivePar... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/adapter/DefaultSharedMutator.java",
"identifier": "DefaultSharedMutator",
"interfaces": "implements SharedMutator",
"methods": [
{
"class_method_signature": "DefaultSharedMutator.getEffectiveParameters(Class<T> testClass, Stri... | {
"body": "@Override\n public <T> EffectiveParameters<T> getEffectiveParameters(Class<T> testClass, String testName,\n DriverLifecycle driverLifecycle) {\n return new EffectiveParameters<>(testClass, testName, driverLifecycle);\n }",
"class_method_signature": "DefaultSharedMutator.getEffecti... | {
"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_138 | {
"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 shouldHaveAttribute() {\n when(fluentList.attributes(\"name\")).thenReturn(Lists.newArrayList(\"name-one\", \"name-two\"));\n listAssert.hasAttribute(\"name\");\n }",
"class_method_signature": "FluentListAssertTest.shouldHaveAttribute()",
"constructor": false,
... | {
"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_568 | {
"fields": [
{
"declarator": "CSS_TEXT = \"some: css\"",
"modifier": "private static final",
"original_string": "private static final String CSS_TEXT = \"some: css\";",
"type": "String",
"var_name": "CSS_TEXT"
},
{
"declarator": "javascriptControl",
"modifier": "... | {
"body": "@Test\n public void shouldThrowWebDriverExceptionAfterReachingMaxRetryCount() {\n when(javascriptControl.executeScript(startsWith(\"cssText = \\\"some: css\\\";\"))).thenThrow(WebDriverException.class);\n\n assertThatThrownBy(() -> cssSupport.inject(CSS_TEXT)).isInstanceOf(WebDriverExcepti... | {
"fields": [
{
"declarator": "INJECTOR_JS_PATH = \"/org/fluentlenium/core/css/injector.js\"",
"modifier": "private static final",
"original_string": "private static final String INJECTOR_JS_PATH = \"/org/fluentlenium/core/css/injector.js\";",
"type": "String",
"var_name": "INJECTOR_... | {
"body": "@Override\n public void inject(String cssText) {\n cssText = cssText.replace(\"\\r\\n\", \"\").replace(\"\\n\", \"\");\n cssText = StringEscapeUtils.escapeEcmaScript(cssText);\n executeScriptRetry(\"cssText = \\\"\" + cssText + \"\\\";\\n\" + getContentOf(INJECTOR_JS_PATH));\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_587 | {
"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 shouldDoClear() {\n when(element2.enabled()).thenReturn(true);\n when(element3.enabled()).thenReturn(true);\n\n list.clear();\n\n verify(element1, never()).clear();\n verify(element2).clear();\n verify(element3).clear();\n\n assertThat... | {
"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 clear() {\n clearAll();\n }",
"class_method_signature": "FluentListImpl.clear()",
"constructor": false,
"full_signature": "@Override public void clear()",
"identifier": "clear",
"invocations": [
"clearAll"
],
"modifiers": "@Override public",
"paramet... | {
"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_17 | {
"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 testIsNotDisplayed() {\n when(element.present()).thenReturn(true);\n when(element.displayed()).thenReturn(false);\n elementAssert.isNotDisplayed();\n }",
"class_method_signature": "FluentWebElementAssertTest.testIsNotDisplayed()",
"constructor": false,
"... | {
"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 isNotDisplayed() {\n isPresentAndIs(() -> actual.displayed(), \"Element in assertion is present but displayed\");\n return this;\n }",
"class_method_signature": "FluentWebElementAssert.isNotDisplayed()",
"constructor": false,
"full_signatu... | {
"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_354 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java",
"identifier": "StringConditionsImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnTrueIfEndsWithString() {\n StringConditions stringConditions = new StringConditionsImpl(\"Some magical text.\");\n\n assertThat(stringConditions.endsWith(\"text.\")).isTrue();\n }",
"class_method_signature": "StringConditionsImplTest.shouldReturnTrueIfE... | {
"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_641 | {
"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 findByPosition() {\n String name = \"cssStyle\";\n WebElement webElement1 = mock(WebElement.class);\n WebElement webElement2 = mock(WebElement.class);\n when(webElement2.getTagName()).thenReturn(\"a\");\n List<WebElement> webElements = new ArrayList... | {
"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_211 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private",
"original_string": "private ProgrammaticConfiguration configuration;",
"type": "ProgrammaticConfiguration",
"var_name": "configuration"
},
{
"declarator": "configurationProperties1",
"modifier":... | {
"body": "@Test\n public void implicitlyWait() {\n testImpl(ConfigurationProperties::getImplicitlyWait, input -> {\n composed.setImplicitlyWait(input);\n return null;\n }, null, 1000L, 2000L);\n }",
"class_method_signature": "ComposedConfigurationTest.implicitlyWait()",
... | {
"fields": [
{
"declarator": "configurations",
"modifier": "private final",
"original_string": "private final ConfigurationProperties[] configurations;",
"type": "ConfigurationProperties[]",
"var_name": "configurations"
},
{
"declarator": "writableConfiguration",
... | {
"body": "@Override\n public void setImplicitlyWait(Long implicitlyWait) {\n getWritableConfiguration().setImplicitlyWait(implicitlyWait);\n }",
"class_method_signature": "ComposedConfiguration.setImplicitlyWait(Long implicitlyWait)",
"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_495 | {
"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 pollingEveryDuration() {\n assertThat(wait.pollingEvery(Duration.ofMillis(10))).isSameAs(wait);\n Mockito.verify(fluentControlWait).pollingEvery(Duration.ofMillis(10));\n }",
"class_method_signature": "FluentWaitElementTest.pollingEveryDuration()",
"constructor":... | {
"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_180 | {
"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 remoteUrl() {\n Assertions.assertThat(noConfiguration.getRemoteUrl()).isNull();\n Assertions.assertThat(defaultConfiguration.getRemoteUrl()).isNull();\n\n Assertions.assertThat(configuration.getRemoteUrl()).isEqualTo(\"http://localhost:4444\");\n }",
"class_... | {
"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 String getRemoteUrl() {\n return getConfig(() -> getStringValue(configuration.remoteUrl()));\n }",
"class_method_signature": "AnnotationConfiguration.getRemoteUrl()",
"constructor": false,
"full_signature": "@Override public String getRemoteUrl()",
"identifier": "get... | {
"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_303 | {
"fields": [
{
"declarator": "htmlUnitPerformanceTiming",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private PerformanceTiming htmlUnitPerformanceTiming;",
"type": "PerformanceTiming",
"var_name": "htmlUnitPerformanceTiming"
},
{
"declarator": "me... | {
"body": "@Test\n public void shouldDelegateCallToHtmlUnitImplementation() {\n assertThat(metrics.getUnloadEventStart()).isEqualTo(43500L);\n verify(htmlUnitPerformanceTiming, times(1)).getUnloadEventStart();\n }",
"class_method_signature": "HtmlUnitPerformanceTimingMetricsTest.shouldDelegateCa... | {
"fields": [
{
"declarator": "timing",
"modifier": "private final",
"original_string": "private final PerformanceTiming timing;",
"type": "PerformanceTiming",
"var_name": "timing"
},
{
"declarator": "targetTimeUnit",
"modifier": "private final",
"original_s... | {
"body": "@Override\n public long getUnloadEventStart() {\n return getEventValue(timing::getUnloadEventStart);\n }",
"class_method_signature": "HtmlUnitPerformanceTimingMetrics.getUnloadEventStart()",
"constructor": false,
"full_signature": "@Override public long getUnloadEventStart()",
"identif... | {
"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_40 | {
"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 testHasClassOk() {\n when(element.attribute(\"class\")).thenReturn(\"some-class\");\n elementAssert.hasClass(\"some-class\");\n }",
"class_method_signature": "FluentWebElementAssertTest.testHasClassOk()",
"constructor": false,
"full_signature": "@Test public vo... | {
"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_246 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/inject/LabelAnnotationsTest.java",
"identifier": "LabelAnnotationsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldNotSetLabelIfLabelAnnotationIsNotPresent() throws NoSuchFieldException {\n LabelAnnotations labelAnnotations = createLabelAnnotationsForField(\"fieldWithoutLabel\");\n\n assertThat(labelAnnotations.getLabel()).isNull();\n }",
"class_method_signature": "LabelA... | {
"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": "@Override\n public String getLabel() {\n return label;\n }",
"class_method_signature": "LabelAnnotations.getLabel()",
"constructor": false,
"full_signature": "@Override public String getLabel()",
"identifier": "getLabel",
"invocations": [],
"modifiers": "@Override public",
"param... | {
"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_616 | {
"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 shouldReturnFalseForDisplayedIfNoSuchElement() {\n when(element.isDisplayed()).thenThrow(NoSuchElementException.class);\n assertThat(fluentElement.displayed()).isFalse();\n }",
"class_method_signature": "FluentWebElementTest.shouldReturnFalseForDisplayedIfNoSuchEle... | {
"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 displayed() {\n boolean displayed;\n try {\n displayed = webElement.isDisplayed();\n } catch (NoSuchElementException e) {\n displayed = false;\n }\n return displayed;\n }",
"class_method_signature": "FluentWebElement.displayed()",... | {
"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_401 | {
"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 shouldGetCSSFilterWithNonEmptyMatcherSymbol() {\n AbstractMatcher matcher = new ContainsWordMatcher(A_VALUE);\n AttributeFilter attributeFilter = new AttributeFilter(\"id\", matcher);\n\n String cssFilter = \"[id~=\\\"value\\\"]\";\n\n assertThat(attribute... | {
"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_544 | {
"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 testContextClick() {\n MouseActions actions = new MouseActions(driver);\n actions.contextClick();\n\n verify(mouse, never()).mouseMove(any(Coordinates.class));\n verify(mouse).contextClick(any());\n }",
"class_method_signature": "MouseActionsTest.test... | {
"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 contextClick() {\n actions().contextClick().perform();\n return this;\n }",
"class_method_signature": "MouseActions.contextClick()",
"constructor": false,
"full_signature": "public MouseActions contextClick()",
"identifier": "contextClick",
"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_114 | {
"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 testHasValueKo() {\n when(fluentList.values()).thenReturn(Lists.newArrayList(\"1\", \"2\", \"3\"));\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasValue(\"4\"))\n .hasMessage(\"No selected elements have value: 4. Actual values found : [1, 2, 3]\... | {
"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 hasValue(String value) {\n List<String> actualValues = requiresNonEmpty(actual.values());\n if (!actualValues.contains(value)) {\n failWithMessage(\"No selected elements have value: \" + value\n + \". Actual values found : \... | {
"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_397 | {
"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 textAttributeShouldNotSatisfyMatcher() {\n setupPredicateAndMatcher(\"text attribute value\");\n when(attributeFilter.getAttribute()).thenReturn(\"text\");\n when(fluentWebElement.text()).thenReturn(\"text attribute\");\n\n assertThat(attributeFilterPredic... | {
"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_378 | {
"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 hasId() {\n assertThat(conditions.id(\"value\")).isFalse();\n\n when(webElement.getAttribute(\"id\")).thenReturn(\"value\");\n\n assertThat(conditions.id(\"value\")).isTrue();\n }",
"class_method_signature": "WebElementConditionsTest.hasId()",
"constructor... | {
"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 id() {\n return new StringConditionsImpl(object.id(), negation);\n }",
"class_method_signature": "WebElementConditions.id()",
"constructor": false,
"full_signature": "@Override public StringConditions id()",
"identifier": "id",
"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_456 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/StartsWithMatcherTest.java",
"identifier": "StartsWithMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldStartWithPattern() {\n StartsWithMatcher matcher = new StartsWithMatcher(Pattern.compile(\"^some val\"));\n\n assertThat(matcher.isSatisfiedBy(\"some value\")).isTrue();\n }",
"class_method_signature": "StartsWithMatcherTest.shouldStartWithPattern()",
"cons... | {
"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_143 | {
"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 capabilities() {\n DesiredCapabilities capabilitiesJSEnabled = new DesiredCapabilities();\n capabilitiesJSEnabled.setJavascriptEnabled(true);\n\n Capabilities capabilities = retriever.getCapabilitiesProperty(\"{\\\"javascriptEnabled\\\": true}\", null);\n\n ... | {
"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_513 | {
"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 explicitlyFor() {\n long amount = 10;\n TimeUnit timeUnit = TimeUnit.MILLISECONDS;\n\n wait.explicitlyFor(amount, timeUnit);\n Mockito.verify(fluentControlWait).explicitlyFor(amount, timeUnit);\n }",
"class_method_signature": "FluentWaitElementTest.ex... | {
"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 explicitlyFor(long amount, TimeUnit timeUnit) {\n controlWait.explicitlyFor(amount, timeUnit);\n return this;\n }",
"class_method_signature": "FluentWaitElement.explicitlyFor(long amount, TimeUnit timeUnit)",
"constructor": false,
"full_signatu... | {
"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_83 | {
"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 testHasTextNotPresent() {\n doThrow(new NoAlertPresentException()).when(alert).getText();\n assertThatThrownBy(() -> alertAssert.hasText(\"some text\"))\n .isInstanceOf(AssertionError.class)\n .hasMessage(\"There is no alert box\");\n }"... | {
"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_285 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/url/UrlTemplateTest.java",
"identifier": "UrlTemplateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseOptionalPathMiddleParameter() {\n UrlTemplate urlParametersTemplate = new UrlTemplate(\"/abc/{param1}{?/def/param2}{/ghi/param3}\");\n assertThat(getParameterNames(urlParametersTemplate)).containsExactly(\"param1\", \"param2\", \"param3\");\n assertThat(... | {
"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_440 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/CalculateServiceTest.java",
"identifier": "CalculateServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void checkSimpleContainsNok() {\n assertThat(CalculateService.contains(null, \"toto\", \"ecole\")).isFalse();\n }",
"class_method_signature": "CalculateServiceTest.checkSimpleContainsNok()",
"constructor": false,
"full_signature": "@Test public void checkSimpleContainsNok(... | {
"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_505 | {
"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 untilElements() {\n List<? extends FluentWebElement> elements = mock(List.class);\n\n wait.until(elements);\n Mockito.verify(fluentControlWait).until(elements);\n }",
"class_method_signature": "FluentWaitElementTest.untilElements()",
"constructor": false,
... | {
"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_155 | {
"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 remoteUrl() {\n assertThat(getConfiguration().getRemoteUrl()).isNull();\n\n mockProperty(\"remoteUrl\", \"http://localhost:4444\");\n assertThat(getConfiguration().getRemoteUrl()).isEqualTo(\"http://localhost:4444\");\n }",
"class_method_signature": "Propert... | {
"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 getRemoteUrl() {\n return getStringProperty(\"remoteUrl\");\n }",
"class_method_signature": "PropertiesBackendConfiguration.getRemoteUrl()",
"constructor": false,
"full_signature": "@Override public String getRemoteUrl()",
"identifier": "getRemoteUrl",
"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_95 | {
"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 testHasNotTextContainingKo() {\n when(fluentList.texts()).thenReturn(Lists.newArrayList(\"some text\", \"other text to contain\"));\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasNotTextContaining(\"other text\"))\n .hasMessage(\"At least one select... | {
"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_339 | {
"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 shouldReturnFalseInCaseOfTimeoutException() {\n TestLocatorHandler handler = spy(new TestLocatorHandler(mock(ElementLocator.class)));\n\n doThrow(TimeoutException.class).when(handler).now();\n\n assertThat(handler.present()).isFalse();\n }",
"class_method_si... | {
"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 present() {\n try {\n now();\n } catch (TimeoutException | NoSuchElementException | StaleElementReferenceException e) {\n return false;\n }\n return loaded() && !isStale();\n }",
"class_method_signature": "AbstractLocatorH... | {
"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.