Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 23b236d

Browse files
committed
Remove parallel test execution
1 parent 25ff12a commit 23b236d

17 files changed

+30
-84
lines changed

tests/browser_context_options_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ func TestBrowserContextOptionsDefaultValues(t *testing.T) {
5656
}
5757

5858
func TestBrowserContextOptionsDefaultViewport(t *testing.T) {
59-
t.Parallel()
60-
6159
p := newTestBrowser(t).NewPage(nil)
6260

6361
viewportSize := p.ViewportSize()
@@ -66,8 +64,6 @@ func TestBrowserContextOptionsDefaultViewport(t *testing.T) {
6664
}
6765

6866
func TestBrowserContextOptionsSetViewport(t *testing.T) {
69-
t.Parallel()
70-
7167
tb := newTestBrowser(t)
7268
bctx := tb.NewContext(tb.rt.ToValue(struct {
7369
Viewport common.Viewport `js:"viewport"`
@@ -86,8 +82,6 @@ func TestBrowserContextOptionsSetViewport(t *testing.T) {
8682
}
8783

8884
func TestBrowserContextOptionsExtraHTTPHeaders(t *testing.T) {
89-
t.Parallel()
90-
9185
tb := newTestBrowser(t, withHTTPServer())
9286
bctx := tb.NewContext(tb.rt.ToValue(struct {
9387
ExtraHTTPHeaders map[string]string `js:"extraHTTPHeaders"`

tests/browser_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ import (
2929
)
3030

3131
func TestBrowserNewPage(t *testing.T) {
32-
t.Parallel()
33-
3432
b := newTestBrowser(t)
3533
p := b.NewPage(nil)
3634
l := len(b.Contexts())
@@ -50,8 +48,6 @@ func TestBrowserNewPage(t *testing.T) {
5048

5149
// This only works for Chrome!
5250
func TestBrowserVersion(t *testing.T) {
53-
t.Parallel()
54-
5551
const re = `^\d+\.\d+\.\d+\.\d+$`
5652
r, _ := regexp.Compile(re)
5753
ver := newTestBrowser(t).Version()
@@ -62,8 +58,6 @@ func TestBrowserVersion(t *testing.T) {
6258
// TODO: Improve this test, see:
6359
// https://github.com/grafana/xk6-browser/pull/51#discussion_r742696736
6460
func TestBrowserUserAgent(t *testing.T) {
65-
t.Parallel()
66-
6761
b := newTestBrowser(t)
6862

6963
// testBrowserVersion() tests the version already

tests/element_handle_bounding_box_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ import (
2929
)
3030

3131
func TestElementHandleBoundingBoxInvisibleElement(t *testing.T) {
32-
t.Parallel()
33-
3432
p := newTestBrowser(t).NewPage(nil)
3533

3634
p.SetContent(`<div style="display:none">hello</div>`, nil)
@@ -40,8 +38,6 @@ func TestElementHandleBoundingBoxInvisibleElement(t *testing.T) {
4038
}
4139

4240
func TestElementHandleBoundingBoxSVG(t *testing.T) {
43-
t.Parallel()
44-
4541
tb := newTestBrowser(t)
4642
p := tb.NewPage(nil)
4743

tests/element_handle_click_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ var htmlInputButton = fmt.Sprintf(`
6868
`, mouseHelperScriptSource)
6969

7070
func TestElementHandleClick(t *testing.T) {
71-
t.Parallel()
72-
7371
tb := newTestBrowser(t)
7472
p := tb.NewPage(nil)
7573

@@ -92,8 +90,6 @@ func TestElementHandleClick(t *testing.T) {
9290
}
9391

9492
func TestElementHandleClickWithNodeRemoved(t *testing.T) {
95-
t.Parallel()
96-
9793
tb := newTestBrowser(t)
9894
p := tb.NewPage(nil)
9995

@@ -119,8 +115,6 @@ func TestElementHandleClickWithNodeRemoved(t *testing.T) {
119115
}
120116

121117
func TestElementHandleClickWithDetachedNode(t *testing.T) {
122-
t.Parallel()
123-
124118
tb := newTestBrowser(t)
125119
p := tb.NewPage(nil)
126120

tests/element_handle_getattribute_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ import (
2828
)
2929

3030
func TestElementHandleGetAttribute(t *testing.T) {
31-
t.Parallel()
32-
3331
const want = "https://somewhere"
3432

3533
p := newTestBrowser(t).NewPage(nil)

tests/element_handle_input_value_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ import (
2828
)
2929

3030
func TestElementHandleInputValue(t *testing.T) {
31-
t.Parallel()
32-
3331
p := newTestBrowser(t).NewPage(nil)
3432

3533
p.SetContent(`

tests/element_handle_is_checked_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ import (
2828
)
2929

3030
func TestElementHandleIsChecked(t *testing.T) {
31-
t.Parallel()
32-
3331
p := newTestBrowser(t).NewPage(nil)
3432

3533
p.SetContent(`<input type="checkbox" checked>`, nil)

tests/element_handle_screenshot_test.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ import (
3030
)
3131

3232
func TestElementHandleScreenshot(t *testing.T) {
33-
t.Parallel()
34-
3533
tb := newTestBrowser(t)
3634
p := tb.NewPage(nil)
3735

@@ -40,20 +38,22 @@ func TestElementHandleScreenshot(t *testing.T) {
4038
Height float64 `js:"height"`
4139
}{Width: 800, Height: 600}))
4240
p.Evaluate(tb.rt.ToValue(`
43-
() => {
44-
document.body.style.margin = '0';
45-
document.body.style.padding = '0';
46-
document.documentElement.style.margin = '0';
47-
document.documentElement.style.padding = '0';
48-
const div = document.createElement('div');
49-
div.style.marginTop = '400px';
50-
div.style.marginLeft = '100px';
51-
div.style.width = '100px';
52-
div.style.height = '100px';
53-
div.style.background = 'red';
54-
document.body.appendChild(div);
55-
}
56-
`))
41+
() => {
42+
document.body.style.margin = '0';
43+
document.body.style.padding = '0';
44+
document.documentElement.style.margin = '0';
45+
document.documentElement.style.padding = '0';
46+
47+
const div = document.createElement('div');
48+
div.style.marginTop = '400px';
49+
div.style.marginLeft = '100px';
50+
div.style.width = '100px';
51+
div.style.height = '100px';
52+
div.style.background = 'red';
53+
54+
document.body.appendChild(div);
55+
}
56+
`))
5757

5858
elem := p.Query("div")
5959
buf := elem.Screenshot(nil)

tests/element_handle_waitforselector_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ import (
2828
)
2929

3030
func TestElementHandleWaitForSelector(t *testing.T) {
31-
t.Parallel()
32-
3331
tb := newTestBrowser(t)
3432
p := tb.NewPage(nil)
3533
p.SetContent(`<div class="root"></div>`, nil)

tests/js_handle_get_properties_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ import (
2828
)
2929

3030
func TestJSHandleGetProperties(t *testing.T) {
31-
t.Parallel()
32-
3331
tb := newTestBrowser(t)
3432
p := tb.NewPage(nil)
3533

0 commit comments

Comments
 (0)