|
27 | 27 | import static org.assertj.core.api.Assertions.assertThat;
|
28 | 28 | import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
29 | 29 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
30 |
| -import static org.junit.jupiter.api.Assertions.assertNull; |
31 | 30 | import static org.openqa.selenium.json.Json.MAP_TYPE;
|
32 | 31 |
|
33 | 32 | import com.google.common.collect.ImmutableMap;
|
@@ -196,23 +195,6 @@ void forwardsMetaDataAssociatedWithARequest() throws IOException {
|
196 | 195 | }
|
197 | 196 | }
|
198 | 197 |
|
199 |
| - @Test |
200 |
| - void doesNotForwardRequiredCapabilitiesAsTheseAreVeryLegacy() throws IOException { |
201 |
| - try (NewSessionPayload payload = |
202 |
| - NewSessionPayload.create( |
203 |
| - ImmutableMap.of( |
204 |
| - "capabilities", |
205 |
| - EMPTY_MAP, |
206 |
| - "requiredCapabilities", |
207 |
| - singletonMap("key", "so it's not empty")))) { |
208 |
| - StringBuilder toParse = new StringBuilder(); |
209 |
| - payload.writeTo(toParse); |
210 |
| - Map<String, Object> seen = new Json().toType(toParse.toString(), MAP_TYPE); |
211 |
| - |
212 |
| - assertNull(seen.get("requiredCapabilities")); |
213 |
| - } |
214 |
| - } |
215 |
| - |
216 | 198 | @Test
|
217 | 199 | void shouldPreserveMetadata() throws IOException {
|
218 | 200 | Map<String, Object> raw =
|
@@ -263,8 +245,7 @@ void nullValuesInMetaDataAreIgnored() {
|
263 | 245 | void keysUsedForStoringCapabilitiesAreIgnoredFromMetadata() {
|
264 | 246 | Map<String, Object> raw =
|
265 | 247 | ImmutableMap.of(
|
266 |
| - "capabilities", singletonMap("alwaysMatch", singletonMap("browserName", "cheese")), |
267 |
| - "desiredCapabilities", emptyMap()); |
| 248 | + "capabilities", singletonMap("alwaysMatch", singletonMap("browserName", "cheese"))); |
268 | 249 |
|
269 | 250 | try (NewSessionPayload payload = NewSessionPayload.create(raw)) {
|
270 | 251 | Map<String, Object> seen = payload.getMetadata();
|
|
0 commit comments