openvidu-test-e2e: Support MEDIA_SERVER_PREFERRED and NONE as test codecs

Because this test is always run only for Kurento and Chrome, we know
what to select here in each case.
This commit is contained in:
Juan Navarro 2021-12-27 17:11:28 +01:00
parent 727a872d9f
commit bfa2ad8c65

View File

@ -4673,6 +4673,20 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
// Check browser codecs
VideoCodec codecToCheck = (codec != null) ? codec : defaultForcedVideoCodec;
// Validate the codec to check for special cases:
// * MEDIA_SERVER_PREFERRED means to use the codec that is preferred by the media server.
// * NONE means to use the codec that is preferred by the web browser.
// Because this test is always run only for Kurento and Chrome, we know what to select here.
if (codecToCheck == VideoCodec.MEDIA_SERVER_PREFERRED) {
// Kurento preferred video codec is VP8.
codecToCheck = VideoCodec.VP8;
}
else if (codecToCheck == VideoCodec.NONE) {
// Chrome preferred video codec is VP8.
codecToCheck = VideoCodec.VP8;
}
List<WebElement> statsButtons = user.getDriver().findElements(By.className("stats-button"));
for (WebElement statButton : statsButtons) {
statButton.click();