Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 20 additions & 71 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions packages/telescope/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Options:
--width <int> Viewport width, in pixels. If both width and device are provided, the width value will override device emulation viewport width.
--height <int> Viewport height, in pixels. If both height and device are provided, the height value will override device emulation viewport height.
--frameRate <int> Filmstrip frame rate, in frames per second (default: 1)
--no-recording Disable video recording, final screenshot, and filmstrip (cannot be combined with --uploadUrl)
--disableJS Disable JavaScript (default: false)
--debug Output debug lines (default: false)
--auth <object> Basic HTTP authentication (Expects: {"username": "", "password": ""}) (default: false)
Expand Down Expand Up @@ -101,6 +102,18 @@ And supports the following browsers:
- [Safari](https://www.apple.com/safari/)/[Webkit](https://webkit.org/) - `safari`
- [Firefox](https://www.firefox.com/) - `firefox`

### Disabling Recording

By default, Telescope records a video of the page load, takes a final screenshot, and generates a filmstrip. Pass `--no-recording` (or `recording: false` programmatically) to skip all three. HAR, metrics, and other results are still collected. Recording is required for uploads, so `--uploadUrl` cannot be combined with `--no-recording`.

```
telescope -u https://www.example.com --no-recording
```

```ts
await launchTest({ url: 'https://www.example.com', recording: false });
```

### Custom Timeout

You can set a custom timeout by passing the desired timeout in milliseconds using the `--timeout` parameter. Defaults to 30000, or 30 seconds.
Expand Down
4 changes: 2 additions & 2 deletions packages/telescope/__tests__/browsers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ describe.each(browsers)('Basic configuration tests: %s', browser => {
};
const config = new BrowserConfig().getBrowserConfig(browser, options);
expect(config && typeof config === 'object').toBe(true);
expect(config.recordVideo.size.width === 500).toBe(true);
expect(config.recordVideo.size.height === 700).toBe(true);
expect(config.recordVideo?.size.width === 500).toBe(true);
expect(config.recordVideo?.size.height === 700).toBe(true);
});

test('Setting a viewport with a string throws an error', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/telescope/__tests__/emulation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ describe.each(browsers)(
expect(config.viewport.height).toBe(3344);
});
it(`Setting device emulation sets recordVideo width to override value for browser: ${browser}`, () => {
expect(config.recordVideo.size.width).toBe(1122);
expect(config.recordVideo?.size.width).toBe(1122);
});
it(`Setting device emulation sets recordVideo height to override value for browser: ${browser}`, () => {
expect(config.recordVideo.size.height).toBe(3344);
expect(config.recordVideo?.size.height).toBe(3344);
});
},
);
Expand Down
Loading
Loading