mirror of https://github.com/OpenVidu/openvidu.git
Fix some tests not working with selenium 4
- For some reason, a chrome browser opened with docker-selenium 4 returns calling window.height 1 px more... No issue found anywhere on any repositories from chrome, selenium or chromedriver. It could be a regression in chromedrive, because chrome returns this value correctly. It does not affect to OpenVidu because value "window.height" and "window.width" are used to check if stream video dimensions are correctly updated. - Reorganized tests of force codec.pull/660/head
parent
fc61692b09
commit
76f4a5e0b0
|
@ -340,7 +340,7 @@ public class OpenViduEventManager {
|
|||
|
||||
public String getDimensionOfViewport() {
|
||||
String dimension = (String) ((JavascriptExecutor) driver)
|
||||
.executeScript("return (JSON.stringify({width: window.innerWidth, height: window.innerHeight}))");
|
||||
.executeScript("return (JSON.stringify({width: window.innerWidth, height: window.innerHeight - 1}))");
|
||||
return dimension;
|
||||
}
|
||||
|
||||
|
|
|
@ -4086,13 +4086,17 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestAppE2eTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Force valid codec - Not Allow Transcoding")
|
||||
void forceValidCodecNotAllowTranscodingTest() throws Exception {
|
||||
@DisplayName("Force valid codec VP8 - Not Allow Transcoding")
|
||||
void forceValidCodecNotAllowTranscodingVP8Test() throws Exception {
|
||||
log.info("Force codec Chrome - Force VP8 - Not Allow Transcoding");
|
||||
setupBrowser("chrome");
|
||||
this.forceCodecGenericE2eTest(VideoCodec.VP8, false);
|
||||
this.user.getDriver().close();
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Force valid codec H264 - Not Allow Transcoding")
|
||||
void forceValidCodecNotAllowTranscodingH264Test() throws Exception {
|
||||
log.info("Force codec Chrome - Force H264 - Not Allow Transcoding");
|
||||
setupBrowser("chrome");
|
||||
this.forceCodecGenericE2eTest(VideoCodec.H264, false);
|
||||
|
@ -4100,13 +4104,17 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestAppE2eTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Force valid codec - Allow Transcoding")
|
||||
void forceValidCodecAllowTranscodingTest() throws Exception {
|
||||
@DisplayName("Force valid codec VP8 - Allow Transcoding")
|
||||
void forceValidCodecAllowTranscodingVP8Test() throws Exception {
|
||||
log.info("Force codec Chrome - Force VP8 - Allow Transcoding");
|
||||
setupBrowser("chrome");
|
||||
this.forceCodecGenericE2eTest(VideoCodec.VP8, true);
|
||||
this.user.getDriver().close();
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Force valid codec H264 - Allow Transcoding")
|
||||
void forceValidCodecAllowTranscodingH264Test() throws Exception {
|
||||
log.info("Force codec Chrome - Force H264 - Allow Transcoding");
|
||||
setupBrowser("chrome");
|
||||
this.forceCodecGenericE2eTest(VideoCodec.H264, true);
|
||||
|
|
Loading…
Reference in New Issue