diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 789a142..936ad2d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -11,7 +11,7 @@ assignees: '' There are common setup gotchas that happen with Percy's SDKs, it would be worth reading the debugging document, which might already answer your question: -https://docs.percy.io/docs/debugging-sdk +https://www.browserstack.com/docs/percy/integrate/percy-sdk-workflow#debugging-sdks ## Reach out to Percy support instead? @@ -43,7 +43,7 @@ If necessary, describe the problem you have been experiencing in more detail. ## Debug logs If you are reporting a bug, _always_ include logs! [Give the "Debugging SDKs" -document a quick read for how to gather logs](https://docs.percy.io/docs/debugging-sdks#debugging-sdks) +document a quick read for how to gather logs](https://www.browserstack.com/docs/percy/integrate/percy-sdk-workflow#debugging-sdks) Please do not trim or edit these logs, often times there are hints in the full logs that help debug what is going on. diff --git a/.gitignore b/.gitignore index 20a7bbf..7f28457 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,4 @@ node_modules/ .project .vscode .settings - +.DS_Store diff --git a/README.md b/README.md index 0ac47ad..a08a835 100644 --- a/README.md +++ b/README.md @@ -232,4 +232,4 @@ $ percy exec -- [java test command] [percy] Done! ``` -Refer to docs here: [Percy on Automate](https://docs.percy.io/docs/integrate-functional-testing-with-visual-testing) +Refer to docs here: [Percy on Automate](https://www.browserstack.com/docs/percy/integrate/functional-and-visual) diff --git a/src/main/java/io/percy/selenium/Percy.java b/src/main/java/io/percy/selenium/Percy.java index 77bc784..86c96ca 100644 --- a/src/main/java/io/percy/selenium/Percy.java +++ b/src/main/java/io/percy/selenium/Percy.java @@ -184,7 +184,7 @@ private boolean isCaptureResponsiveDOM(Map options) { public JSONObject snapshot(String name, Map options) { if (!isPercyEnabled) { return null; } - if ("automate".equals(sessionType)) { throw new RuntimeException("Invalid function call - snapshot(). Please use screenshot() function while using Percy with Automate. For more information on usage of PercyScreenshot, refer https://docs.percy.io/docs/integrate-functional-testing-with-visual-testing"); } + if ("automate".equals(sessionType)) { throw new RuntimeException("Invalid function call - snapshot(). Please use screenshot() function while using Percy with Automate. For more information on usage of PercyScreenshot, refer https://www.browserstack.com/docs/percy/integrate/functional-and-visual"); } List> domSnapshot = new ArrayList<>(); @@ -223,7 +223,7 @@ public JSONObject screenshot(String name) throws UnsupportedOperationException { */ public JSONObject screenshot(String name, Map options) throws UnsupportedOperationException { if (!isPercyEnabled) { return null; } - if (!"automate".equals(sessionType)) { throw new RuntimeException("Invalid function call - screenshot(). Please use snapshot() function for taking screenshot. screenshot() should be used only while using Percy with Automate. For more information on usage of snapshot(), refer doc for your language https://docs.percy.io/docs/end-to-end-testing"); } + if (!"automate".equals(sessionType)) { throw new RuntimeException("Invalid function call - screenshot(). Please use snapshot() function for taking screenshot. screenshot() should be used only while using Percy with Automate. For more information on usage of snapshot(), refer doc for your language https://www.browserstack.com/docs/percy/integrate/overview"); } List driverArray = Arrays.asList(driver.getClass().toString().split("\\$")); // Added to handle testcase (mocked driver) Iterator driverIterator = driverArray.iterator(); @@ -291,7 +291,7 @@ private boolean healthcheck() { log("You may be using @percy/agent" + "which is no longer supported by this SDK." + "Please uninstall @percy/agent and install @percy/cli instead." + - "https://docs.percy.io/docs/migrating-to-percy-cli" + "https://www.browserstack.com/docs/percy/migration/migrate-to-cli" ); return false; diff --git a/src/test/java/io/percy/selenium/SdkTest.java b/src/test/java/io/percy/selenium/SdkTest.java index 5d27f08..a293230 100644 --- a/src/test/java/io/percy/selenium/SdkTest.java +++ b/src/test/java/io/percy/selenium/SdkTest.java @@ -197,7 +197,7 @@ public void takeScreenshotWithOptions() { public void takeSnapshotThrowErrorForPOA() { percy.sessionType = "automate"; Throwable exception = assertThrows(RuntimeException.class, () -> percy.snapshot("Test")); - assertEquals("Invalid function call - snapshot(). Please use screenshot() function while using Percy with Automate. For more information on usage of PercyScreenshot, refer https://docs.percy.io/docs/integrate-functional-testing-with-visual-testing", exception.getMessage()); + assertEquals("Invalid function call - snapshot(). Please use screenshot() function while using Percy with Automate. For more information on usage of PercyScreenshot, refer https://www.browserstack.com/docs/percy/integrate/functional-and-visual", exception.getMessage()); } @Test @@ -205,6 +205,6 @@ public void takeScreenshotThrowErrorForWeb() { RemoteWebDriver mockedDriver = mock(RemoteWebDriver.class); percy = spy(new Percy(mockedDriver)); Throwable exception = assertThrows(RuntimeException.class, () -> percy.screenshot("Test")); - assertEquals("Invalid function call - screenshot(). Please use snapshot() function for taking screenshot. screenshot() should be used only while using Percy with Automate. For more information on usage of snapshot(), refer doc for your language https://docs.percy.io/docs/end-to-end-testing", exception.getMessage()); + assertEquals("Invalid function call - screenshot(). Please use snapshot() function for taking screenshot. screenshot() should be used only while using Percy with Automate. For more information on usage of snapshot(), refer doc for your language https://www.browserstack.com/docs/percy/integrate/overview", exception.getMessage()); } }