openvidu-test-e2e: fix

pull/600/head
pabloFuente 2020-09-07 21:39:22 +02:00
parent f77644f213
commit 2fae62d6a2
1 changed files with 12 additions and 3 deletions

View File

@ -346,11 +346,20 @@ public class OpenViduTestAppE2eTest {
final int numberOfVideos = user.getDriver().findElements(By.tagName("video")).size();
Assert.assertEquals("Expected 4 videos but found " + numberOfVideos, 4, numberOfVideos);
Assert.assertTrue("Videos were expected to only have video tracks", user.getEventManager().assertMediaTracks(
user.getDriver().findElements(By.cssSelector("#openvidu-instance-0 video")), false, true));
// TODO: subscriber should also have only video track
// Assert.assertTrue("Videos were expected to only have video tracks", user.getEventManager().assertMediaTracks(user.getDriver().findElements(By.tagName("video")), false, true));
Assert.assertTrue("Videos were expected to only have video tracks",
user.getEventManager().assertMediaTracks(
user.getDriver().findElements(By.cssSelector("#openvidu-instance-0 video")).subList(0, 1),
false, true));
Assert.assertTrue("Videos were expected to only have video track",
user.getEventManager().assertMediaTracks(
user.getDriver().findElements(By.cssSelector("#openvidu-instance-1 video")).subList(0, 1),
false, true));
Assert.assertTrue("Videos were expected to have only a video track", user.getEventManager().assertMediaTracks(
user.getDriver().findElements(By.cssSelector("#openvidu-instance-1 video")), true, true));
user.getDriver().findElements(By.cssSelector("#openvidu-instance-0 video")).subList(1, 2), true, true));
Assert.assertTrue("Videos were expected to have only a video track", user.getEventManager().assertMediaTracks(
user.getDriver().findElements(By.cssSelector("#openvidu-instance-1 video")).subList(1, 2), true, true));
gracefullyLeaveParticipants(2);
}