|
20 | 20 | import com.google.common.collect.ImmutableMap;
|
21 | 21 | import com.google.common.reflect.TypeToken;
|
22 | 22 |
|
23 |
| -import org.junit.jupiter.api.Test; |
24 | 23 | import org.junit.jupiter.api.Tag;
|
| 24 | +import org.junit.jupiter.api.Test; |
25 | 25 | import org.openqa.selenium.Capabilities;
|
26 | 26 | import org.openqa.selenium.Cookie;
|
27 | 27 | import org.openqa.selenium.ImmutableCapabilities;
|
28 | 28 | import org.openqa.selenium.MutableCapabilities;
|
29 | 29 | import org.openqa.selenium.Platform;
|
30 | 30 | import org.openqa.selenium.Proxy;
|
31 |
| -import org.openqa.selenium.logging.LoggingPreferences; |
32 | 31 | import org.openqa.selenium.remote.CapabilityType;
|
33 | 32 | import org.openqa.selenium.remote.Command;
|
34 | 33 | import org.openqa.selenium.remote.DesiredCapabilities;
|
|
46 | 45 | import java.util.Map;
|
47 | 46 | import java.util.concurrent.TimeUnit;
|
48 | 47 |
|
49 |
| -import static java.util.logging.Level.ALL; |
50 |
| -import static java.util.logging.Level.FINE; |
51 |
| -import static java.util.logging.Level.OFF; |
52 |
| -import static java.util.logging.Level.WARNING; |
53 | 48 | import static org.assertj.core.api.Assertions.assertThat;
|
54 | 49 | import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
55 | 50 | import static org.assertj.core.api.Assertions.byLessThan;
|
56 | 51 | import static org.assertj.core.api.InstanceOfAssertFactories.MAP;
|
57 | 52 | import static org.openqa.selenium.Proxy.ProxyType.PAC;
|
58 | 53 | import static org.openqa.selenium.json.Json.MAP_TYPE;
|
59 |
| -import static org.openqa.selenium.logging.LogType.BROWSER; |
60 |
| -import static org.openqa.selenium.logging.LogType.CLIENT; |
61 |
| -import static org.openqa.selenium.logging.LogType.DRIVER; |
62 |
| -import static org.openqa.selenium.logging.LogType.SERVER; |
63 | 54 |
|
64 | 55 | @Tag("UnitTests")
|
65 | 56 | class JsonTest {
|
@@ -370,27 +361,6 @@ void shouldConvertCapabilitiesToAMapAndIncludeCustomValues() {
|
370 | 361 | assertThat(converted.getCapability("furrfu")).isEqualTo("fishy");
|
371 | 362 | }
|
372 | 363 |
|
373 |
| - @Test |
374 |
| - void shouldParseCapabilitiesWithLoggingPreferences() { |
375 |
| - String caps = String.format( |
376 |
| - "{\"%s\": {" + |
377 |
| - "\"browser\": \"WARNING\"," + |
378 |
| - "\"client\": \"DEBUG\", " + |
379 |
| - "\"driver\": \"ALL\", " + |
380 |
| - "\"server\": \"OFF\"}}", |
381 |
| - CapabilityType.LOGGING_PREFS); |
382 |
| - |
383 |
| - Capabilities converted = new Json().toType(caps, Capabilities.class); |
384 |
| - |
385 |
| - LoggingPreferences lp = |
386 |
| - (LoggingPreferences) converted.getCapability(CapabilityType.LOGGING_PREFS); |
387 |
| - assertThat(lp).isNotNull(); |
388 |
| - assertThat(lp.getLevel(BROWSER)).isEqualTo(WARNING); |
389 |
| - assertThat(lp.getLevel(CLIENT)).isEqualTo(FINE); |
390 |
| - assertThat(lp.getLevel(DRIVER)).isEqualTo(ALL); |
391 |
| - assertThat(lp.getLevel(SERVER)).isEqualTo(OFF); |
392 |
| - } |
393 |
| - |
394 | 364 | @Test
|
395 | 365 | void shouldNotParseQuotedJsonObjectsAsActualJsonObjects() {
|
396 | 366 | String jsonStr = "{\"inner\":\"{\\\"color\\\":\\\"green\\\",\\\"number\\\":123}\"}";
|
|
0 commit comments