use of org.openqa.grid.internal.TestSession in project zalenium by zalando.
the class DockerSeleniumRemoteProxyTest method videoRecordingIsDisabledViaCapability.
@Test
public void videoRecordingIsDisabledViaCapability() {
Map<String, Object> requestedCapability = getCapabilitySupportedByDockerSelenium();
requestedCapability.put("recordVideo", false);
TestSession newSession = proxy.getNewSession(requestedCapability);
Assert.assertNotNull(newSession);
Assert.assertEquals(proxy.isVideoRecordingEnabled(), false);
}
use of org.openqa.grid.internal.TestSession in project zalenium by zalando.
the class DockerSeleniumRemoteProxyTest method noSessionIsCreatedWhenCapabilitiesAreNotSupported.
@Test
public void noSessionIsCreatedWhenCapabilitiesAreNotSupported() {
// Non supported capabilities
Map<String, Object> requestedCapability = new HashMap<>();
requestedCapability.put(CapabilityType.BROWSER_NAME, BrowserType.IE);
requestedCapability.put(CapabilityType.PLATFORM_NAME, Platform.WIN10);
TestSession newSession = proxy.getNewSession(requestedCapability);
Assert.assertNull(newSession);
}
use of org.openqa.grid.internal.TestSession in project zalenium by zalando.
the class DockerSeleniumRemoteProxyTest method noSessionIsCreatedWithSpecialTimeZone.
@Test
public void noSessionIsCreatedWithSpecialTimeZone() {
// Non supported capabilities
TimeZone timeZone = TimeZone.getTimeZone("America/Montreal");
Map<String, Object> requestedCapability = getCapabilitySupportedByDockerSelenium();
requestedCapability.put("tz", timeZone.getID());
TestSession newSession = proxy.getNewSession(requestedCapability);
Assert.assertNull(newSession);
}
use of org.openqa.grid.internal.TestSession in project zalenium by zalando.
the class DockerSeleniumRemoteProxyTest method dockerSeleniumOnlyRunsOneTestPerContainer.
@Test
public void dockerSeleniumOnlyRunsOneTestPerContainer() {
// Supported desired capability for the test session
Map<String, Object> requestedCapability = getCapabilitySupportedByDockerSelenium();
// Not tests have been executed.
Assert.assertEquals(0, proxy.getAmountOfExecutedTests());
TestSession newSession = proxy.getNewSession(requestedCapability);
Assert.assertNotNull(newSession);
// One test is/has been executed and the session amount limit was reached.
Assert.assertEquals(1, proxy.getAmountOfExecutedTests());
Assert.assertTrue(proxy.isTestSessionLimitReached());
}
use of org.openqa.grid.internal.TestSession in project zalenium by zalando.
the class DockerSeleniumRemoteProxyTest method noSessionIsCreatedWithSpecialScreenSize.
@Test
public void noSessionIsCreatedWithSpecialScreenSize() {
// Non supported capabilities
Dimension customScreenSize = new Dimension(1280, 760);
Map<String, Object> requestedCapability = getCapabilitySupportedByDockerSelenium();
String screenResolution = String.format("%sx%s", customScreenSize.getWidth(), customScreenSize.getHeight());
requestedCapability.put("screenResolution", screenResolution);
TestSession newSession = proxy.getNewSession(requestedCapability);
Assert.assertNull(newSession);
}
Aggregations