Skip to content

Commit

Permalink
Merge 38c4723 into 9772c96
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur22 authored Oct 2, 2023
2 parents 9772c96 + 38c4723 commit 821f4f9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions release notes/v0.47.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,26 @@ console.log(context.cookies.length); // 0

Allows users to register a handler to be executed every time the `console` API methods are called from within the page's JavaScript context. The arguments passed into the handler are defined by the [ConsoleMessage](https://k6.io/docs/javascript-api/k6-experimental/browser/consolemessage/) class.

```js
page.on('console', msg => {
check(msg, {
'assertConsoleMessageType': msg => msg.type() == 'log',
'assertConsoleMessageText': msg => msg.text() == 'this is a console.log message 42',
'assertConsoleMessageArgs0': msg => msg.args()[0].jsonValue() == 'this is a console.log message',
'assertConsoleMessageArgs1': msg => msg.args()[1].jsonValue() == 42,
});
});

page.evaluate(() => console.log('this is a console.log message', 42));
```

### UX improvements and enhancements

_Format as `<number> <present_verb> <object>. <credit>`_:

- [#3338](https://github.com/grafana/k6/pull/3338) and [xk6-grpc#48](https://github.com/grafana/xk6-grpc/pull/48). Adds a support of the v1 of the gRPC reflection protocol.
- [browser#1007](https://github.com/grafana/xk6-browser/pull/1007) Inject `window.k6 = {};` to help identify k6 browser module tests.
- [browser#1022](https://github.com/grafana/xk6-browser/pull/1022) Refactor the `check` in `examples/fillform.js` so that it matches the type definitions and documentation for `check`.
- _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_
- `#pr` `<description>`
- `#pr` `<description>`
Expand All @@ -79,12 +94,21 @@ _Format as `<number> <present_verb> <object>. <credit>`_:
- [browser#1040](https://github.com/grafana/xk6-browser/pull/1040) fix the `context.clearCookies()` method to clear all cookies from the current browser context.
- [browser#1031](https://github.com/grafana/xk6-browser/pull/1031) fix the `expires` field while adding cookies using the `context.addCookie()` method.
- [browser#1039](https://github.com/grafana/xk6-browser/pull/1039) fix Goja conversions while adding and retrieving cookies.
- [browser#1038](https://github.com/grafana/xk6-browser/pull/1038) Fix read/write data race for edge case with remote browsers.
- [browser#1035](https://github.com/grafana/xk6-browser/pull/1035) Refactor `int64` timeout to `time.Duration` which ensures no confusion as to whether a timeout is in milliseconds or seconds.
- [browser#1034](https://github.com/grafana/xk6-browser/pull/1034) Fix `page.reload` & `page.setContent` to use the default navigation timeout over the default timeout.
- [browser#1033](https://github.com/grafana/xk6-browser/pull/1033) Fix the `page` timeouts so it is actually used after being set.

## Maintenance and internal improvements

_Format as `<number> <present_verb> <object>. <credit>`_:
- _`#2770` Refactors parts of the JS module._
- [#3342](https://github.com/grafana/k6/pull/3342). Updates xk6-grpc to the latest version. This change brings all the latest fixes and improvements to the experimental gRPC module.
- [browser#1043](https://github.com/grafana/xk6-browser/pull/1043), [browser#1021](https://github.com/grafana/xk6-browser/pull/1021), [browser#1019](https://github.com/grafana/xk6-browser/pull/1019), [browser#1014](https://github.com/grafana/xk6-browser/pull/1014) Fix tests.
- [browser#1000](https://github.com/grafana/xk6-browser/pull/1000), [browser#1024](https://github.com/grafana/xk6-browser/pull/1024) Refine issue and PR templates.
- [browser#1003](https://github.com/grafana/xk6-browser/pull/1003), [browser#1009](https://github.com/grafana/xk6-browser/pull/1009), [browser#1010](https://github.com/grafana/xk6-browser/pull/1010) Internal changes.
- [browser#997](https://github.com/grafana/xk6-browser/pull/997) Update readme.
- [browser#962](https://github.com/grafana/xk6-browser/pull/962) CI fixes.

## _Optional_ Roadmap

Expand Down

0 comments on commit 821f4f9

Please sign in to comment.