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
final CountDownLatch latch3 = new CountDownLatch(2);
user.getEventManager().on("streamPropertyChanged", (event) -> {
threadAssertions.add("filter".equals(event.get("changedProperty").getAsString()));
threadAssertions.add("applyFilter".equals(event.get("reason").getAsString()));
threadAssertions.add(!event.has("oldValue"));
JsonObject newValue = event.get("newValue").getAsJsonObject();
threadAssertions.add("GStreamerFilter".equals(newValue.get("type").getAsString()));
JsonObject options = newValue.get("options").getAsJsonObject();
threadAssertions.add("videobalance saturation=0.0".equals(options.get("command").getAsString()));
latch3.countDown();
// As chrome may change video dimensions, ignore video dimensions event
if (!"videoDimensions".equals(event.get("changedProperty").getAsString())) {
threadAssertions.add("filter".equals(event.get("changedProperty").getAsString()));
threadAssertions.add("applyFilter".equals(event.get("reason").getAsString()));
threadAssertions.add(!event.has("oldValue"));
JsonObject newValue = event.get("newValue").getAsJsonObject();
threadAssertions.add("GStreamerFilter".equals(newValue.get("type").getAsString()));
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();
Thread.sleep(1000);