Skip to content

Commit

Permalink
chore(test): Modified CapabilitiesChromeOptionsMapperTest to verify a
Browse files Browse the repository at this point in the history
Number entered as a JSON value of the experimental features param
  • Loading branch information
MatousJobanek committed Nov 13, 2017
1 parent 9633214 commit 782a821
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.internal.LazilyParsedNumber;
import com.google.gson.reflect.TypeToken;
import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -103,7 +104,8 @@ public void testParseChromeOptionsWithSimpleJsonAsExperimentalOption() throws IO

String experimentalOptionJson = "{" +
"\"booleanOption\": false," +
"\"stringOption\": \"hello\"" +
"\"stringOption\": \"hello\"," +
"\"numberOption\": 12345" +
"}";
desiredCapabilities.setCapability("chromeExperimentalOption", experimentalOptionJson);

Expand All @@ -114,6 +116,7 @@ public void testParseChromeOptionsWithSimpleJsonAsExperimentalOption() throws IO
ChromeOptions expectedChromeOptions = new ChromeOptions();
expectedChromeOptions.setExperimentalOption("booleanOption", false);
expectedChromeOptions.setExperimentalOption("stringOption", "hello");
expectedChromeOptions.setExperimentalOption("numberOption", new LazilyParsedNumber("12345"));
Assertions.assertThat(chromeOptions).isEqualToComparingFieldByFieldRecursively(expectedChromeOptions);
}
}

0 comments on commit 782a821

Please sign in to comment.