Skip to content

Commit

Permalink
docs url update (#504)
Browse files Browse the repository at this point in the history
* docs url update

* docs url update
  • Loading branch information
prklm10 authored Jun 14, 2024
1 parent b939826 commit c441967
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
.nyc_output
.DS_Store
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions test/index.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});

Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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');
});
});

0 comments on commit c441967

Please sign in to comment.