From c44196726888ed8ad84bdf29df2c9489e0e1f9bb Mon Sep 17 00:00:00 2001 From: Pradum Kumar Date: Fri, 14 Jun 2024 16:53:49 +0530 Subject: [PATCH] docs url update (#504) * docs url update * docs url update --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- .gitignore | 1 + README.md | 4 ++-- index.js | 4 ++-- test/index.test.mjs | 8 ++++---- 5 files changed, 11 insertions(+), 10 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 c9106a7..c8db4f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules .nyc_output +.DS_Store diff --git a/README.md b/README.md index f316c9f..1107668 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ $ percy exec -- node script.js - `driver` (**required**) - A `selenium-webdriver` driver instance - `name` (**required**) - The snapshot name; must be unique to each snapshot -- `options` - [See per-snapshot configuration options](https://docs.percy.io/docs/cli-configuration#per-snapshot-configuration) +- `options` - [See per-snapshot configuration options](https://www.browserstack.com/docs/percy/take-percy-snapshots/overview#per-snapshot-configuration) ## Upgrading @@ -182,4 +182,4 @@ $ percy exec -- [js 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/index.js b/index.js index 90eeb6c..7f6cf48 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ module.exports = async function percySnapshot(driver, name, options) { if (!(await module.exports.isPercyEnabled())) return; let log = utils.logger('selenium-webdriver'); if (utils.percy?.type === 'automate') { - throw new Error('Invalid function call - percySnapshot(). Please use percyScreenshot() 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'); + throw new Error('Invalid function call - percySnapshot(). Please use percyScreenshot() function while using Percy with Automate. For more information on usage of percyScreenshot, refer https://www.browserstack.com/docs/percy/integrate/functional-and-visual'); } try { @@ -76,7 +76,7 @@ module.exports.percyScreenshot = async function percyScreenshot(driver, name, op if (!(await module.exports.isPercyEnabled())) return; let log = utils.logger('selenium-webdriver'); if (utils.percy?.type !== 'automate') { - throw new Error('Invalid function call - percyScreenshot(). Please use percySnapshot() function for taking screenshot. percyScreenshot() should be used only while using Percy with Automate. For more information on usage of PercySnapshot(), refer doc for your language https://docs.percy.io/docs/end-to-end-testing'); + throw new Error('Invalid function call - percyScreenshot(). Please use percySnapshot() function for taking screenshot. percyScreenshot() should be used only while using Percy with Automate. For more information on usage of PercySnapshot(), refer doc for your language https://www.browserstack.com/docs/percy/integrate/overview'); } try { diff --git a/test/index.test.mjs b/test/index.test.mjs index 5eaeedd..4ddfaa3 100644 --- a/test/index.test.mjs +++ b/test/index.test.mjs @@ -75,7 +75,7 @@ describe('percySnapshot', () => { } catch (e) { error = e.message; } - expect(error).toEqual('Invalid function call - percySnapshot(). Please use percyScreenshot() 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'); + expect(error).toEqual('Invalid function call - percySnapshot(). Please use percyScreenshot() function while using Percy with Automate. For more information on usage of percyScreenshot, refer https://www.browserstack.com/docs/percy/integrate/functional-and-visual'); }); }); @@ -156,11 +156,11 @@ describe('percyScreenshot', () => { })); }); - it('receive data object from CLI response', async() => { + it('receive data object from CLI response', async () => { const mockResponse = { success: true, body: { data: { some_data: 'some_data ' } } - } + }; spyOn(percySnapshot, 'request').and.callFake(() => mockResponse); const response = await percyScreenshot(driver, 'Snapshot 1'); @@ -216,6 +216,6 @@ describe('percyScreenshot', () => { } catch (e) { error = e.message; } - expect(error).toEqual('Invalid function call - percyScreenshot(). Please use percySnapshot() function for taking screenshot. percyScreenshot() should be used only while using Percy with Automate. For more information on usage of PercySnapshot(), refer doc for your language https://docs.percy.io/docs/end-to-end-testing'); + expect(error).toEqual('Invalid function call - percyScreenshot(). Please use percySnapshot() function for taking screenshot. percyScreenshot() should be used only while using Percy with Automate. For more information on usage of PercySnapshot(), refer doc for your language https://www.browserstack.com/docs/percy/integrate/overview'); }); });