|
| 1 | +This release helps us to drive complex websites with xk6-browser by fixing significant frame handling bugs and improving the integration testing suite and logging. |
| 2 | + |
| 3 | +## Bugs fixed |
| 4 | + |
| 5 | +- Fix major bug: Cannot find context with specified id ([#49](https://github.com/grafana/xk6-browser/issues/49)) |
| 6 | + |
| 7 | + `FrameSession` was blocking the frame handling mechanism, and the rest of the system couldn't propagate execution contexts, causing the _context with specified id not found_ error. This happens when a `Session` is closed while a related `FrameSession` is booting up. |
| 8 | + |
| 9 | + Refactors `FrameSession` and frame handling code. Improves log messages and better reflects the cause of possible errors. |
| 10 | + |
| 11 | +- Fix major bug: Cannot create frame session ([#129](https://github.com/grafana/xk6-browser/pull/129)) |
| 12 | + |
| 13 | + Fixes and gracefully handles _cannot create frame session_ issue reported by [#125](https://github.com/grafana/xk6-browser/issues/125). It does so by preventing `FrameSession` from throwing an error if the error is temporary and instead logs the error. |
| 14 | + |
| 15 | + Improves the handling of creation and destruction of execution contexts in a more stable way. |
| 16 | + |
| 17 | + Fixes related data race issues, refactors and cleans things up. |
| 18 | + |
| 19 | +- Fix frame aborted navigation event nil pending document sharing ([#177](https://github.com/grafana/xk6-browser/issues/177)) |
| 20 | + |
| 21 | + We were sharing a `nil` pending document when a frame aborts navigation. |
| 22 | + |
| 23 | +- Improve mainframe handling ([#174](https://github.com/grafana/xk6-browser/pull/174)) |
| 24 | + |
| 25 | + This PR skips setting the mainframe if it is already the same. It also adds sanity checks and protects the mainframe field behind a mutex. |
| 26 | + |
| 27 | + |
| 28 | +## Improvements |
| 29 | + |
| 30 | +- Move WebSocket test server to its own package ([#166](https://github.com/grafana/xk6-browser/pull/166)) |
| 31 | + |
| 32 | + Refactors WebSocket test server and gives it a convenient to use interface: |
| 33 | + |
| 34 | + ```go |
| 35 | + twss := ws.NewServer(t, ws.WithCDPHandler("/cdp", handler, &cmdsReceived)) |
| 36 | + ``` |
| 37 | + |
| 38 | +- Revise, refactor, and improve the integration test suite ([#140](https://github.com/grafana/xk6-browser/issues/140)) |
| 39 | + |
| 40 | + This work allows us to reason about the tests better, write them quickly, and provide a first step for reducing circular dependencies between packages. We discovered subtle concurrency bugs thanks to this work. Now we can easily write an integration test like: |
| 41 | + ```go |
| 42 | + newTestBrowser(t) |
| 43 | + newTestBrowser(t, withFileServer()) |
| 44 | + // See the issue for more details |
| 45 | + ``` |
| 46 | + |
| 47 | +## Internals |
| 48 | + |
| 49 | +- Improve execution context logs ([#176](https://github.com/grafana/xk6-browser/pull/176)) |
| 50 | + |
| 51 | +- Propagate the internal logger to more entities ([#151](https://github.com/grafana/xk6-browser/pull/151)) |
| 52 | + |
| 53 | + Increases the consistency of log messages and adds more detailed log messages to some entities such as `BrowserContext`, `FrameManager`, `FrameSession`, `Page`, `Request`, and `Session`. |
| 54 | + |
| 55 | +- Update dependencies ([#155](https://github.com/grafana/xk6-browser/pull/155)) |
| 56 | + |
| 57 | +- Introduce `NewNullLogger` for ease of testing ([NewNullLogger](https://github.com/grafana/xk6-browser/blob/798781695a52ce79213b74b6cf1d0c46acf18128/common/logger.go#L54-L56)) |
| 58 | + |
| 59 | + ```go |
| 60 | + // Old way |
| 61 | + NewLogger(ctx, NullLogger(), false, nil) |
| 62 | + // New way |
| 63 | + NewNullLogger() |
| 64 | + ``` |
0 commit comments