openvidu-test-e2e: Ignore videoDimensions event in filter event test.

pull/732/head
cruizba 2022-06-02 00:48:12 +02:00
parent 8b27191378
commit 206a44d881
1 changed files with 12 additions and 8 deletions

View File

@ -1009,14 +1009,18 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
// Filter // Filter
final CountDownLatch latch3 = new CountDownLatch(2); final CountDownLatch latch3 = new CountDownLatch(2);
user.getEventManager().on("streamPropertyChanged", (event) -> { user.getEventManager().on("streamPropertyChanged", (event) -> {
threadAssertions.add("filter".equals(event.get("changedProperty").getAsString())); // As chrome may change video dimensions, ignore video dimensions event
threadAssertions.add("applyFilter".equals(event.get("reason").getAsString())); if (!"videoDimensions".equals(event.get("changedProperty").getAsString())) {
threadAssertions.add(!event.has("oldValue")); threadAssertions.add("filter".equals(event.get("changedProperty").getAsString()));
JsonObject newValue = event.get("newValue").getAsJsonObject(); threadAssertions.add("applyFilter".equals(event.get("reason").getAsString()));
threadAssertions.add("GStreamerFilter".equals(newValue.get("type").getAsString())); threadAssertions.add(!event.has("oldValue"));
JsonObject options = newValue.get("options").getAsJsonObject(); JsonObject newValue = event.get("newValue").getAsJsonObject();
threadAssertions.add("videobalance saturation=0.0".equals(options.get("command").getAsString())); threadAssertions.add("GStreamerFilter".equals(newValue.get("type").getAsString()));
latch3.countDown(); JsonObject options = newValue.get("options").getAsJsonObject();
threadAssertions.add("videobalance saturation=0.0".equals(options.get("command").getAsString()));
latch3.countDown();
}
}); });
user.getDriver().findElement(By.cssSelector("#openvidu-instance-0 .filter-btn")).click(); user.getDriver().findElement(By.cssSelector("#openvidu-instance-0 .filter-btn")).click();
Thread.sleep(1000); Thread.sleep(1000);