mirror of https://github.com/OpenVidu/openvidu.git
openvidu-test-e2e: fix publisher height check with new tab sharing infobat
parent
d3b552e940
commit
743ea311a3
|
@ -51,6 +51,7 @@ public class ChromeUser extends BrowserUser {
|
||||||
options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.IGNORE);
|
options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.IGNORE);
|
||||||
|
|
||||||
options.addArguments("--disable-infobars");
|
options.addArguments("--disable-infobars");
|
||||||
|
options.setExperimentalOption("excludeSwitches", new String[]{"enable-automation"});
|
||||||
|
|
||||||
Map<String, Object> prefs = new HashMap<String, Object>();
|
Map<String, Object> prefs = new HashMap<String, Object>();
|
||||||
prefs.put("profile.default_content_setting_values.media_stream_mic", 1);
|
prefs.put("profile.default_content_setting_values.media_stream_mic", 1);
|
||||||
|
|
|
@ -997,7 +997,7 @@ public class OpenViduTestAppE2eTest {
|
||||||
JSONObject obj = (JSONObject) new JSONParser().parse(widthAndHeight);
|
JSONObject obj = (JSONObject) new JSONParser().parse(widthAndHeight);
|
||||||
|
|
||||||
expectedWidthHeight[0] = (long) obj.get("width");
|
expectedWidthHeight[0] = (long) obj.get("width");
|
||||||
expectedWidthHeight[1] = (long) obj.get("height");
|
expectedWidthHeight[1] = (long) obj.get("height") + 49; // + 49 because of new "Sharing tab" infobar
|
||||||
|
|
||||||
System.out.println("New viewport dimension: " + obj.toJSONString());
|
System.out.println("New viewport dimension: " + obj.toJSONString());
|
||||||
|
|
||||||
|
@ -2124,8 +2124,9 @@ public class OpenViduTestAppE2eTest {
|
||||||
|
|
||||||
String widthAndHeight = user.getEventManager().getDimensionOfViewport();
|
String widthAndHeight = user.getEventManager().getDimensionOfViewport();
|
||||||
JSONObject obj = (JSONObject) new JSONParser().parse(widthAndHeight);
|
JSONObject obj = (JSONObject) new JSONParser().parse(widthAndHeight);
|
||||||
Assert.assertEquals("{\"width\":" + (long) obj.get("width") + ",\"height\":" + ((long) obj.get("height")) + "}",
|
Assert.assertEquals(
|
||||||
pub.getVideoDimensions());
|
"{\"width\":" + (long) obj.get("width") + ",\"height\":" + (((long) obj.get("height")) + 49) + "}",
|
||||||
|
pub.getVideoDimensions()); // + 49 because of new "Sharing tab" infobar
|
||||||
Assert.assertEquals(new Integer(30), pub.getFrameRate());
|
Assert.assertEquals(new Integer(30), pub.getFrameRate());
|
||||||
Assert.assertEquals("SCREEN", pub.getTypeOfVideo());
|
Assert.assertEquals("SCREEN", pub.getTypeOfVideo());
|
||||||
Assert.assertTrue(pub.hasVideo());
|
Assert.assertTrue(pub.hasVideo());
|
||||||
|
@ -2587,7 +2588,8 @@ public class OpenViduTestAppE2eTest {
|
||||||
body = "{'session':'CUSTOM_SESSION_ID','to':['" + connectionId + "'],'type':'server2','data':'SERVER EVENT!'}";
|
body = "{'session':'CUSTOM_SESSION_ID','to':['" + connectionId + "'],'type':'server2','data':'SERVER EVENT!'}";
|
||||||
restClient.rest(HttpMethod.POST, "/api/signal", body, HttpStatus.SC_OK);
|
restClient.rest(HttpMethod.POST, "/api/signal", body, HttpStatus.SC_OK);
|
||||||
user.getEventManager().waitUntilEventReaches("signal:server2", 1);
|
user.getEventManager().waitUntilEventReaches("signal:server2", 1);
|
||||||
Assert.assertEquals("", 1, user.getDriver().findElements(By.xpath("//*[text()='server - signal:server2 - SERVER EVENT!']")).size());
|
Assert.assertEquals("", 1, user.getDriver()
|
||||||
|
.findElements(By.xpath("//*[text()='server - signal:server2 - SERVER EVENT!']")).size());
|
||||||
|
|
||||||
/** DELETE /api/sessions/<SESSION_ID>/connection/<CONNECTION_ID> **/
|
/** DELETE /api/sessions/<SESSION_ID>/connection/<CONNECTION_ID> **/
|
||||||
restClient.rest(HttpMethod.DELETE, "/api/sessions/NOT_EXISTS/connection/NOT_EXISTS", HttpStatus.SC_BAD_REQUEST);
|
restClient.rest(HttpMethod.DELETE, "/api/sessions/NOT_EXISTS/connection/NOT_EXISTS", HttpStatus.SC_BAD_REQUEST);
|
||||||
|
|
Loading…
Reference in New Issue