[java-idp-integration-tests] branch main updated: Disable Microsoft Edge JSON view

Tom Zeller tzeller at dragonacea.biz
Wed Jan 3 12:43:08 UTC 2024


This is an automated email from the git hooks/post-receive script.

tzeller pushed a commit to branch main
in repository java-idp-integration-tests.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=1ada16e7b16b8f50f9cc7a02d76b64f30b19916d

The following commit(s) were added to refs/heads/main by this push:
     new 1ada16e  Disable Microsoft Edge JSON view
1ada16e is described below

commit 1ada16e7b16b8f50f9cc7a02d76b64f30b19916d
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Wed Jan 3 06:42:42 2024 -0600

    Disable Microsoft Edge JSON view
    
    It adds line numbers which affect JSON serialization.
---
 .../idp/integration/tests/BaseIntegrationTest.java         | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java b/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
index 3735a49..126ed1c 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
@@ -73,6 +73,7 @@ import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.WebElement;
 import org.openqa.selenium.chrome.ChromeDriver;
 import org.openqa.selenium.chrome.ChromeOptions;
+import org.openqa.selenium.edge.EdgeOptions;
 import org.openqa.selenium.firefox.FirefoxDriver;
 import org.openqa.selenium.firefox.FirefoxOptions;
 import org.openqa.selenium.interactions.Actions;
@@ -1603,7 +1604,9 @@ public abstract class BaseIntegrationTest {
     }
 
     /**
-     * Set up the desired capabilities.
+     * Set up the desired browser capabilities.
+     * 
+     * Specify browser-specific options or arguments here.
      * 
      * Prefer capabilities as provided by the data provider {@link sauceOnDemandBrowserDataProvider}.
      * 
@@ -1612,7 +1615,7 @@ public abstract class BaseIntegrationTest {
      * 
      * The desired capabilities will be overridden by the {@link #overrideCapabilities} if non-null.
      * 
-     * Disables JSON view when using Firefox.
+     * Disables JSON view when using Firefox and Microsoft Edge.
      * 
      * Accepts insecure certs when using browsers other than Safari.
      * 
@@ -1664,6 +1667,13 @@ public abstract class BaseIntegrationTest {
             desiredCapabilities.setAcceptInsecureCerts(true);
         }
 
+        if (desiredCapabilities.getBrowserName().equalsIgnoreCase("MicrosoftEdge")) {
+            log.debug("Disabling Microsoft Edge JSON view");
+            final EdgeOptions options = new EdgeOptions();
+            options.addArguments("--disable-features=msEdgeJSONViewer");
+            desiredCapabilities.merge(options);
+        }
+
         log.debug("Desired capabilities '{}'", desiredCapabilities);
         return desiredCapabilities;
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list