Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/checkstyle/appium-style.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<message key="ws.notPreceded"
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
</module>
<module name="SingleSpaceSeparator"/>
<module name="OneStatementPerLine"/>
<module name="MultipleVariableDeclarations"/>
<module name="ArrayTypeStyle"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public class AndroidMobileCommandHelper extends MobileCommand {
return Map.entry(GET_PERFORMANCE_DATA, Map.of(
"packageName", packageName,
"dataType", dataType,
"dataReadTimeout", dataReadTimeout
"dataReadTimeout", dataReadTimeout
));
}

Expand Down Expand Up @@ -201,7 +201,7 @@ public class AndroidMobileCommandHelper extends MobileCommand {
* @return a key-value pair. The key is the command name. The value is a {@link Map} command arguments.
*/
@Deprecated
public static Map.Entry<String, Map<String, ?>> replaceElementValueCommand(
public static Map.Entry<String, Map<String, ?>> replaceElementValueCommand(
RemoteWebElement remoteWebElement, String value) {
return Map.entry(REPLACE_VALUE, Map.of(
"id", remoteWebElement.getId(),
Expand Down Expand Up @@ -241,7 +241,7 @@ public class AndroidMobileCommandHelper extends MobileCommand {
String phoneNumber, GsmCallActions gsmCallActions) {
return Map.entry(GSM_CALL, Map.of(
"phoneNumber", phoneNumber,
"action", gsmCallActions.name().toLowerCase()
"action", gsmCallActions.name().toLowerCase()
));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ default void sendSMS(String phoneNumber, String message) {
// TODO: Remove the fallback
CommandExecutionHelper.execute(
markExtensionAbsence(extName),
Map.entry(SEND_SMS, Map.of(
Map.entry(SEND_SMS, Map.of(
"phoneNumber", phoneNumber,
"message", message
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ default ConnectionState getConnection() {
return new ConnectionState(
((boolean) result.get("wifi") ? ConnectionState.WIFI_MASK : 0)
| ((boolean) result.get("data") ? ConnectionState.DATA_MASK : 0)
| ((boolean) result.get("airplaneMode") ? ConnectionState.AIRPLANE_MODE_MASK : 0)
| ((boolean) result.get("airplaneMode") ? ConnectionState.AIRPLANE_MODE_MASK : 0)
);
} catch (UnsupportedCommandException e) {
// TODO: Remove the fallback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @param <T> The return type
*/
@FunctionalInterface
public interface AppiumFunction<F, T> extends Function<F, T>, java.util.function.Function<F, T> {
public interface AppiumFunction<F, T> extends Function<F, T>, java.util.function.Function<F, T> {

@Override default <V> AppiumFunction<V, T> compose(java.util.function.Function<? super V, ? extends F> before) {
Objects.requireNonNull(before);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ default T setCommandTimeouts(Duration timeout) {
default Optional<Either<CommandTimeouts, Duration>> getCommandTimeouts() {
return Optional.ofNullable(getCapability(COMMAND_TIMEOUTS_OPTION))
.map(String::valueOf)
.map(v -> v.trim().startsWith("{")
.map(v -> v.trim().startsWith("{")
? Either.left(new CommandTimeouts(v))
: Either.right(toDuration(v))
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class ServerEvents {
public final List<TimedEvent> events;
public final String jsonData;

public void save(Path output) throws IOException {
public void save(Path output) throws IOException {
Files.write(output, this.jsonData.getBytes());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public void setup() {
startActivity(".ApiDemos");
}

@Test public void findByAccessibilityIdTest() {
@Test public void findByAccessibilityIdTest() {
assertNotEquals(driver.findElement(AppiumBy.accessibilityId("Graphics")).getText(), null);
assertEquals(driver.findElements(AppiumBy.accessibilityId("Graphics")).size(), 1);
}

@Test public void findByAndroidUIAutomatorTest() {
@Test public void findByAndroidUIAutomatorTest() {
assertNotEquals(driver
.findElement(AppiumBy
.androidUIAutomator("new UiSelector().clickable(true)")).getText(), null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private static long getPerformanceDiff(long expectedMs, Runnable runnable) {
long startMark = currentTimeMillis();
runnable.run();
long endMark = currentTimeMillis();
return abs(expectedMs - (endMark - startMark));
return abs(expectedMs - (endMark - startMark));
}

private static String assertionMessage(Duration expectedDuration) {
Expand Down