Skip to content

Commit e617a83

Browse files
authored
docs: add more examples of additionalSearchParams (#798)
1 parent 3d232d1 commit e617a83

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export const config: WebdriverIO.Config = {
4848
debug: true,
4949
// The storybook options, see cli options for the description
5050
storybook: {
51+
additionalSearchParams: new URLSearchParams({foo: 'bar', abc: 'def'}),
5152
clip: false,
5253
clipSelector: ''#some-id,
5354
numShards: 4,
@@ -281,6 +282,23 @@ describe("Storybook Interaction", () => {
281282

282283
The options are:
283284

285+
#### `additionalSearchParams`
286+
287+
- **Type:** [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
288+
- **Mandatory:** No
289+
- **Default:** `new URLSearchParams()`
290+
- **Example:**
291+
292+
```ts
293+
await browser.waitForStorybookComponentToBeLoaded({
294+
additionalSearchParams: new URLSearchParams({ foo: "bar", abc: "def" }),
295+
id: "componentId",
296+
});
297+
```
298+
299+
This will add additional search parameters to the Storybook URL, in the example above the URL will be `http://storybook.url/iframe.html?id=story-id&foo=bar&abc=def`.
300+
See the [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) documentation for more information.
301+
284302
#### `clipSelector`
285303

286304
- **Type:** `string`

0 commit comments

Comments
 (0)