Skip to content

Commit d149740

Browse files
committed
browser: disable a bunch of tests on windows
It seems like quite a lot of tests are not passing on windows. Unfortunately given the volume fixing them right now seems unlikely. So I opened #4118 This tests have not been ran on windows it seems ever, before the move of the codebase to core.
1 parent f0ff9c3 commit d149740

9 files changed

+58
-2
lines changed

js/modules/k6/browser/storage/file_persister_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"net/http/httptest"
99
"os"
1010
"path/filepath"
11+
"runtime"
1112
"strings"
1213
"testing"
1314

@@ -82,6 +83,11 @@ func TestLocalFilePersister(t *testing.T) {
8283

8384
func TestRemoteFilePersister(t *testing.T) {
8485
t.Parallel()
86+
if runtime.GOOS == "windows" {
87+
t.Skip("not supported on windows for now")
88+
// actual problem is that the paths used are with reverse slash even when they get to be inside JSON
89+
// which leads to them being parsed as escepe codes when they shouldn't
90+
}
8591

8692
const (
8793
basePath = "screenshots"

js/modules/k6/browser/tests/element_handle_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"fmt"
88
"image/png"
99
"io"
10+
"runtime"
1011
"testing"
1112

1213
"github.com/stretchr/testify/assert"
@@ -174,6 +175,9 @@ func TestElementHandleClickWithDetachedNode(t *testing.T) {
174175

175176
func TestElementHandleClickConcealedLink(t *testing.T) {
176177
t.Parallel()
178+
if runtime.GOOS == "windows" {
179+
t.Skip() // wrong result
180+
}
177181

178182
const (
179183
wantBefore = "🙈"

js/modules/k6/browser/tests/frame_manager_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// practically none of this work on windows
2+
//go:build !windows
3+
14
package tests
25

36
import (

js/modules/k6/browser/tests/frame_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// practically none of this work on windows
2+
//go:build !windows
3+
14
package tests
25

36
import (

js/modules/k6/browser/tests/keyboard_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// practically none of this work on windows
2+
//go:build !windows
3+
14
package tests
25

36
import (

js/modules/k6/browser/tests/lifecycle_wait_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// practically none of this work on windows
2+
//go:build !windows
3+
14
package tests
25

36
import (

js/modules/k6/browser/tests/locator_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// practically none of this work on windows
2+
//go:build !windows
3+
14
package tests
25

36
import (

js/modules/k6/browser/tests/page_test.go

+29-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"net/http"
1111
"net/http/httptest"
1212
"os"
13+
"runtime"
1314
"strconv"
1415
"sync/atomic"
1516
"testing"
@@ -39,6 +40,9 @@ const sampleHTML = `<div><b>Test</b><ol><li><i>One</i></li></ol></div>`
3940

4041
func TestNestedFrames(t *testing.T) {
4142
t.Parallel()
43+
if runtime.GOOS == "windows" {
44+
t.Skip("windows take forever to do this test")
45+
}
4246

4347
tb := newTestBrowser(t,
4448
withFileServer(),
@@ -335,6 +339,9 @@ func TestPageGotoDataURI(t *testing.T) {
335339

336340
func TestPageGotoWaitUntilLoad(t *testing.T) {
337341
t.Parallel()
342+
if runtime.GOOS == "windows" {
343+
t.Skip() // no idea but it doesn't work
344+
}
338345

339346
b := newTestBrowser(t, withFileServer())
340347
p := b.NewPage(nil)
@@ -355,6 +362,9 @@ func TestPageGotoWaitUntilLoad(t *testing.T) {
355362

356363
func TestPageGotoWaitUntilDOMContentLoaded(t *testing.T) {
357364
t.Parallel()
365+
if runtime.GOOS == "windows" {
366+
t.Skip() // no idea but it doesn't work
367+
}
358368

359369
b := newTestBrowser(t, withFileServer())
360370
p := b.NewPage(nil)
@@ -1359,6 +1369,9 @@ func TestPageTimeout(t *testing.T) {
13591369

13601370
func TestPageWaitForSelector(t *testing.T) {
13611371
t.Parallel()
1372+
if runtime.GOOS == "windows" {
1373+
t.Skip() // no idea but it doesn't work
1374+
}
13621375

13631376
testCases := []struct {
13641377
name string
@@ -1417,6 +1430,9 @@ func TestPageWaitForSelector(t *testing.T) {
14171430

14181431
func TestPageThrottleNetwork(t *testing.T) {
14191432
t.Parallel()
1433+
if runtime.GOOS == "windows" {
1434+
t.Skip() // windows timeouts
1435+
}
14201436

14211437
testCases := []struct {
14221438
name string
@@ -1526,6 +1542,9 @@ func TestPageThrottleNetwork(t *testing.T) {
15261542
func TestPageThrottleCPU(t *testing.T) {
15271543
t.Parallel()
15281544

1545+
if runtime.GOOS == "windows" {
1546+
t.Skip() // windows timeouts
1547+
}
15291548
tb := newTestBrowser(t, withFileServer())
15301549

15311550
tb.withHandler("/ping", func(w http.ResponseWriter, req *http.Request) {
@@ -1586,6 +1605,9 @@ func performPingTest(t *testing.T, tb *testBrowser, page *common.Page, iteration
15861605

15871606
func TestPageIsVisible(t *testing.T) {
15881607
t.Parallel()
1608+
if runtime.GOOS == "windows" {
1609+
t.Skip() // timeouts
1610+
}
15891611

15901612
testCases := []struct {
15911613
name string
@@ -1657,6 +1679,9 @@ func TestPageIsVisible(t *testing.T) {
16571679

16581680
func TestPageIsHidden(t *testing.T) {
16591681
t.Parallel()
1682+
if runtime.GOOS == "windows" {
1683+
t.Skip() // timeouts
1684+
}
16601685

16611686
testCases := []struct {
16621687
name string
@@ -1728,6 +1753,9 @@ func TestPageIsHidden(t *testing.T) {
17281753

17291754
func TestShadowDOMAndDocumentFragment(t *testing.T) {
17301755
t.Parallel()
1756+
if runtime.GOOS == "windows" {
1757+
t.Skip() // timeouts
1758+
}
17311759

17321760
// Start a server that will return static html files.
17331761
mux := http.NewServeMux()
@@ -2135,7 +2163,7 @@ func TestPageOnMetric(t *testing.T) {
21352163
const page = await browser.newPage()
21362164
21372165
%s
2138-
2166+
21392167
await page.goto('%s', {waitUntil: 'networkidle'});
21402168
21412169
await page.close()

js/modules/k6/browser/tests/webvital_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package tests
22

33
import (
44
"context"
5+
"runtime"
56
"testing"
67
"time"
78

@@ -18,7 +19,9 @@ import (
1819
// a web page.
1920
func TestWebVitalMetric(t *testing.T) {
2021
t.Parallel()
21-
22+
if runtime.GOOS == "windows" {
23+
t.Skip("timeouts on windows")
24+
}
2225
var (
2326
samples = make(chan k6metrics.SampleContainer)
2427
browser = newTestBrowser(t, withFileServer(), withSamples(samples))

0 commit comments

Comments
 (0)