Skip to content

Commit

Permalink
test: Reenable BiDi logging tests for iOS (#2254)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach authored Jan 7, 2025
1 parent 3a149c9 commit 39ee841
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/e2eIosTest/java/io/appium/java_client/ios/IOSBiDiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package io.appium.java_client.ios;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.bidi.Event;
import org.openqa.selenium.bidi.log.LogEntry;
import org.openqa.selenium.bidi.module.LogInspector;

Expand All @@ -29,8 +29,23 @@
public class IOSBiDiTest extends AppIOSTest {

@Test
@Disabled("Need to resolve compatibility issues")
public void listenForIosLogs() {
public void listenForIosLogsGeneric() {
var logs = new CopyOnWriteArrayList<>();
var listenerId = driver.getBiDi().addListener(
NATIVE_CONTEXT,
new Event<Object>("log.entryAdded", m -> m),
logs::add
);
try {
driver.getPageSource();
} finally {
driver.getBiDi().removeListener(listenerId);
}
assertFalse(logs.isEmpty());
}

@Test
public void listenForIosLogsSpecific() {
var logs = new CopyOnWriteArrayList<LogEntry>();
try (var logInspector = new LogInspector(NATIVE_CONTEXT, driver)) {
logInspector.onLog(logs::add);
Expand Down

0 comments on commit 39ee841

Please sign in to comment.