From e246873623e645325dc6d8edae328a5926a69068 Mon Sep 17 00:00:00 2001 From: Pradum Kumar Date: Fri, 14 Jun 2024 16:54:54 +0530 Subject: [PATCH] docs url update (#288) --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- .gitignore | 2 +- README.md | 2 +- src/main/java/io/percy/selenium/Percy.java | 6 +++--- src/test/java/io/percy/selenium/SdkTest.java | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) 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 c491902..3c16e5d 100644 --- a/src/main/java/io/percy/selenium/Percy.java +++ b/src/main/java/io/percy/selenium/Percy.java @@ -173,7 +173,7 @@ public JSONObject snapshot(String name, @Nullable List widths, Integer 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"); } Map domSnapshot = null; @@ -207,7 +207,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(); @@ -275,7 +275,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 ec9599a..68beced 100644 --- a/src/test/java/io/percy/selenium/SdkTest.java +++ b/src/test/java/io/percy/selenium/SdkTest.java @@ -182,7 +182,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 @@ -190,6 +190,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()); } }