From f1bb316da6108341d7c7f13a72707dd2deb563f0 Mon Sep 17 00:00:00 2001 From: Tian Feng Date: Wed, 13 Nov 2024 16:24:24 -0800 Subject: [PATCH] chore: Bump Cypress & TestCafe version (#975) * chore: Bump Cypress&TestCafe version * unpin browser version * disable redefines-builtin-id * fix * fix lint err * try to change to warning * if it does not work, remove it * lint --------- Co-authored-by: Alex Plischke --- .github/workflows/test.yml | 6 +++--- .golangci.yml | 1 + .sauce/cypress-10.yml | 2 +- .sauce/testcafe.yml | 3 +-- api/saucectl.schema.json | 2 ++ api/v1/framework/cypress.schema.json | 1 + api/v1alpha/framework/testcafe.schema.json | 1 + internal/cmd/docker/push.go | 4 ++-- internal/http/resto_test.go | 6 +++--- internal/multipartext/seeker.go | 9 --------- 10 files changed, 15 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79415982c..b56db134c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -148,7 +148,7 @@ jobs: run: ./saucectl run -c .sauce/playwright.yml --timeout 10m - name: Saucectl RUN - CLI Driven - run: ./saucectl run playwright ".*.js" -c "" --name "CLI Driven" --browser chromium --rootDir tests/e2e/playwright/ --playwright.version 1.43.1 --timeout 10m -r us-west-1 + run: ./saucectl run playwright ".*.js" -c "" --name "CLI Driven" --browser chromium --rootDir tests/e2e/playwright/ --playwright.version 1.48.2 --timeout 10m -r us-west-1 testcafe: needs: build @@ -170,7 +170,7 @@ jobs: run: ./saucectl run -c .sauce/testcafe.yml --timeout 10m - name: Saucectl RUN - CLI Driven - run: ./saucectl run testcafe "*.test.js" -c "" --name "CLI Driven" --browser chrome --browserVersion 128 --rootDir tests/e2e/testcafe/ --testcafe.version 3.5.0 --timeout 10m -r us-west-1 + run: ./saucectl run testcafe "*.test.js" -c "" --name "CLI Driven" --browser chrome --browserVersion 128 --rootDir tests/e2e/testcafe/ --testcafe.version 3.7.0 --timeout 10m -r us-west-1 cypress: needs: build @@ -198,7 +198,7 @@ jobs: -c "" --name "CLI Driven" \ --rootDir tests/e2e/cypress_10/e2e/ \ --browser chrome \ - --cypress.version 13.7.3 \ + --cypress.version 13.15.2 \ --cypress.configFile "cypress.config.js" \ --timeout 10m \ -r us-west-1 diff --git a/.golangci.yml b/.golangci.yml index 62ab664b8..f5c229094 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -8,3 +8,4 @@ linters-settings: # https://staticcheck.io/docs/configuration/options/#checks # Default: ["*"] checks: [ "all", "-SA1019" ] + \ No newline at end of file diff --git a/.sauce/cypress-10.yml b/.sauce/cypress-10.yml index 6c91ea1bf..83c9e2304 100644 --- a/.sauce/cypress-10.yml +++ b/.sauce/cypress-10.yml @@ -11,7 +11,7 @@ rootDir: tests/e2e/cypress_10/e2e/ defaults: timeout: 5m cypress: - version: 13.15.1 + version: 13.15.2 configFile: "cypress.config.js" suites: # - name: "(experimental) webkit test" diff --git a/.sauce/testcafe.yml b/.sauce/testcafe.yml index 09dcb2358..f464981de 100644 --- a/.sauce/testcafe.yml +++ b/.sauce/testcafe.yml @@ -10,12 +10,11 @@ sauce: defaults: timeout: 5m testcafe: - version: 3.6.2 + version: 3.7.0 rootDir: tests/e2e/testcafe/ suites: - name: Chrome in sauce browserName: chrome - browserVersion: "128" # TODO(AlexP): Pinned due to TestCafe <= 3.6.2 not working with Chrome 130+. src: - "*.test.js" platformName: "macOS 12" diff --git a/api/saucectl.schema.json b/api/saucectl.schema.json index 299f80cde..b03d5b4a9 100644 --- a/api/saucectl.schema.json +++ b/api/saucectl.schema.json @@ -402,6 +402,7 @@ "version": { "enum": [ "package.json", + "13.15.2", "13.15.1", "13.14.2", "13.13.3", @@ -1653,6 +1654,7 @@ "$ref": "#/allOf/7/then/properties/playwright/properties/version", "enum": [ "package.json", + "3.7.0", "3.6.2", "3.6.1", "3.6.0", diff --git a/api/v1/framework/cypress.schema.json b/api/v1/framework/cypress.schema.json index 25b2834ff..c24395a49 100644 --- a/api/v1/framework/cypress.schema.json +++ b/api/v1/framework/cypress.schema.json @@ -66,6 +66,7 @@ "$ref": "../subschema/common.schema.json#/definitions/version", "enum": [ "package.json", + "13.15.2", "13.15.1", "13.14.2", "13.13.3", diff --git a/api/v1alpha/framework/testcafe.schema.json b/api/v1alpha/framework/testcafe.schema.json index 16a2987a2..6ce9e493e 100644 --- a/api/v1alpha/framework/testcafe.schema.json +++ b/api/v1alpha/framework/testcafe.schema.json @@ -54,6 +54,7 @@ "$ref": "../subschema/common.schema.json#/definitions/version", "enum": [ "package.json", + "3.7.0", "3.6.2", "3.6.1", "3.6.0", diff --git a/internal/cmd/docker/push.go b/internal/cmd/docker/push.go index 3dc7effed..bbb9e65b6 100644 --- a/internal/cmd/docker/push.go +++ b/internal/cmd/docker/push.go @@ -157,9 +157,9 @@ func logPushProgress(reader io.ReadCloser) error { } // createBar returns a customized progress bar for Docker image pushes. -func createBar(max int64, desc string) *progressbar.ProgressBar { +func createBar(limit int64, desc string) *progressbar.ProgressBar { return progressbar.NewOptions64( - max, + limit, progressbar.OptionSetDescription(desc), progressbar.OptionSetWriter(os.Stderr), progressbar.OptionShowBytes(true), diff --git a/internal/http/resto_test.go b/internal/http/resto_test.go index 7809611c6..b9b58c283 100644 --- a/internal/http/resto_test.go +++ b/internal/http/resto_test.go @@ -423,9 +423,9 @@ func TestResto_GetJobAssetFileContent(t *testing.T) { } func randJobStatus(j *restoJob, isComplete bool) { - min := 1 - max := 10 - randNum := rand.Intn(max-min+1) + min + lower := 1 + upper := 10 + randNum := rand.Intn(upper-lower+1) + lower status := "error" if isComplete { diff --git a/internal/multipartext/seeker.go b/internal/multipartext/seeker.go index 2e9639cb3..d496f86b7 100644 --- a/internal/multipartext/seeker.go +++ b/internal/multipartext/seeker.go @@ -3,8 +3,6 @@ package multipartext import ( "fmt" "io" - - "golang.org/x/exp/constraints" ) // SizedReadSeeker is a ReadSeeker that also knows its size. @@ -125,10 +123,3 @@ func (mr *multiReadSeeker) WriteTo(w io.Writer) (sum int64, err error) { } return sum, nil } - -func min[T constraints.Ordered](a, b T) T { - if a < b { - return a - } - return b -}