Skip to content

Commit d1711b9

Browse files
Fix styling errors
1 parent efd5bea commit d1711b9

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

src/e2eFlutterTest/java/io/appium/java_client/android/FinderTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void testFlutterSemanticsLabel() {
5454
}
5555

5656
@Test
57-
void testFlutterDescendant() {
57+
void testFlutterDescendant() {
5858
WebElement loginButton = driver.findElement(BaseFlutterTest.LOGIN_BUTTON);
5959
loginButton.click();
6060
openScreen("Nested Scroll");
@@ -63,13 +63,13 @@ void testFlutterDescendant() {
6363
AppiumBy.flutterKey("parent_card_1"),
6464
AppiumBy.flutterText("Child 2")
6565
);
66-
WebElement childElement = driver.findElement(descendantBy);
66+
WebElement childElement = driver.findElement(descendantBy);
6767
assertEquals("Child 2",
6868
childElement.getText());
6969
}
7070

7171
@Test
72-
void testFlutterAncestor() {
72+
void testFlutterAncestor() {
7373
WebElement loginButton = driver.findElement(BaseFlutterTest.LOGIN_BUTTON);
7474
loginButton.click();
7575
openScreen("Nested Scroll");
@@ -78,7 +78,7 @@ void testFlutterAncestor() {
7878
AppiumBy.flutterText("Child 2"),
7979
AppiumBy.flutterKey("parent_card_1")
8080
);
81-
WebElement parentElement = driver.findElement(ancestorBy);
81+
WebElement parentElement = driver.findElement(ancestorBy);
8282
assertTrue(parentElement.isDisplayed());
8383
}
8484
}

src/main/java/io/appium/java_client/AppiumBy.java

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ public static By custom(final String selector) {
172172
* as for OpenCV library.
173173
* @return an instance of {@link ByImage}
174174
* @see <a href="https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/image-comparison.md">
175-
* The documentation on Image Comparison Features</a>
175+
* The documentation on Image Comparison Features</a>
176176
* @see <a href="https://github.com/appium/appium-base-driver/blob/master/lib/basedriver/device-settings.js">
177-
* The settings available for lookup fine-tuning</a>
177+
* The settings available for lookup fine-tuning</a>
178178
* @since Appium 1.8.2
179179
*/
180180
public static By image(final String b64Template) {
@@ -262,7 +262,11 @@ public static FlutterBy flutterSemanticsLabel(final String semanticsLabel) {
262262
* @param skipOffstage determines whether to skip offstage widgets
263263
* @return an instance of {@link AppiumBy.ByFlutterDescendant}
264264
*/
265-
public static FlutterBy flutterDescendant(final FlutterBy of, final FlutterBy matching, boolean matchRoot, boolean skipOffstage) {
265+
public static FlutterBy flutterDescendant(
266+
final FlutterBy of,
267+
final FlutterBy matching,
268+
boolean matchRoot,
269+
boolean skipOffstage) {
266270
return new ByFlutterDescendant(of, matching, matchRoot, skipOffstage);
267271
}
268272

@@ -381,7 +385,12 @@ protected FlutterBy(String selector, String locatorString, String locatorName) {
381385
public abstract static class FlutterByHierarchy extends FlutterBy {
382386
private static final Gson GSON = new Gson();
383387

384-
protected FlutterByHierarchy(String selector, FlutterBy of, FlutterBy matching, Map<String, Object> properties, String locatorName) {
388+
protected FlutterByHierarchy(
389+
String selector,
390+
FlutterBy of,
391+
FlutterBy matching,
392+
Map<String, Object> properties,
393+
String locatorName) {
385394
super(selector, formatLocator(of, matching, properties), locatorName);
386395
}
387396

@@ -431,13 +440,21 @@ protected ByFlutterTextContaining(String locatorString) {
431440

432441
public static class ByFlutterDescendant extends FlutterByHierarchy implements Serializable {
433442
protected ByFlutterDescendant(FlutterBy of, FlutterBy matching, boolean matchRoot, boolean skipOffstage) {
434-
super("-flutter descendant", of, matching, Map.of("matchRoot", matchRoot, "skipOffstage", skipOffstage), "flutterDescendant");
443+
super(
444+
"-flutter descendant",
445+
of,
446+
matching,
447+
Map.of("matchRoot", matchRoot, "skipOffstage", skipOffstage), "flutterDescendant");
435448
}
436449
}
437450

438451
public static class ByFlutterAncestor extends FlutterByHierarchy implements Serializable {
439452
protected ByFlutterAncestor(FlutterBy of, FlutterBy matching, boolean matchRoot) {
440-
super("-flutter ancestor", of, matching, Map.of("matchRoot", matchRoot), "flutterAncestor");
453+
super(
454+
"-flutter ancestor",
455+
of,
456+
matching,
457+
Map.of("matchRoot", matchRoot), "flutterAncestor");
441458
}
442459
}
443460
}

0 commit comments

Comments
 (0)