Skip to content

Commit

Permalink
Merge branch 'refactor/mapping-toFirstLetterLower' into fix/unmap-int…
Browse files Browse the repository at this point in the history
…ernal-methods
  • Loading branch information
inancgumus committed Feb 21, 2023
2 parents bf7b574 + eab18d3 commit c44f0a3
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 21 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
</p>
<p align="center">
<a href="https://github.com/grafana/xk6-browser/releases">Download</a> ·
<a href="https://k6.io/docs/javascript-api/xk6-browser/get-started/installation/">Install</a> ·
<a href="https://k6.io/docs/javascript-api/k6-x-browser/">Documentation</a> ·
<a href="https://community.k6.io/c/xk6-browser/14">Community Forum</a>
</p>
Expand All @@ -24,7 +23,11 @@

**xk6-browser** is a [k6](https://k6.io/) extension that supports browser automation through the [Chrome Devtools Protocol](https://chromedevtools.github.io/devtools-protocol/) (CDP). It adds browser-level APIs to interact with browsers and collect frontend performance metrics as part of your k6 tests.

https://user-images.githubusercontent.com/10811379/200350050-f346931f-6402-487e-bf4d-eff808ac2190.mp4
**As of [k6 version 0.43.0](https://github.com/grafana/k6/releases/tag/v0.43.0), xk6-browser is now bundled in k6 as an experimental module, and usable without a separate binary or compilation step!**


https://user-images.githubusercontent.com/10811379/220158567-cdef7ddc-96c5-41d9-854f-a25c5f67e4b3.mp4


Special acknowledgment to the authors of [Playwright](https://playwright.dev/) and [Puppeteer](https://github.com/puppeteer/puppeteer) for their trailblazing work in this area. This project is heavily influenced and in some regards based on the code of those projects.

Expand All @@ -40,7 +43,6 @@ See our [project roadmap](ROADMAP.md) for more details.
## Get started

- [Getting Started](https://k6.io/docs/javascript-api/xk6-browser/)
- [Installing xk6-browser](https://k6.io/docs/javascript-api/xk6-browser/get-started/installation/)
- [Running xk6-browser](https://k6.io/docs/javascript-api/xk6-browser/get-started/running-xk6-browser/)
- [Browser Metrics](https://k6.io/docs/javascript-api/xk6-browser/get-started/browser-metrics/)
- [Selecting Elements](https://k6.io/docs/javascript-api/xk6-browser/get-started/selecting-elements/)
Expand Down
1 change: 0 additions & 1 deletion browser/mapping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ func toFirstLetterLower(s string) string {
// Instead of loading up an acronyms list, just do this.
// Good enough for our purposes.
special := map[string]string{
"ID": "id",
"JSON": "json",
"JSONValue": "jsonValue",
"URL": "url",
Expand Down
2 changes: 1 addition & 1 deletion browser/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
k6modules "go.k6.io/k6/js/modules"
)

const version = "0.8.0"
const version = "0.8.1"

type (
// RootModule is the global module instance that will create module
Expand Down
16 changes: 0 additions & 16 deletions chromium/browser_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package chromium

import (
"net"
"runtime"
"testing"

"github.com/grafana/xk6-browser/common"
Expand Down Expand Up @@ -32,7 +31,6 @@ func TestBrowserTypePrepareFlags(t *testing.T) {
changeOpts *common.LaunchOptions
changeK6Opts *k6lib.Options
expInitVal, expChangedVal any
pre func(t *testing.T)
post func(t *testing.T, flags map[string]any)
}{
{
Expand Down Expand Up @@ -111,17 +109,6 @@ func TestBrowserTypePrepareFlags(t *testing.T) {
changeK6Opts: &k6lib.Options{},
expChangedVal: nil,
},
{
flag: "enable-use-zoom-for-dsf",
expInitVal: false,
pre: func(t *testing.T) {
t.Helper()

if runtime.GOOS != "darwin" {
t.Skip()
}
},
},
{
flag: "headless",
expInitVal: false,
Expand All @@ -142,9 +129,6 @@ func TestBrowserTypePrepareFlags(t *testing.T) {
tc := tc
t.Run(tc.flag, func(t *testing.T) {
t.Parallel()
if tc.pre != nil {
tc.pre(t)
}

flags, err := prepareFlags(&common.LaunchOptions{}, nil)
require.NoError(t, err, "failed to prepare flags")
Expand Down
20 changes: 20 additions & 0 deletions release notes/v0.8.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
This is a patch release that fixes a few bugs, including one [regression bug](https://github.com/grafana/xk6-browser/issues/749) introduced in v0.8.0, adds one improvement on documentation, and does minor internal modifications.


## Bugs fixed

- Fix mapping of `Page`'s `Keyboard`, `Mouse`, and `Touchscreen` properties. ([#751](https://github.com/grafana/xk6-browser/pull/751))
- Fix `Page.URL()` method. ([#758](https://github.com/grafana/xk6-browser/pull/758))
- Fix `Frame.Title()` method. ([#761](https://github.com/grafana/xk6-browser/pull/761))


## Improvements

- Added contributing guidelines. ([#750](https://github.com/grafana/xk6-browser/pull/750))


## Internals

- Reverted version bump for some dependencies in order to match k6 versions. ([#743](https://github.com/grafana/xk6-browser/pull/743))
- Fix usage of stale virtual user context in mapping layer. ([#754](https://github.com/grafana/xk6-browser/pull/754))
- Removed the unused browser closing state. ([#759](https://github.com/grafana/xk6-browser/pull/759))

0 comments on commit c44f0a3

Please sign in to comment.