From df8b7f38bf8e3d9038f7a5628c0ce0ac44a672dd Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 7 Mar 2025 00:35:11 +0000 Subject: [PATCH 001/107] test remove scala --- MODULE.bazel | 82 +++++++++++++------ scalatests/com/google/testing/web/BUILD.bazel | 66 +++++++-------- web/scala.bzl | 62 +++++++------- 3 files changed, 122 insertions(+), 88 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 17754659..ba98905b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -3,14 +3,31 @@ module( version = "0.4.0", ) -bazel_dep(name = "bazel_skylib", version = "1.7.1") -bazel_dep(name = "platforms", version = "0.0.10") +bazel_dep( + name = "bazel_skylib", + version = "1.7.1", +) + +bazel_dep( + name = "platforms", + version = "0.0.10", +) ##### Go dependencies ##### -bazel_dep(name = "rules_go", version = "0.51.0-rc1", repo_name = "io_bazel_rules_go") -bazel_dep(name = "gazelle", version = "0.40.0", repo_name = "bazel_gazelle") +bazel_dep( + name = "rules_go", + version = "0.51.0-rc1", + repo_name = "io_bazel_rules_go", +) + +bazel_dep( + name = "gazelle", + version = "0.40.0", + repo_name = "bazel_gazelle", +) go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") + go_deps.from_file(go_mod = "//:go.mod") # All *direct* Go dependencies of the module have to be listed explicitly. @@ -21,9 +38,13 @@ use_repo( ) ##### Java dependencies ##### -bazel_dep(name = "rules_jvm_external", version = "6.6") +bazel_dep( + name = "rules_jvm_external", + version = "6.6", +) maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") + maven.install( artifacts = [ "com.google.guava:guava:33.2.1-jre", @@ -32,52 +53,65 @@ maven.install( "junit:junit:4.13.2", ], ) + use_repo(maven, "maven") ##### Python dependencies ##### -bazel_dep(name = "rules_python", version = "1.0.0") +bazel_dep( + name = "rules_python", + version = "1.0.0", +) python = use_extension("@rules_python//python/extensions:python.bzl", "python") + python.toolchain( is_default = True, python_version = "3.11", ) + use_repo(python, "python_3_11", "python_versions") pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") + pip.parse( hub_name = "rules_webtesting_py_deps", python_version = "3.11", requirements_lock = "//:requirements_lock.txt", requirements_windows = "requirements_lock_windows.txt", ) + use_repo(pip, "rules_webtesting_py_deps") ##### Scala dependencies ##### -bazel_dep(name = "rules_scala", repo_name = "io_bazel_rules_scala") +#bazel_dep( +# name = "rules_scala", +# repo_name = "io_bazel_rules_scala", +#) # TODO: Switch to a release version once it's available in BCR. # Otherwise, the root module has to declare the same override. -git_override( - module_name = "rules_scala", - commit = "219e63983e8e483e66ebf70372969ba227382001", - remote = "https://github.com/mbland/rules_scala", -) - -scala_deps = use_extension( - "@io_bazel_rules_scala//scala/extensions:deps.bzl", - "scala_deps", -) -scala_deps.settings( - fetch_sources = True, -) -scala_deps.toolchains( - scalatest = True, -) +#git_override( +# module_name = "rules_scala", +# commit = "219e63983e8e483e66ebf70372969ba227382001", +# remote = "https://github.com/mbland/rules_scala", +#) +# +#scala_deps = use_extension( +# "@io_bazel_rules_scala//scala/extensions:deps.bzl", +# "scala_deps", +#) +#scala_deps.settings( +# fetch_sources = True, +#) +#scala_deps.toolchains( +# scalatest = True, +#) ##### Browsers dependencies ##### browser_repositories = use_extension("//web:extension.bzl", "browser_repositories_extension") + browser_repositories.install(version = "0.3.4") + use_repo( browser_repositories, "com_saucelabs_sauce_connect_linux_x64", @@ -88,7 +122,7 @@ use_repo( "org_chromium_chromedriver_macos_x64", "org_chromium_chromedriver_windows_x64", "org_chromium_chromium_linux_x64", - "org_chromium_chromium_macos_arm64", # Only available in 0.3.3 + "org_chromium_chromium_macos_arm64", # Only available in 0.3.3 "org_chromium_chromium_macos_x64", "org_chromium_chromium_windows_x64", "org_mozilla_firefox_linux_x64", diff --git a/scalatests/com/google/testing/web/BUILD.bazel b/scalatests/com/google/testing/web/BUILD.bazel index a7b7c5c0..4e21ced1 100644 --- a/scalatests/com/google/testing/web/BUILD.bazel +++ b/scalatests/com/google/testing/web/BUILD.bazel @@ -1,35 +1,35 @@ -# Copyright 2018 Google Inc. +## Copyright 2018 Google Inc. +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## +################################################################################# +## +#load("//web:scala.bzl", "scala_web_test_suite") # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +#licenses(["notice"]) # Apache 2.0 # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ -# -load("//web:scala.bzl", "scala_web_test_suite") - -licenses(["notice"]) # Apache 2.0 - -scala_web_test_suite( - name = "WebTestTest", - srcs = ["WebTestTest.scala"], - browsers = [ - "//browsers:chromium-local", - "//browsers:firefox-local", - "//browsers/sauce:chrome-win10", - "//browsers/sauce:chrome-win10-connect", - ], - deps = [ - "//java/com/google/testing/web", - "@maven//:junit_junit", - "@maven//:org_seleniumhq_selenium_selenium_api", - ], -) +#scala_web_test_suite( +# name = "WebTestTest", +# srcs = ["WebTestTest.scala"], +# browsers = [ +# "//browsers:chromium-local", +# "//browsers:firefox-local", +# "//browsers/sauce:chrome-win10", +# "//browsers/sauce:chrome-win10-connect", +# ], +# deps = [ +# "//java/com/google/testing/web", +# "@maven//:junit_junit", +# "@maven//:org_seleniumhq_selenium_selenium_api", +# ], +#) diff --git a/web/scala.bzl b/web/scala.bzl index 19e2ea27..2a08efc8 100644 --- a/web/scala.bzl +++ b/web/scala.bzl @@ -1,34 +1,34 @@ -# Copyright 2016 Google Inc. +## Copyright 2016 Google Inc. +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +#"""Web Test rules for Java.""" # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +#load("//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") +#load("//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") +#load("@io_bazel_rules_scala//scala:scala.bzl", "scala_test") # -# http://www.apache.org/licenses/LICENSE-2.0 +#def scala_web_test_suite(name, scala_test_tags = DEFAULT_WRAPPED_TEST_TAGS, **kwargs): +# """Defines a test_suite of web_test targets that wrap a java_test target. # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Web Test rules for Java.""" - -load("//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") -load("//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") -load("@io_bazel_rules_scala//scala:scala.bzl", "scala_test") - -def scala_web_test_suite(name, scala_test_tags = DEFAULT_WRAPPED_TEST_TAGS, **kwargs): - """Defines a test_suite of web_test targets that wrap a java_test target. - - Args: - name: The base name of the test. - scala_test_tags: A list of test tag strings to use for the scala_test - target. - **kwargs: Arguments for wrapped_web_test_suite - """ - wrap_web_test_suite( - name = name, - rule = scala_test, - wrapped_test_tags = scala_test_tags, - **kwargs - ) +# Args: +# name: The base name of the test. +# scala_test_tags: A list of test tag strings to use for the scala_test +# target. +# **kwargs: Arguments for wrapped_web_test_suite +# """ +# wrap_web_test_suite( +# name = name, +# rule = scala_test, +# wrapped_test_tags = scala_test_tags, +# **kwargs +# ) From 44f9756d9d409d0b5dbdfa77b71fcf5543c7f5aa Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 7 Mar 2025 02:36:47 +0000 Subject: [PATCH 002/107] test submodule --- MODULE.bazel | 25 -------- scalatests/com/google/testing/web/BUILD.bazel | 35 ----------- web/scala.bzl | 34 ----------- web/scala/BUILD.bazel | 35 +++++++++++ web/scala/MODULE.bazel | 59 +++++++++++++++++++ .../web => web/scala}/WebTestTest.scala | 0 web/scala/scala.bzl | 34 +++++++++++ 7 files changed, 128 insertions(+), 94 deletions(-) delete mode 100644 scalatests/com/google/testing/web/BUILD.bazel delete mode 100644 web/scala.bzl create mode 100644 web/scala/BUILD.bazel create mode 100644 web/scala/MODULE.bazel rename {scalatests/com/google/testing/web => web/scala}/WebTestTest.scala (100%) create mode 100644 web/scala/scala.bzl diff --git a/MODULE.bazel b/MODULE.bazel index ba98905b..937b409a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -82,31 +82,6 @@ pip.parse( use_repo(pip, "rules_webtesting_py_deps") -##### Scala dependencies ##### -#bazel_dep( -# name = "rules_scala", -# repo_name = "io_bazel_rules_scala", -#) - -# TODO: Switch to a release version once it's available in BCR. -# Otherwise, the root module has to declare the same override. -#git_override( -# module_name = "rules_scala", -# commit = "219e63983e8e483e66ebf70372969ba227382001", -# remote = "https://github.com/mbland/rules_scala", -#) -# -#scala_deps = use_extension( -# "@io_bazel_rules_scala//scala/extensions:deps.bzl", -# "scala_deps", -#) -#scala_deps.settings( -# fetch_sources = True, -#) -#scala_deps.toolchains( -# scalatest = True, -#) - ##### Browsers dependencies ##### browser_repositories = use_extension("//web:extension.bzl", "browser_repositories_extension") diff --git a/scalatests/com/google/testing/web/BUILD.bazel b/scalatests/com/google/testing/web/BUILD.bazel deleted file mode 100644 index 4e21ced1..00000000 --- a/scalatests/com/google/testing/web/BUILD.bazel +++ /dev/null @@ -1,35 +0,0 @@ -## Copyright 2018 Google Inc. -## -## Licensed under the Apache License, Version 2.0 (the "License"); -## you may not use this file except in compliance with the License. -## You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## -################################################################################# -## -#load("//web:scala.bzl", "scala_web_test_suite") -# -#licenses(["notice"]) # Apache 2.0 -# -#scala_web_test_suite( -# name = "WebTestTest", -# srcs = ["WebTestTest.scala"], -# browsers = [ -# "//browsers:chromium-local", -# "//browsers:firefox-local", -# "//browsers/sauce:chrome-win10", -# "//browsers/sauce:chrome-win10-connect", -# ], -# deps = [ -# "//java/com/google/testing/web", -# "@maven//:junit_junit", -# "@maven//:org_seleniumhq_selenium_selenium_api", -# ], -#) diff --git a/web/scala.bzl b/web/scala.bzl deleted file mode 100644 index 2a08efc8..00000000 --- a/web/scala.bzl +++ /dev/null @@ -1,34 +0,0 @@ -## Copyright 2016 Google Inc. -## -## Licensed under the Apache License, Version 2.0 (the "License"); -## you may not use this file except in compliance with the License. -## You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -#"""Web Test rules for Java.""" -# -#load("//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") -#load("//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") -#load("@io_bazel_rules_scala//scala:scala.bzl", "scala_test") -# -#def scala_web_test_suite(name, scala_test_tags = DEFAULT_WRAPPED_TEST_TAGS, **kwargs): -# """Defines a test_suite of web_test targets that wrap a java_test target. -# -# Args: -# name: The base name of the test. -# scala_test_tags: A list of test tag strings to use for the scala_test -# target. -# **kwargs: Arguments for wrapped_web_test_suite -# """ -# wrap_web_test_suite( -# name = name, -# rule = scala_test, -# wrapped_test_tags = scala_test_tags, -# **kwargs -# ) diff --git a/web/scala/BUILD.bazel b/web/scala/BUILD.bazel new file mode 100644 index 00000000..82a352d7 --- /dev/null +++ b/web/scala/BUILD.bazel @@ -0,0 +1,35 @@ +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# +load("//:scala.bzl", "scala_web_test_suite") + +licenses(["notice"]) # Apache 2.0 + +scala_web_test_suite( + name = "WebTestTest", + srcs = ["WebTestTest.scala"], + browsers = [ + "@rules_webtesting//browsers:chromium-local", + "@rules_webtesting//browsers:firefox-local", + "@rules_webtesting//browsers/sauce:chrome-win10", + "@rules_webtesting//browsers/sauce:chrome-win10-connect", + ], + deps = [ + "@maven//:junit_junit", + "@maven//:org_seleniumhq_selenium_selenium_api", + "@rules_webtesting//java/com/google/testing/web", + ], +) diff --git a/web/scala/MODULE.bazel b/web/scala/MODULE.bazel new file mode 100644 index 00000000..3e239144 --- /dev/null +++ b/web/scala/MODULE.bazel @@ -0,0 +1,59 @@ +module( + name = "rules_webtesting_web_scala", + version = "0.4.0", +) + +bazel_dep( + name = "rules_webtesting", +) + +local_path_override( + module_name = "rules_webtesting", + path = "../..", +) + +##### Scala dependencies ##### +bazel_dep( + name = "rules_scala", + repo_name = "io_bazel_rules_scala", +) + +# TODO: Switch to a release version once it's available in BCR. +# Otherwise, the root module has to declare the same override. +git_override( + module_name = "rules_scala", + commit = "219e63983e8e483e66ebf70372969ba227382001", + remote = "https://github.com/mbland/rules_scala", +) + +scala_deps = use_extension( + "@io_bazel_rules_scala//scala/extensions:deps.bzl", + "scala_deps", +) + +scala_deps.settings( + fetch_sources = True, +) + +scala_deps.toolchains( + scalatest = True, +) + +##### Java dependencies ##### +bazel_dep( + name = "rules_jvm_external", + version = "6.6", +) + +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") + +maven.install( + artifacts = [ + "com.google.guava:guava:33.2.1-jre", + "org.seleniumhq.selenium:selenium-remote-driver:4.27.0", + "org.seleniumhq.selenium:selenium-api:4.27.0", + "junit:junit:4.13.2", + ], +) + +use_repo(maven, "maven") diff --git a/scalatests/com/google/testing/web/WebTestTest.scala b/web/scala/WebTestTest.scala similarity index 100% rename from scalatests/com/google/testing/web/WebTestTest.scala rename to web/scala/WebTestTest.scala diff --git a/web/scala/scala.bzl b/web/scala/scala.bzl new file mode 100644 index 00000000..b78ec7e7 --- /dev/null +++ b/web/scala/scala.bzl @@ -0,0 +1,34 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Web Test rules for Java.""" + +load("@io_bazel_rules_scala//scala:scala.bzl", "scala_test") +load("@rules_webtesting//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") +load("@rules_webtesting//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") + +def scala_web_test_suite(name, scala_test_tags = DEFAULT_WRAPPED_TEST_TAGS, **kwargs): + """Defines a test_suite of web_test targets that wrap a java_test target. + + Args: + name: The base name of the test. + scala_test_tags: A list of test tag strings to use for the scala_test + target. + **kwargs: Arguments for wrapped_web_test_suite + """ + wrap_web_test_suite( + name = name, + rule = scala_test, + wrapped_test_tags = scala_test_tags, + **kwargs + ) From f9bc6819032c95fbfc21206ea21d97b9a45672e0 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Sat, 8 Mar 2025 02:33:01 +0000 Subject: [PATCH 003/107] test for submodule --- MODULE.bazel | 48 +++--- rules_webtesting.iml | 12 ++ web/BUILD.bazel | 25 +-- web/internal/BUILD.bazel | 2 +- web/web_go/MODULE.bazel | 60 ++++++++ web/web_go/go/BUILD.bazel | 32 ++++ web/web_go/go/go.bzl | 33 ++++ web/web_go/gotests/BUILD.bazel | 0 web/web_java/MODULE.bazel | 36 +++++ web/web_java/java/BUILD.bazel | 29 ++++ web/{ => web_java/java}/java.bzl | 5 +- .../com/google/testing/web/BUILD.bazel | 12 +- .../com/google/testing/web/WebTestTest.java | 2 +- web/web_python/BUILD.bazel | 28 ++++ web/web_python/MODULE.bazel | 43 ++++++ web/web_python/python/BUILD.bazel | 29 ++++ web/web_python/python/py.bzl | 37 +++++ web/web_python/pythontests/BUILD.bazel | 62 ++++++++ web/web_python/pythontests/webtest.py | 59 +++++++ web/web_python/pythontests/webtest_test.py | 47 ++++++ web/web_python/requirements_lock.txt | 71 +++++++++ web/web_python/requirements_lock_windows.txt | 144 ++++++++++++++++++ web/{scala => web_scala}/MODULE.bazel | 5 + web/web_scala/scala/BUILD.bazel | 32 ++++ web/{ => web_scala}/scala/scala.bzl | 0 .../scalatests}/BUILD.bazel | 2 +- .../scalatests}/WebTestTest.scala | 0 27 files changed, 799 insertions(+), 56 deletions(-) create mode 100644 rules_webtesting.iml create mode 100644 web/web_go/MODULE.bazel create mode 100644 web/web_go/go/BUILD.bazel create mode 100644 web/web_go/go/go.bzl create mode 100644 web/web_go/gotests/BUILD.bazel create mode 100644 web/web_java/MODULE.bazel create mode 100644 web/web_java/java/BUILD.bazel rename web/{ => web_java/java}/java.bzl (83%) rename {javatests => web/web_java/javatests}/com/google/testing/web/BUILD.bazel (73%) rename {javatests => web/web_java/javatests}/com/google/testing/web/WebTestTest.java (99%) create mode 100644 web/web_python/BUILD.bazel create mode 100644 web/web_python/MODULE.bazel create mode 100644 web/web_python/python/BUILD.bazel create mode 100644 web/web_python/python/py.bzl create mode 100644 web/web_python/pythontests/BUILD.bazel create mode 100644 web/web_python/pythontests/webtest.py create mode 100644 web/web_python/pythontests/webtest_test.py create mode 100644 web/web_python/requirements_lock.txt create mode 100644 web/web_python/requirements_lock_windows.txt rename web/{scala => web_scala}/MODULE.bazel (95%) create mode 100644 web/web_scala/scala/BUILD.bazel rename web/{ => web_scala}/scala/scala.bzl (100%) rename web/{scala => web_scala/scalatests}/BUILD.bazel (96%) rename web/{scala => web_scala/scalatests}/WebTestTest.scala (100%) diff --git a/MODULE.bazel b/MODULE.bazel index 937b409a..af0ec64a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -57,30 +57,30 @@ maven.install( use_repo(maven, "maven") ##### Python dependencies ##### -bazel_dep( - name = "rules_python", - version = "1.0.0", -) - -python = use_extension("@rules_python//python/extensions:python.bzl", "python") - -python.toolchain( - is_default = True, - python_version = "3.11", -) - -use_repo(python, "python_3_11", "python_versions") - -pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") - -pip.parse( - hub_name = "rules_webtesting_py_deps", - python_version = "3.11", - requirements_lock = "//:requirements_lock.txt", - requirements_windows = "requirements_lock_windows.txt", -) - -use_repo(pip, "rules_webtesting_py_deps") +#bazel_dep( +# name = "rules_python", +# version = "1.0.0", +#) +# +#python = use_extension("@rules_python//python/extensions:python.bzl", "python") +# +#python.toolchain( +# is_default = True, +# python_version = "3.11", +#) +# +#use_repo(python, "python_3_11", "python_versions") +# +#pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") +# +#pip.parse( +# hub_name = "rules_webtesting_py_deps", +# python_version = "3.11", +# requirements_lock = "//:requirements_lock.txt", +# requirements_windows = "requirements_lock_windows.txt", +#) +# +#use_repo(pip, "rules_webtesting_py_deps") ##### Browsers dependencies ##### browser_repositories = use_extension("//web:extension.bzl", "browser_repositories_extension") diff --git a/rules_webtesting.iml b/rules_webtesting.iml new file mode 100644 index 00000000..b3840569 --- /dev/null +++ b/rules_webtesting.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/web/BUILD.bazel b/web/BUILD.bazel index 6b5e9ae1..8a09f3b2 100644 --- a/web/BUILD.bazel +++ b/web/BUILD.bazel @@ -1,3 +1,5 @@ +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") + # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,7 +17,6 @@ ################################################################################ # load(":web.bzl", "web_test_config") -load("@bazel_skylib//:bzl_library.bzl", "bzl_library") package( default_testonly = True, @@ -29,15 +30,6 @@ web_test_config( visibility = ["//visibility:public"], ) -bzl_library( - name = "go", - srcs = ["go.bzl"], - deps = [ - "//web/internal:wrap_web_test_suite", - # should depend on @io_bazel_rules_go//go:def.bzl - ], -) - bzl_library( name = "java", srcs = ["java.bzl"], @@ -50,24 +42,15 @@ bzl_library( deps = ["//web/internal:wrap_web_test_suite"], ) -bzl_library( - name = "scala", - srcs = ["scala.bzl"], - deps = [ - "//web/internal:wrap_web_test_suite", - # should depend on @io_bazel_rules_scala//scala:scala.bzl - ], -) - bzl_library( name = "web", srcs = ["web.bzl"], deps = [ "//web/internal:browser", "//web/internal:constants", - "//web/internal:platform_metadata", - "//web/internal:platform_archive", "//web/internal:custom_browser", + "//web/internal:platform_archive", + "//web/internal:platform_metadata", "//web/internal:web_test", "//web/internal:web_test_config", "//web/internal:web_test_files", diff --git a/web/internal/BUILD.bazel b/web/internal/BUILD.bazel index d92ea949..582fef40 100644 --- a/web/internal/BUILD.bazel +++ b/web/internal/BUILD.bazel @@ -18,7 +18,7 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") package( default_testonly = True, - default_visibility = ["//web:__subpackages__"], + default_visibility = ["//visibility:public"], ) licenses(["notice"]) # Apache 2.0 diff --git a/web/web_go/MODULE.bazel b/web/web_go/MODULE.bazel new file mode 100644 index 00000000..7bfa121f --- /dev/null +++ b/web/web_go/MODULE.bazel @@ -0,0 +1,60 @@ +module( + name = "rules_webtesting_web_go", + version = "0.4.0", +) + +bazel_dep( + name = "rules_webtesting", +) + +local_path_override( + module_name = "rules_webtesting", + path = "../..", +) + +bazel_dep( + name = "bazel_skylib", + version = "1.7.1", +) + +bazel_dep( + name = "rules_jvm_external", + version = "6.6", +) + +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") + +maven.install( + artifacts = [ + "com.google.guava:guava:33.2.1-jre", + "org.seleniumhq.selenium:selenium-remote-driver:4.27.0", + "org.seleniumhq.selenium:selenium-api:4.27.0", + "junit:junit:4.13.2", + ], +) + +use_repo(maven, "maven") + +##### Go dependencies ##### +bazel_dep( + name = "rules_go", + version = "0.51.0-rc1", + repo_name = "io_bazel_rules_go", +) + +bazel_dep( + name = "gazelle", + version = "0.40.0", + repo_name = "bazel_gazelle", +) + +go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") + +go_deps.from_file(go_mod = "//:go.mod") + +# All *direct* Go dependencies of the module have to be listed explicitly. +use_repo( + go_deps, + "com_github_gorilla_mux", + "com_github_tebeka_selenium", +) diff --git a/web/web_go/go/BUILD.bazel b/web/web_go/go/BUILD.bazel new file mode 100644 index 00000000..de41e9e4 --- /dev/null +++ b/web/web_go/go/BUILD.bazel @@ -0,0 +1,32 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("@rules_webtesting//web:web.bzl", "web_test_config") + +package( + default_testonly = True, + default_visibility = ["//visibility:public"], +) + +bzl_library( + name = "go", + srcs = ["go.bzl"], + deps = [ + "@rules_webtesting//web/internal:wrap_web_test_suite", + # should depend on @io_bazel_rules_go//go:def.bzl + ], +) diff --git a/web/web_go/go/go.bzl b/web/web_go/go/go.bzl new file mode 100644 index 00000000..183226b8 --- /dev/null +++ b/web/web_go/go/go.bzl @@ -0,0 +1,33 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Web Test rules for Go.""" + +load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@rules_webtesting//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") +load("@rules_webtesting//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") + +def go_web_test_suite(name, go_test_tags = DEFAULT_WRAPPED_TEST_TAGS, **kwargs): + """Defines a test_suite of web_test targets that wrap a go_test target. + + Args: + name: The base name of the test. + go_test_tags: A list of test tag strings to use for the go_test target. + **kwargs: Arguments for wrapped_web_test_suite + """ + wrap_web_test_suite( + name = name, + rule = go_test, + wrapped_test_tags = go_test_tags, + **kwargs + ) diff --git a/web/web_go/gotests/BUILD.bazel b/web/web_go/gotests/BUILD.bazel new file mode 100644 index 00000000..e69de29b diff --git a/web/web_java/MODULE.bazel b/web/web_java/MODULE.bazel new file mode 100644 index 00000000..fc33e8cf --- /dev/null +++ b/web/web_java/MODULE.bazel @@ -0,0 +1,36 @@ +module( + name = "rules_webtesting_web_java", + version = "0.4.0", +) + +bazel_dep( + name = "rules_webtesting", +) + +local_path_override( + module_name = "rules_webtesting", + path = "../..", +) + +bazel_dep( + name = "bazel_skylib", + version = "1.7.1", +) + +bazel_dep( + name = "rules_jvm_external", + version = "6.6", +) + +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") + +maven.install( + artifacts = [ + "com.google.guava:guava:33.2.1-jre", + "org.seleniumhq.selenium:selenium-remote-driver:4.27.0", + "org.seleniumhq.selenium:selenium-api:4.27.0", + "junit:junit:4.13.2", + ], +) + +use_repo(maven, "maven") diff --git a/web/web_java/java/BUILD.bazel b/web/web_java/java/BUILD.bazel new file mode 100644 index 00000000..67a7da87 --- /dev/null +++ b/web/web_java/java/BUILD.bazel @@ -0,0 +1,29 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("@rules_webtesting//web:web.bzl", "web_test_config") + +package( + default_testonly = True, + default_visibility = ["//visibility:public"], +) + +bzl_library( + name = "java", + srcs = ["java.bzl"], + deps = ["@rules_webtesting//web/internal:wrap_web_test_suite"], +) diff --git a/web/java.bzl b/web/web_java/java/java.bzl similarity index 83% rename from web/java.bzl rename to web/web_java/java/java.bzl index 359425ad..b6476ea5 100644 --- a/web/java.bzl +++ b/web/web_java/java/java.bzl @@ -13,8 +13,8 @@ # limitations under the License. """Web Test rules for Java.""" -load("//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") -load("//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") +load("@rules_webtesting//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") +load("@rules_webtesting//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") def java_web_test_suite(name, java_test_tags = DEFAULT_WRAPPED_TEST_TAGS, test_class = None, **kwargs): """Defines a test_suite of web_test targets that wrap a java_test target. @@ -29,6 +29,7 @@ def java_web_test_suite(name, java_test_tags = DEFAULT_WRAPPED_TEST_TAGS, test_c test_package = native.package_name().replace("javatests/", "") test_package = test_package.replace("/", ".") test_class = test_package + "." + name + print("test class is" + str(test_class) + "," + "the native class is" + str(native.package_name())) wrap_web_test_suite( name = name, diff --git a/javatests/com/google/testing/web/BUILD.bazel b/web/web_java/javatests/com/google/testing/web/BUILD.bazel similarity index 73% rename from javatests/com/google/testing/web/BUILD.bazel rename to web/web_java/javatests/com/google/testing/web/BUILD.bazel index 7499d4c4..d72c3919 100644 --- a/javatests/com/google/testing/web/BUILD.bazel +++ b/web/web_java/javatests/com/google/testing/web/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("//web:java.bzl", "java_web_test_suite") +load("//java:java.bzl", "java_web_test_suite") licenses(["notice"]) # Apache 2.0 @@ -22,14 +22,14 @@ java_web_test_suite( name = "WebTestTest", srcs = ["WebTestTest.java"], browsers = [ - "//browsers:chromium-local", - "//browsers:firefox-local", - "//browsers/sauce:chrome-win10", - "//browsers/sauce:chrome-win10-connect", + "@rules_webtesting//browsers:chromium-local", + "@rules_webtesting//browsers:firefox-local", + "@rules_webtesting//browsers/sauce:chrome-win10", + "@rules_webtesting//browsers/sauce:chrome-win10-connect", ], deps = [ - "//java/com/google/testing/web", "@maven//:junit_junit", "@maven//:org_seleniumhq_selenium_selenium_api", + "@rules_webtesting//java/com/google/testing/web", ], ) diff --git a/javatests/com/google/testing/web/WebTestTest.java b/web/web_java/javatests/com/google/testing/web/WebTestTest.java similarity index 99% rename from javatests/com/google/testing/web/WebTestTest.java rename to web/web_java/javatests/com/google/testing/web/WebTestTest.java index 922a1cb0..cf924af7 100644 --- a/javatests/com/google/testing/web/WebTestTest.java +++ b/web/web_java/javatests/com/google/testing/web/WebTestTest.java @@ -31,4 +31,4 @@ public void newWebDriverSession() { driver.get(wt.HTTPAddress().resolve("/healthz").toString()); driver.quit(); } -} +} \ No newline at end of file diff --git a/web/web_python/BUILD.bazel b/web/web_python/BUILD.bazel new file mode 100644 index 00000000..b5ad4b8c --- /dev/null +++ b/web/web_python/BUILD.bazel @@ -0,0 +1,28 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# +load("@python_versions//3.11:defs.bzl", "compile_pip_requirements") + +licenses(["notice"]) # Apache 2.0 + +exports_files(["LICENSE"]) + +compile_pip_requirements( + name = "requirements", + requirements_in = "requirements.in", + requirements_txt = "requirements_lock.txt", + requirements_windows = "requirements_lock_windows.txt", +) diff --git a/web/web_python/MODULE.bazel b/web/web_python/MODULE.bazel new file mode 100644 index 00000000..94bf78de --- /dev/null +++ b/web/web_python/MODULE.bazel @@ -0,0 +1,43 @@ +module( + name = "rules_webtesting_web_java", + version = "0.4.0", +) + +bazel_dep( + name = "bazel_skylib", + version = "1.7.1", +) + +bazel_dep( + name = "rules_webtesting", +) + +local_path_override( + module_name = "rules_webtesting", + path = "../..", +) + +bazel_dep( + name = "rules_python", + version = "1.0.0", +) + +python = use_extension("@rules_python//python/extensions:python.bzl", "python") + +python.toolchain( + is_default = True, + python_version = "3.11", +) + +use_repo(python, "python_3_11", "python_versions") + +pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") + +pip.parse( + hub_name = "rules_webtesting_py_deps", + python_version = "3.11", + requirements_lock = "//:requirements_lock.txt", + requirements_windows = "requirements_lock_windows.txt", +) + +use_repo(pip, "rules_webtesting_py_deps") diff --git a/web/web_python/python/BUILD.bazel b/web/web_python/python/BUILD.bazel new file mode 100644 index 00000000..0c5a2bc8 --- /dev/null +++ b/web/web_python/python/BUILD.bazel @@ -0,0 +1,29 @@ +# Copyright 2024 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("@rules_webtesting//web:web.bzl", "web_test_config") + +package( + default_testonly = True, + default_visibility = ["//visibility:public"], +) + +bzl_library( + name = "py", + srcs = ["py.bzl"], + deps = ["@rules_webtesting//web/internal:wrap_web_test_suite"], +) diff --git a/web/web_python/python/py.bzl b/web/web_python/python/py.bzl new file mode 100644 index 00000000..3a641736 --- /dev/null +++ b/web/web_python/python/py.bzl @@ -0,0 +1,37 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Web Test rules for Python.""" + +load("@rules_webtesting//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") +load("@rules_webtesting//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") + +def py_web_test_suite(name, py_test_tags = DEFAULT_WRAPPED_TEST_TAGS, main = None, **kwargs): + """Defines a test_suite of web_test targets that wrap a py_test target. + + Args: + name: The base name of the test. + py_test_tags: A list of test tag strings to use for the py_test target. + main: Optional; default computed from name. + **kwargs: Arguments for wrapped_web_test_suite + """ + if main == None: + main = name + ".py" + + wrap_web_test_suite( + name = name, + main = main, + rule = native.py_test, + wrapped_test_tags = py_test_tags, + **kwargs + ) diff --git a/web/web_python/pythontests/BUILD.bazel b/web/web_python/pythontests/BUILD.bazel new file mode 100644 index 00000000..1efe201a --- /dev/null +++ b/web/web_python/pythontests/BUILD.bazel @@ -0,0 +1,62 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# +load("//python:py.bzl", "py_web_test_suite") + +licenses(["notice"]) # Apache 2.0 + +py_library( + name = "web", + testonly = True, + srcs = glob( + ["*.py"], + exclude = ["*_test.py"], + ), + visibility = ["//visibility:public"], + deps = [ + "@rules_webtesting_py_deps//selenium", + ], +) + +py_web_test_suite( + name = "webtest_test", + srcs = ["webtest_test.py"], + browsers = [ + "@rules_webtesting//browsers:chromium-local", + "@rules_webtesting//browsers:firefox-local", + "@rules_webtesting//browsers/sauce:chrome-win10", + "@rules_webtesting//browsers/sauce:chrome-win10-connect", + ], + tags = { + "chromium-local": [ + "native", + ], + "chrome-win10": [ + "exclusive", + "sauce", + "notravis", + ], + "chrome-win10-connect": [ + "exclusive", + "noci", + "sauce", + ], + "firefox-local": [ + "native", + ], + }, + deps = [":web"], +) diff --git a/web/web_python/pythontests/webtest.py b/web/web_python/pythontests/webtest.py new file mode 100644 index 00000000..5e3fd490 --- /dev/null +++ b/web/web_python/pythontests/webtest.py @@ -0,0 +1,59 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Browser provisioning and information API. + +Provision a browser: + from testing.web import webtest + + driver = webtest.new_webdriver_session() + +Provision a browser with capabilities: + capabilities = {"webdriver.logging.profiler.enabled": true} + driver = webtest.new_webdriver_session(capabilities) +""" +import os + +from selenium.webdriver.remote import remote_connection +from selenium.webdriver.remote import webdriver + + +def new_webdriver_session(capabilities=None): + """Provisions a new WebDriver session. + + Args: + capabilities: a dict with the json capabilities desired for this browser + session. + + Returns: + A new WebDriver connected to a browser defined by the web test + environment. + """ + capabilities = capabilities or {} + address = os.environ['WEB_TEST_WEBDRIVER_SERVER'].rstrip('/') + + # Set the timeout for WebDriver http requests so that the socket default + # timeout is not used. + remote_connection.RemoteConnection.set_timeout(450) + + return webdriver.WebDriver(address, desired_capabilities=capabilities) + + +def http_address(): + """Return the HTTP address of WTL.""" + return os.environ['WEB_TEST_HTTP_SERVER'] + + +def https_address(): + """Return the HTTPS address of WTL.""" + return os.environ['WEB_TEST_HTTPS_SERVER'] diff --git a/web/web_python/pythontests/webtest_test.py b/web/web_python/pythontests/webtest_test.py new file mode 100644 index 00000000..bcaa4a1d --- /dev/null +++ b/web/web_python/pythontests/webtest_test.py @@ -0,0 +1,47 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Tests for testing.web.webtest.""" + +import unittest + +from testing.web import webtest + + +class BrowserTest(unittest.TestCase): + + def testBrowserProvisioningNoCaps(self): + driver = webtest.new_webdriver_session() + + try: + driver.get(webtest.http_address() + "/healthz") + self.assertTrue(driver.current_url) + finally: + driver.quit() + + def testBrowserProvisioningWithCaps(self): + capabilities = { + "acceptInsecureCerts": False, + "pageLoadStrategy": "normal", + } + driver = webtest.new_webdriver_session(capabilities) + + try: + driver.get(webtest.http_address() + "/healthz") + self.assertTrue(driver.current_url) + finally: + driver.quit() + + +if __name__ == "__main__": + unittest.main() diff --git a/web/web_python/requirements_lock.txt b/web/web_python/requirements_lock.txt new file mode 100644 index 00000000..423b3ab0 --- /dev/null +++ b/web/web_python/requirements_lock.txt @@ -0,0 +1,71 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# bazel run //:requirements.update +# +attrs==24.2.0 \ + --hash=sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346 \ + --hash=sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2 + # via + # outcome + # trio +certifi==2024.8.30 \ + --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ + --hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9 + # via selenium +h11==0.14.0 \ + --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ + --hash=sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761 + # via wsproto +idna==3.10 \ + --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ + --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 + # via trio +outcome==1.3.0.post0 \ + --hash=sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8 \ + --hash=sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b + # via trio +pysocks==1.7.1 \ + --hash=sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299 \ + --hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5 \ + --hash=sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0 + # via urllib3 +selenium==4.27.1 \ + --hash=sha256:5296c425a75ff1b44d0d5199042b36a6d1ef76c04fb775b97b40be739a9caae2 \ + --hash=sha256:b89b1f62b5cfe8025868556fe82360d6b649d464f75d2655cb966c8f8447ea18 + # via -r requirements.in +sniffio==1.3.1 \ + --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ + --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc + # via trio +sortedcontainers==2.4.0 \ + --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ + --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 + # via trio +trio==0.27.0 \ + --hash=sha256:1dcc95ab1726b2da054afea8fd761af74bad79bd52381b84eae408e983c76831 \ + --hash=sha256:68eabbcf8f457d925df62da780eff15ff5dc68fd6b367e2dde59f7aaf2a0b884 + # via + # selenium + # trio-websocket +trio-websocket==0.11.1 \ + --hash=sha256:18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f \ + --hash=sha256:520d046b0d030cf970b8b2b2e00c4c2245b3807853ecd44214acd33d74581638 + # via selenium +typing-extensions==4.12.2 \ + --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ + --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 + # via selenium +urllib3[socks]==2.2.3 \ + --hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \ + --hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9 + # via selenium +websocket-client==1.8.0 \ + --hash=sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526 \ + --hash=sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da + # via selenium +wsproto==1.2.0 \ + --hash=sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065 \ + --hash=sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736 + # via trio-websocket diff --git a/web/web_python/requirements_lock_windows.txt b/web/web_python/requirements_lock_windows.txt new file mode 100644 index 00000000..d94eee74 --- /dev/null +++ b/web/web_python/requirements_lock_windows.txt @@ -0,0 +1,144 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# bazel run //:requirements.update +# +attrs==24.2.0 \ + --hash=sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346 \ + --hash=sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2 + # via + # outcome + # trio +certifi==2024.8.30 \ + --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ + --hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9 + # via selenium +cffi==1.17.1 \ + --hash=sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8 \ + --hash=sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2 \ + --hash=sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1 \ + --hash=sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15 \ + --hash=sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36 \ + --hash=sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824 \ + --hash=sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8 \ + --hash=sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36 \ + --hash=sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17 \ + --hash=sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf \ + --hash=sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc \ + --hash=sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3 \ + --hash=sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed \ + --hash=sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702 \ + --hash=sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1 \ + --hash=sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8 \ + --hash=sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903 \ + --hash=sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6 \ + --hash=sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d \ + --hash=sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b \ + --hash=sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e \ + --hash=sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be \ + --hash=sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c \ + --hash=sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683 \ + --hash=sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9 \ + --hash=sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c \ + --hash=sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8 \ + --hash=sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1 \ + --hash=sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4 \ + --hash=sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655 \ + --hash=sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67 \ + --hash=sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595 \ + --hash=sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0 \ + --hash=sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65 \ + --hash=sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41 \ + --hash=sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6 \ + --hash=sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401 \ + --hash=sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6 \ + --hash=sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3 \ + --hash=sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16 \ + --hash=sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93 \ + --hash=sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e \ + --hash=sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4 \ + --hash=sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964 \ + --hash=sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c \ + --hash=sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576 \ + --hash=sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0 \ + --hash=sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3 \ + --hash=sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662 \ + --hash=sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3 \ + --hash=sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff \ + --hash=sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5 \ + --hash=sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd \ + --hash=sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f \ + --hash=sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5 \ + --hash=sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14 \ + --hash=sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d \ + --hash=sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9 \ + --hash=sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7 \ + --hash=sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382 \ + --hash=sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a \ + --hash=sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e \ + --hash=sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a \ + --hash=sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4 \ + --hash=sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99 \ + --hash=sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87 \ + --hash=sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b + # via trio +h11==0.14.0 \ + --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ + --hash=sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761 + # via wsproto +idna==3.10 \ + --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ + --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 + # via trio +outcome==1.3.0.post0 \ + --hash=sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8 \ + --hash=sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b + # via trio +pycparser==2.22 \ + --hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \ + --hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc + # via cffi +pysocks==1.7.1 \ + --hash=sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299 \ + --hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5 \ + --hash=sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0 + # via urllib3 +selenium==4.27.1 \ + --hash=sha256:5296c425a75ff1b44d0d5199042b36a6d1ef76c04fb775b97b40be739a9caae2 \ + --hash=sha256:b89b1f62b5cfe8025868556fe82360d6b649d464f75d2655cb966c8f8447ea18 + # via -r requirements.in +sniffio==1.3.1 \ + --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ + --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc + # via trio +sortedcontainers==2.4.0 \ + --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ + --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 + # via trio +trio==0.27.0 \ + --hash=sha256:1dcc95ab1726b2da054afea8fd761af74bad79bd52381b84eae408e983c76831 \ + --hash=sha256:68eabbcf8f457d925df62da780eff15ff5dc68fd6b367e2dde59f7aaf2a0b884 + # via + # selenium + # trio-websocket +trio-websocket==0.11.1 \ + --hash=sha256:18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f \ + --hash=sha256:520d046b0d030cf970b8b2b2e00c4c2245b3807853ecd44214acd33d74581638 + # via selenium +typing-extensions==4.12.2 \ + --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ + --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 + # via selenium +urllib3[socks]==2.2.3 \ + --hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \ + --hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9 + # via selenium +websocket-client==1.8.0 \ + --hash=sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526 \ + --hash=sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da + # via selenium +wsproto==1.2.0 \ + --hash=sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065 \ + --hash=sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736 + # via trio-websocket diff --git a/web/scala/MODULE.bazel b/web/web_scala/MODULE.bazel similarity index 95% rename from web/scala/MODULE.bazel rename to web/web_scala/MODULE.bazel index 3e239144..8b329fae 100644 --- a/web/scala/MODULE.bazel +++ b/web/web_scala/MODULE.bazel @@ -12,6 +12,11 @@ local_path_override( path = "../..", ) +bazel_dep( + name = "bazel_skylib", + version = "1.7.1", +) + ##### Scala dependencies ##### bazel_dep( name = "rules_scala", diff --git a/web/web_scala/scala/BUILD.bazel b/web/web_scala/scala/BUILD.bazel new file mode 100644 index 00000000..71796c11 --- /dev/null +++ b/web/web_scala/scala/BUILD.bazel @@ -0,0 +1,32 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("@rules_webtesting//web:web.bzl", "web_test_config") + +package( + default_testonly = True, + default_visibility = ["//visibility:public"], +) + +bzl_library( + name = "scala", + srcs = ["scala.bzl"], + deps = [ + "@rules_webtesting//web/internal:wrap_web_test_suite", + # should depend on @io_bazel_rules_scala//scala:scala.bzl + ], +) diff --git a/web/scala/scala.bzl b/web/web_scala/scala/scala.bzl similarity index 100% rename from web/scala/scala.bzl rename to web/web_scala/scala/scala.bzl diff --git a/web/scala/BUILD.bazel b/web/web_scala/scalatests/BUILD.bazel similarity index 96% rename from web/scala/BUILD.bazel rename to web/web_scala/scalatests/BUILD.bazel index 82a352d7..8a97543e 100644 --- a/web/scala/BUILD.bazel +++ b/web/web_scala/scalatests/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("//:scala.bzl", "scala_web_test_suite") +load("//scala:scala.bzl", "scala_web_test_suite") licenses(["notice"]) # Apache 2.0 diff --git a/web/scala/WebTestTest.scala b/web/web_scala/scalatests/WebTestTest.scala similarity index 100% rename from web/scala/WebTestTest.scala rename to web/web_scala/scalatests/WebTestTest.scala From cd977d28f63f058f523f1a3d03dc00c4988aa57e Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Sat, 15 Mar 2025 02:11:30 +0000 Subject: [PATCH 004/107] Refactor web submodules --- BUILD.bazel | 9 - {web/web_go/go => go/web}/BUILD.bazel | 0 {web/web_go/go => go/web}/go.bzl | 0 go/webdriver/BUILD.bazel | 2 +- go/webtest/BUILD.bazel | 19 +- go/wtl/proxy/BUILD.bazel | 5 +- .../proxy/driverhub/quithandler/BUILD.bazel | 5 +- .../proxy/driverhub/scripttimeout/BUILD.bazel | 5 +- testing/web/BUILD.bazel | 62 ------ testing/web/debugger/BUILD.bazel | 22 --- testing/web/debugger/debugger.py | 179 ------------------ testing/web/webtest.py | 59 ------ testing/web/webtest_test.py | 47 ----- web/BUILD.bazel | 12 -- web/go.bzl | 33 ---- web/internal/executable_name.bzl | 8 +- web/py.bzl | 37 ---- web/web_go/MODULE.bazel | 60 ------ web/web_go/gotests/BUILD.bazel | 0 web/web_python/pythontests/webtest.py | 2 +- web/web_python/pythontests/webtest_test.py | 5 +- web/web_python/requirements.in | 1 + 22 files changed, 28 insertions(+), 544 deletions(-) rename {web/web_go/go => go/web}/BUILD.bazel (100%) rename {web/web_go/go => go/web}/go.bzl (100%) delete mode 100644 testing/web/BUILD.bazel delete mode 100644 testing/web/debugger/BUILD.bazel delete mode 100644 testing/web/debugger/debugger.py delete mode 100644 testing/web/webtest.py delete mode 100644 testing/web/webtest_test.py delete mode 100644 web/go.bzl delete mode 100644 web/py.bzl delete mode 100644 web/web_go/MODULE.bazel delete mode 100644 web/web_go/gotests/BUILD.bazel create mode 100644 web/web_python/requirements.in diff --git a/BUILD.bazel b/BUILD.bazel index af1d9d52..ab52bbb1 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -15,7 +15,6 @@ ################################################################################ # load("@bazel_gazelle//:def.bzl", "gazelle") -load("@python_versions//3.11:defs.bzl", "compile_pip_requirements") licenses(["notice"]) # Apache 2.0 @@ -25,11 +24,3 @@ gazelle( name = "gazelle", prefix = "github.com/bazelbuild/rules_webtesting", ) - -compile_pip_requirements( - name = "requirements", - requirements_in = "requirements.in", - requirements_txt = "requirements_lock.txt", - requirements_windows = "requirements_lock_windows.txt", -) - diff --git a/web/web_go/go/BUILD.bazel b/go/web/BUILD.bazel similarity index 100% rename from web/web_go/go/BUILD.bazel rename to go/web/BUILD.bazel diff --git a/web/web_go/go/go.bzl b/go/web/go.bzl similarity index 100% rename from web/web_go/go/go.bzl rename to go/web/go.bzl diff --git a/go/webdriver/BUILD.bazel b/go/webdriver/BUILD.bazel index 14c71c9e..c73692f1 100644 --- a/go/webdriver/BUILD.bazel +++ b/go/webdriver/BUILD.bazel @@ -14,8 +14,8 @@ # ################################################################################ # -load("//web:go.bzl", "go_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("//go/web:go.bzl", "go_web_test_suite") licenses(["notice"]) # Apache 2.0 diff --git a/go/webtest/BUILD.bazel b/go/webtest/BUILD.bazel index 7a268cf7..74974add 100644 --- a/go/webtest/BUILD.bazel +++ b/go/webtest/BUILD.bazel @@ -1,3 +1,5 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +16,7 @@ # ################################################################################ # -load("//web:go.bzl", "go_web_test_suite") -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@rules_webtesting//go/web:go.bzl", "go_web_test_suite") licenses(["notice"]) # Apache 2.0 @@ -25,9 +26,9 @@ go_library( importpath = "github.com/bazelbuild/rules_webtesting/go/webtest", visibility = ["//visibility:public"], deps = [ - "//go/bazel:go_default_library", - "//go/metadata:go_default_library", "@com_github_tebeka_selenium//:go_default_library", + "@rules_webtesting//go/bazel:go_default_library", + "@rules_webtesting//go/metadata:go_default_library", ], ) @@ -38,12 +39,12 @@ go_web_test_suite( "webtest_test.go", ], browsers = [ - "//browsers:chromium-local", - "//browsers:firefox-local", - "//browsers/sauce:chrome-win10", - "//browsers/sauce:chrome-win10-connect", + "@rules_webtesting//browsers:chromium-local", + "@rules_webtesting//browsers:firefox-local", + "@rules_webtesting//browsers/sauce:chrome-win10", + "@rules_webtesting//browsers/sauce:chrome-win10-connect", ], - data = ["//testdata"], + data = ["@rules_webtesting//testdata"], embed = [":go_default_library"], deps = ["@com_github_tebeka_selenium//:go_default_library"], ) diff --git a/go/wtl/proxy/BUILD.bazel b/go/wtl/proxy/BUILD.bazel index bdea0d24..91cc4cad 100644 --- a/go/wtl/proxy/BUILD.bazel +++ b/go/wtl/proxy/BUILD.bazel @@ -1,3 +1,5 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +16,7 @@ # ################################################################################ # -load("//web:go.bzl", "go_web_test_suite") -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("//go/web:go.bzl", "go_web_test_suite") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/driverhub/quithandler/BUILD.bazel b/go/wtl/proxy/driverhub/quithandler/BUILD.bazel index 66ca5f26..23436758 100644 --- a/go/wtl/proxy/driverhub/quithandler/BUILD.bazel +++ b/go/wtl/proxy/driverhub/quithandler/BUILD.bazel @@ -1,3 +1,5 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +16,7 @@ # ################################################################################ # -load("//web:go.bzl", "go_web_test_suite") -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("//go/web:go.bzl", "go_web_test_suite") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel b/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel index dfb2e78e..d977f318 100644 --- a/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel +++ b/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel @@ -1,3 +1,5 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +16,7 @@ # ################################################################################ # -load("//web:go.bzl", "go_web_test_suite") -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("//go/web:go.bzl", "go_web_test_suite") licenses(["notice"]) # Apache 2.0 diff --git a/testing/web/BUILD.bazel b/testing/web/BUILD.bazel deleted file mode 100644 index 6c563197..00000000 --- a/testing/web/BUILD.bazel +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ -# -load("//web:py.bzl", "py_web_test_suite") - -licenses(["notice"]) # Apache 2.0 - -py_library( - name = "web", - testonly = True, - srcs = glob( - ["*.py"], - exclude = ["*_test.py"], - ), - visibility = ["//visibility:public"], - deps = [ - "@rules_webtesting_py_deps//selenium", - ], -) - -py_web_test_suite( - name = "webtest_test", - srcs = ["webtest_test.py"], - browsers = [ - "//browsers:chromium-local", - "//browsers:firefox-local", - "//browsers/sauce:chrome-win10", - "//browsers/sauce:chrome-win10-connect", - ], - tags = { - "chromium-local": [ - "native", - ], - "chrome-win10": [ - "exclusive", - "sauce", - "notravis", - ], - "chrome-win10-connect": [ - "exclusive", - "noci", - "sauce", - ], - "firefox-local": [ - "native", - ], - }, - deps = [":web"], -) diff --git a/testing/web/debugger/BUILD.bazel b/testing/web/debugger/BUILD.bazel deleted file mode 100644 index 16cfb1f0..00000000 --- a/testing/web/debugger/BUILD.bazel +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ -# -licenses(["notice"]) # Apache 2.0 - -py_binary( - name = "debugger", - srcs = glob(["*.py"]), -) diff --git a/testing/web/debugger/debugger.py b/testing/web/debugger/debugger.py deleted file mode 100644 index 41f0fa0e..00000000 --- a/testing/web/debugger/debugger.py +++ /dev/null @@ -1,179 +0,0 @@ -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Web Test Launcher Debugger Front-End.""" - -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -import code -import getpass -import hashlib -import json -import socket -import sys -from six.moves import urllib - - -class Debugger: - """Debugger connects to the WTL debugger and sends and receives messages.""" - - def __init__(self, port, host="localhost"): - self._conn = socket.create_connection(address=(host, port)) - self._file = self._conn.makefile(mode="w") - self._decoder = json.JSONDecoder() - self._next_id = 1 - self._buffer = "" - - def _get_next_id(self): - id = self._next_id - self._next_id = self._next_id + 1 - return id - - def _read_next(self): - while True: - try: - self._buffer = self._buffer.strip() - obj, p = self._decoder.raw_decode(self._buffer) - self._buffer = self._buffer[p:] - return obj - except: - pass - s = self._conn.recv(4096).decode("utf-8") - if s == "": - quit() - self._buffer = self._buffer + s - - def _read_until_waiting(self): - while True: - n = self._read_next() - print(n) - if n["status"] != "running": - return - - def step(self): - """Execute the waiting WebDriver command and stop at the next one.""" - id = self._get_next_id() - json.dump(obj={"id": id, "command": "step"}, fp=self._file) - self._file.flush() - self._read_until_waiting() - - def run(self): - """Execute WebDriver commands until a breakpoint is reached.""" - id = self._get_next_id() - json.dump(obj={"id": id, "command": "continue"}, fp=self._file) - self._file.flush() - self._read_until_waiting() - - def stop(self): - """Quit WTL and the debugger.""" - id = self._get_next_id() - json.dump(obj={"id": id, "command": "stop"}, fp=self._file) - self._file.flush() - quit() - - def set_breakpoint(self, path=None, methods=None, body=None): - """Set a WTL breakpoint. - - Args: - path: string, Go regular expression to compare to WebDriver command paths. - methods: list of strings, a list of HTTP methods ("POST", "GET", etc). - body: string, Go regular expression to compare to body of WebDriver - command. - - Returns: - int, id of the breakpoint (can be used in delete_breakpoint command). - """ - id = self._get_next_id() - - bp = {"id": id} - if path: - bp["path"] = path - if methods: - bp["methods"] = methods - if body: - bp["body"] = body - - json.dump( - obj={ - "id": id, - "command": "set breakpoint", - "breakpoint": bp, - }, - fp=self._file) - self._file.flush() - self._read_until_waiting() - return id - - def delete_breakpoint(self, breakpoint_id): - """Delete a previously set WTL breakpoint. - - Args: - breakpoint_id: int, id of the breakpoint to delete. - """ - id = self._get_next_id() - - json.dump( - obj={ - "id": id, - "command": "delete breakpoint", - "breakpoint": { - "id": breakpoint_id - }, - }, - fp=self._file) - self._file.flush() - self._read_until_waiting() - - -def collect_analytics(): - try: - urllib.request.urlopen( - "http://www.google-analytics.com/collect?v=1&aip=1&tid=UA-52159295-3" - "&t=screenview&cd=start&an=WTL+Debugger&uid=" + - hashlib.md5(getpass.getuser()).hexdigest()).close - except: - # Error collecting usage - pass - - -def main(args): - host = "localhost" - if len(args) == 2: - port = args[1] - elif len(args) == 3: - host = args[1] - port = args[2] - else: - print("Usage %s [host] port") - quit() - - wtl = Debugger(host=host, port=port) - - collect_analytics() - - code.interact( - """ -\033[95m\033[1mPython Interactive Console\033[0m - -Debugger Commands: - wtl.run(): Run test until next WTL breakpoint. - wtl.step(): Execute the current waiting command and break at the next one. - wtl.stop(): Quit WTL and the Debugger. - help(wtl): Additional debugger commands. -""", - local={"wtl": wtl}) - - -if __name__ == "__main__": - main(sys.argv) diff --git a/testing/web/webtest.py b/testing/web/webtest.py deleted file mode 100644 index 5e3fd490..00000000 --- a/testing/web/webtest.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Browser provisioning and information API. - -Provision a browser: - from testing.web import webtest - - driver = webtest.new_webdriver_session() - -Provision a browser with capabilities: - capabilities = {"webdriver.logging.profiler.enabled": true} - driver = webtest.new_webdriver_session(capabilities) -""" -import os - -from selenium.webdriver.remote import remote_connection -from selenium.webdriver.remote import webdriver - - -def new_webdriver_session(capabilities=None): - """Provisions a new WebDriver session. - - Args: - capabilities: a dict with the json capabilities desired for this browser - session. - - Returns: - A new WebDriver connected to a browser defined by the web test - environment. - """ - capabilities = capabilities or {} - address = os.environ['WEB_TEST_WEBDRIVER_SERVER'].rstrip('/') - - # Set the timeout for WebDriver http requests so that the socket default - # timeout is not used. - remote_connection.RemoteConnection.set_timeout(450) - - return webdriver.WebDriver(address, desired_capabilities=capabilities) - - -def http_address(): - """Return the HTTP address of WTL.""" - return os.environ['WEB_TEST_HTTP_SERVER'] - - -def https_address(): - """Return the HTTPS address of WTL.""" - return os.environ['WEB_TEST_HTTPS_SERVER'] diff --git a/testing/web/webtest_test.py b/testing/web/webtest_test.py deleted file mode 100644 index bcaa4a1d..00000000 --- a/testing/web/webtest_test.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Tests for testing.web.webtest.""" - -import unittest - -from testing.web import webtest - - -class BrowserTest(unittest.TestCase): - - def testBrowserProvisioningNoCaps(self): - driver = webtest.new_webdriver_session() - - try: - driver.get(webtest.http_address() + "/healthz") - self.assertTrue(driver.current_url) - finally: - driver.quit() - - def testBrowserProvisioningWithCaps(self): - capabilities = { - "acceptInsecureCerts": False, - "pageLoadStrategy": "normal", - } - driver = webtest.new_webdriver_session(capabilities) - - try: - driver.get(webtest.http_address() + "/healthz") - self.assertTrue(driver.current_url) - finally: - driver.quit() - - -if __name__ == "__main__": - unittest.main() diff --git a/web/BUILD.bazel b/web/BUILD.bazel index 8a09f3b2..71a372e4 100644 --- a/web/BUILD.bazel +++ b/web/BUILD.bazel @@ -30,18 +30,6 @@ web_test_config( visibility = ["//visibility:public"], ) -bzl_library( - name = "java", - srcs = ["java.bzl"], - deps = ["//web/internal:wrap_web_test_suite"], -) - -bzl_library( - name = "py", - srcs = ["py.bzl"], - deps = ["//web/internal:wrap_web_test_suite"], -) - bzl_library( name = "web", srcs = ["web.bzl"], diff --git a/web/go.bzl b/web/go.bzl deleted file mode 100644 index 1168176e..00000000 --- a/web/go.bzl +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Web Test rules for Go.""" - -load("//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") -load("//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") -load("@io_bazel_rules_go//go:def.bzl", "go_test") - -def go_web_test_suite(name, go_test_tags = DEFAULT_WRAPPED_TEST_TAGS, **kwargs): - """Defines a test_suite of web_test targets that wrap a go_test target. - - Args: - name: The base name of the test. - go_test_tags: A list of test tag strings to use for the go_test target. - **kwargs: Arguments for wrapped_web_test_suite - """ - wrap_web_test_suite( - name = name, - rule = go_test, - wrapped_test_tags = go_test_tags, - **kwargs - ) diff --git a/web/internal/executable_name.bzl b/web/internal/executable_name.bzl index b1038686..18f3177d 100644 --- a/web/internal/executable_name.bzl +++ b/web/internal/executable_name.bzl @@ -22,8 +22,8 @@ def get_platform_executable_name(): release output, where the binaries can be referenced using the known file names. """ return select({ - "//common/conditions:linux_x64": "main_linux_x64", - "//common/conditions:macos_x64": "main_darwin_x64", - "//common/conditions:macos_arm64": "main_darwin_arm64", - "//common/conditions:windows_x64": "main_windows_x64.exe", + "@rules_webtesting//common/conditions:linux_x64": "main_linux_x64", + "@rules_webtesting//common/conditions:macos_x64": "main_darwin_x64", + "@rules_webtesting//common/conditions:macos_arm64": "main_darwin_arm64", + "@rules_webtesting//common/conditions:windows_x64": "main_windows_x64.exe", }) diff --git a/web/py.bzl b/web/py.bzl deleted file mode 100644 index 104e7c41..00000000 --- a/web/py.bzl +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Web Test rules for Python.""" - -load("//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") -load("//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") - -def py_web_test_suite(name, py_test_tags = DEFAULT_WRAPPED_TEST_TAGS, main = None, **kwargs): - """Defines a test_suite of web_test targets that wrap a py_test target. - - Args: - name: The base name of the test. - py_test_tags: A list of test tag strings to use for the py_test target. - main: Optional; default computed from name. - **kwargs: Arguments for wrapped_web_test_suite - """ - if main == None: - main = name + ".py" - - wrap_web_test_suite( - name = name, - main = main, - rule = native.py_test, - wrapped_test_tags = py_test_tags, - **kwargs - ) diff --git a/web/web_go/MODULE.bazel b/web/web_go/MODULE.bazel deleted file mode 100644 index 7bfa121f..00000000 --- a/web/web_go/MODULE.bazel +++ /dev/null @@ -1,60 +0,0 @@ -module( - name = "rules_webtesting_web_go", - version = "0.4.0", -) - -bazel_dep( - name = "rules_webtesting", -) - -local_path_override( - module_name = "rules_webtesting", - path = "../..", -) - -bazel_dep( - name = "bazel_skylib", - version = "1.7.1", -) - -bazel_dep( - name = "rules_jvm_external", - version = "6.6", -) - -maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") - -maven.install( - artifacts = [ - "com.google.guava:guava:33.2.1-jre", - "org.seleniumhq.selenium:selenium-remote-driver:4.27.0", - "org.seleniumhq.selenium:selenium-api:4.27.0", - "junit:junit:4.13.2", - ], -) - -use_repo(maven, "maven") - -##### Go dependencies ##### -bazel_dep( - name = "rules_go", - version = "0.51.0-rc1", - repo_name = "io_bazel_rules_go", -) - -bazel_dep( - name = "gazelle", - version = "0.40.0", - repo_name = "bazel_gazelle", -) - -go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") - -go_deps.from_file(go_mod = "//:go.mod") - -# All *direct* Go dependencies of the module have to be listed explicitly. -use_repo( - go_deps, - "com_github_gorilla_mux", - "com_github_tebeka_selenium", -) diff --git a/web/web_go/gotests/BUILD.bazel b/web/web_go/gotests/BUILD.bazel deleted file mode 100644 index e69de29b..00000000 diff --git a/web/web_python/pythontests/webtest.py b/web/web_python/pythontests/webtest.py index 5e3fd490..71458b69 100644 --- a/web/web_python/pythontests/webtest.py +++ b/web/web_python/pythontests/webtest.py @@ -14,7 +14,7 @@ """Browser provisioning and information API. Provision a browser: - from testing.web import webtest + from pythontests import webtest driver = webtest.new_webdriver_session() diff --git a/web/web_python/pythontests/webtest_test.py b/web/web_python/pythontests/webtest_test.py index bcaa4a1d..a140e1ba 100644 --- a/web/web_python/pythontests/webtest_test.py +++ b/web/web_python/pythontests/webtest_test.py @@ -11,12 +11,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Tests for testing.web.webtest.""" +"""Tests for web.web_python.pythontests.""" import unittest -from testing.web import webtest - +from pythontests import webtest class BrowserTest(unittest.TestCase): diff --git a/web/web_python/requirements.in b/web/web_python/requirements.in new file mode 100644 index 00000000..72e055f5 --- /dev/null +++ b/web/web_python/requirements.in @@ -0,0 +1 @@ +selenium==4.27.1 From e3dbc073227a29466efd2b4448bac6cf63f1fe87 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 17 Mar 2025 05:57:30 +0000 Subject: [PATCH 005/107] Refactor more --- requirements.in | 1 - 1 file changed, 1 deletion(-) delete mode 100644 requirements.in diff --git a/requirements.in b/requirements.in deleted file mode 100644 index 72e055f5..00000000 --- a/requirements.in +++ /dev/null @@ -1 +0,0 @@ -selenium==4.27.1 From 921f528f5de23f5cada147be93c954d1da33c10c Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 17 Mar 2025 06:49:36 +0000 Subject: [PATCH 006/107] More polish --- .bazelci/presubmit.yml | 18 ++++++++++++++++++ web_java/BUILD.bazel | 0 {web/web_java => web_java}/MODULE.bazel | 2 +- {web/web_java => web_java}/java/BUILD.bazel | 0 {web/web_java => web_java}/java/java.bzl | 0 .../com/google/testing/web/BUILD.bazel | 0 .../com/google/testing/web/WebTestTest.java | 0 {web/web_python => web_python}/BUILD.bazel | 2 +- {web/web_python => web_python}/MODULE.bazel | 4 ++-- .../python/BUILD.bazel | 0 {web/web_python => web_python}/python/py.bzl | 0 .../pythontests/BUILD.bazel | 2 +- .../pythontests/webtest.py | 0 .../pythontests/webtest_test.py | 0 {web/web_python => web_python}/requirements.in | 0 .../requirements_lock.txt | 0 .../requirements_lock_windows.txt | 0 {web/web_scala => web_scala}/MODULE.bazel | 2 +- {web/web_scala => web_scala}/scala/BUILD.bazel | 0 {web/web_scala => web_scala}/scala/scala.bzl | 0 .../scalatests/BUILD.bazel | 2 +- .../scalatests/WebTestTest.scala | 0 22 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 web_java/BUILD.bazel rename {web/web_java => web_java}/MODULE.bazel (97%) rename {web/web_java => web_java}/java/BUILD.bazel (100%) rename {web/web_java => web_java}/java/java.bzl (100%) rename {web/web_java => web_java}/javatests/com/google/testing/web/BUILD.bazel (100%) rename {web/web_java => web_java}/javatests/com/google/testing/web/WebTestTest.java (100%) rename {web/web_python => web_python}/BUILD.bazel (97%) rename {web/web_python => web_python}/MODULE.bazel (92%) rename {web/web_python => web_python}/python/BUILD.bazel (100%) rename {web/web_python => web_python}/python/py.bzl (100%) rename {web/web_python => web_python}/pythontests/BUILD.bazel (95%) rename {web/web_python => web_python}/pythontests/webtest.py (100%) rename {web/web_python => web_python}/pythontests/webtest_test.py (100%) rename {web/web_python => web_python}/requirements.in (100%) rename {web/web_python => web_python}/requirements_lock.txt (100%) rename {web/web_python => web_python}/requirements_lock_windows.txt (100%) rename {web/web_scala => web_scala}/MODULE.bazel (98%) rename {web/web_scala => web_scala}/scala/BUILD.bazel (100%) rename {web/web_scala => web_scala}/scala/scala.bzl (100%) rename {web/web_scala => web_scala}/scalatests/BUILD.bazel (93%) rename {web/web_scala => web_scala}/scalatests/WebTestTest.scala (100%) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 0d2235f2..baf47b51 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -3,24 +3,42 @@ platforms: ubuntu2204: build_targets: - "//..." + - "-//web_java:all" + - "-//web_python:all" + - "-//web_scala:all" test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" test_targets: - "//..." + - "-//web_java:all" + - "-//web_python:all" + - "-//web_scala:all" macos: build_targets: - "//..." + - "-//web_java:all" + - "-//web_python:all" + - "-//web_scala:all" test_flags: - "--test_tag_filters=-noci,-sauce,-external,-native" test_targets: - "//..." + - "-//web_java:all" + - "-//web_python:all" + - "-//web_scala:all" windows: build_flags: - "--enable_runfiles" build_targets: - "//..." + - "-//web_java:all" + - "-//web_python:all" + - "-//web_scala:all" test_flags: - "--test_tag_filters=-noci,-sauce,-external,-native" - "--enable_runfiles" test_targets: - "//..." + - "-//web_java:all" + - "-//web_python:all" + - "-//web_scala:all" diff --git a/web_java/BUILD.bazel b/web_java/BUILD.bazel new file mode 100644 index 00000000..e69de29b diff --git a/web/web_java/MODULE.bazel b/web_java/MODULE.bazel similarity index 97% rename from web/web_java/MODULE.bazel rename to web_java/MODULE.bazel index fc33e8cf..10a0a24d 100644 --- a/web/web_java/MODULE.bazel +++ b/web_java/MODULE.bazel @@ -9,7 +9,7 @@ bazel_dep( local_path_override( module_name = "rules_webtesting", - path = "../..", + path = "..", ) bazel_dep( diff --git a/web/web_java/java/BUILD.bazel b/web_java/java/BUILD.bazel similarity index 100% rename from web/web_java/java/BUILD.bazel rename to web_java/java/BUILD.bazel diff --git a/web/web_java/java/java.bzl b/web_java/java/java.bzl similarity index 100% rename from web/web_java/java/java.bzl rename to web_java/java/java.bzl diff --git a/web/web_java/javatests/com/google/testing/web/BUILD.bazel b/web_java/javatests/com/google/testing/web/BUILD.bazel similarity index 100% rename from web/web_java/javatests/com/google/testing/web/BUILD.bazel rename to web_java/javatests/com/google/testing/web/BUILD.bazel diff --git a/web/web_java/javatests/com/google/testing/web/WebTestTest.java b/web_java/javatests/com/google/testing/web/WebTestTest.java similarity index 100% rename from web/web_java/javatests/com/google/testing/web/WebTestTest.java rename to web_java/javatests/com/google/testing/web/WebTestTest.java diff --git a/web/web_python/BUILD.bazel b/web_python/BUILD.bazel similarity index 97% rename from web/web_python/BUILD.bazel rename to web_python/BUILD.bazel index b5ad4b8c..d3b5d5c1 100644 --- a/web/web_python/BUILD.bazel +++ b/web_python/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2016 Google Inc. +# Copyright 2024 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/web/web_python/MODULE.bazel b/web_python/MODULE.bazel similarity index 92% rename from web/web_python/MODULE.bazel rename to web_python/MODULE.bazel index 94bf78de..d3d2e2b7 100644 --- a/web/web_python/MODULE.bazel +++ b/web_python/MODULE.bazel @@ -1,5 +1,5 @@ module( - name = "rules_webtesting_web_java", + name = "rules_webtesting_web_python", version = "0.4.0", ) @@ -14,7 +14,7 @@ bazel_dep( local_path_override( module_name = "rules_webtesting", - path = "../..", + path = "..", ) bazel_dep( diff --git a/web/web_python/python/BUILD.bazel b/web_python/python/BUILD.bazel similarity index 100% rename from web/web_python/python/BUILD.bazel rename to web_python/python/BUILD.bazel diff --git a/web/web_python/python/py.bzl b/web_python/python/py.bzl similarity index 100% rename from web/web_python/python/py.bzl rename to web_python/python/py.bzl diff --git a/web/web_python/pythontests/BUILD.bazel b/web_python/pythontests/BUILD.bazel similarity index 95% rename from web/web_python/pythontests/BUILD.bazel rename to web_python/pythontests/BUILD.bazel index 1efe201a..8caf87eb 100644 --- a/web/web_python/pythontests/BUILD.bazel +++ b/web_python/pythontests/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("//python:py.bzl", "py_web_test_suite") +load("@rules_webtesting_web_python//python:py.bzl", "py_web_test_suite") licenses(["notice"]) # Apache 2.0 diff --git a/web/web_python/pythontests/webtest.py b/web_python/pythontests/webtest.py similarity index 100% rename from web/web_python/pythontests/webtest.py rename to web_python/pythontests/webtest.py diff --git a/web/web_python/pythontests/webtest_test.py b/web_python/pythontests/webtest_test.py similarity index 100% rename from web/web_python/pythontests/webtest_test.py rename to web_python/pythontests/webtest_test.py diff --git a/web/web_python/requirements.in b/web_python/requirements.in similarity index 100% rename from web/web_python/requirements.in rename to web_python/requirements.in diff --git a/web/web_python/requirements_lock.txt b/web_python/requirements_lock.txt similarity index 100% rename from web/web_python/requirements_lock.txt rename to web_python/requirements_lock.txt diff --git a/web/web_python/requirements_lock_windows.txt b/web_python/requirements_lock_windows.txt similarity index 100% rename from web/web_python/requirements_lock_windows.txt rename to web_python/requirements_lock_windows.txt diff --git a/web/web_scala/MODULE.bazel b/web_scala/MODULE.bazel similarity index 98% rename from web/web_scala/MODULE.bazel rename to web_scala/MODULE.bazel index 8b329fae..84695e1e 100644 --- a/web/web_scala/MODULE.bazel +++ b/web_scala/MODULE.bazel @@ -9,7 +9,7 @@ bazel_dep( local_path_override( module_name = "rules_webtesting", - path = "../..", + path = "..", ) bazel_dep( diff --git a/web/web_scala/scala/BUILD.bazel b/web_scala/scala/BUILD.bazel similarity index 100% rename from web/web_scala/scala/BUILD.bazel rename to web_scala/scala/BUILD.bazel diff --git a/web/web_scala/scala/scala.bzl b/web_scala/scala/scala.bzl similarity index 100% rename from web/web_scala/scala/scala.bzl rename to web_scala/scala/scala.bzl diff --git a/web/web_scala/scalatests/BUILD.bazel b/web_scala/scalatests/BUILD.bazel similarity index 93% rename from web/web_scala/scalatests/BUILD.bazel rename to web_scala/scalatests/BUILD.bazel index 8a97543e..8ea9f570 100644 --- a/web/web_scala/scalatests/BUILD.bazel +++ b/web_scala/scalatests/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("//scala:scala.bzl", "scala_web_test_suite") +load("@rules_webtesting_web_scala//scala:scala.bzl", "scala_web_test_suite") licenses(["notice"]) # Apache 2.0 diff --git a/web/web_scala/scalatests/WebTestTest.scala b/web_scala/scalatests/WebTestTest.scala similarity index 100% rename from web/web_scala/scalatests/WebTestTest.scala rename to web_scala/scalatests/WebTestTest.scala From 1c4c8b6154f5775b8e7fc0da32a620746944800c Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 17 Mar 2025 06:59:51 +0000 Subject: [PATCH 007/107] Fix presubmit --- .bazelci/presubmit.yml | 18 ------------------ .bazelignore | 3 +++ 2 files changed, 3 insertions(+), 18 deletions(-) create mode 100644 .bazelignore diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index baf47b51..0d2235f2 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -3,42 +3,24 @@ platforms: ubuntu2204: build_targets: - "//..." - - "-//web_java:all" - - "-//web_python:all" - - "-//web_scala:all" test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" test_targets: - "//..." - - "-//web_java:all" - - "-//web_python:all" - - "-//web_scala:all" macos: build_targets: - "//..." - - "-//web_java:all" - - "-//web_python:all" - - "-//web_scala:all" test_flags: - "--test_tag_filters=-noci,-sauce,-external,-native" test_targets: - "//..." - - "-//web_java:all" - - "-//web_python:all" - - "-//web_scala:all" windows: build_flags: - "--enable_runfiles" build_targets: - "//..." - - "-//web_java:all" - - "-//web_python:all" - - "-//web_scala:all" test_flags: - "--test_tag_filters=-noci,-sauce,-external,-native" - "--enable_runfiles" test_targets: - "//..." - - "-//web_java:all" - - "-//web_python:all" - - "-//web_scala:all" diff --git a/.bazelignore b/.bazelignore new file mode 100644 index 00000000..5c42c0c5 --- /dev/null +++ b/.bazelignore @@ -0,0 +1,3 @@ +web_java +web_python +web_scala From ac5737d42a710eb264ca7d79d8e639178885113a Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 17 Mar 2025 18:30:06 +0000 Subject: [PATCH 008/107] Add web modules build script --- MODULE.bazel | 26 -------------------------- build_web_modules.sh | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 26 deletions(-) create mode 100644 build_web_modules.sh diff --git a/MODULE.bazel b/MODULE.bazel index af0ec64a..e2e077b6 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -56,32 +56,6 @@ maven.install( use_repo(maven, "maven") -##### Python dependencies ##### -#bazel_dep( -# name = "rules_python", -# version = "1.0.0", -#) -# -#python = use_extension("@rules_python//python/extensions:python.bzl", "python") -# -#python.toolchain( -# is_default = True, -# python_version = "3.11", -#) -# -#use_repo(python, "python_3_11", "python_versions") -# -#pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") -# -#pip.parse( -# hub_name = "rules_webtesting_py_deps", -# python_version = "3.11", -# requirements_lock = "//:requirements_lock.txt", -# requirements_windows = "requirements_lock_windows.txt", -#) -# -#use_repo(pip, "rules_webtesting_py_deps") - ##### Browsers dependencies ##### browser_repositories = use_extension("//web:extension.bzl", "browser_repositories_extension") diff --git a/build_web_modules.sh b/build_web_modules.sh new file mode 100644 index 00000000..d134651b --- /dev/null +++ b/build_web_modules.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Copyright 2019 Google Inc. All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS-IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -ex + +# Build and test web java and related tests in web_java module +(cd web_java && bazel test ... --java_runtime_version=17) + +# Build and test web python and related tests in web_python module +(cd web_python && bazel test ...) + +# Build and test web scala and related tests in web_scala module +(cd web_scala && bazel test ...) From e20cb797cedc0d48de4df52c700aa5dfac5885ea Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 17 Mar 2025 22:23:04 +0000 Subject: [PATCH 009/107] Modify bazel CI --- .bazelci/presubmit.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 0d2235f2..f33cd97b 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -24,3 +24,12 @@ platforms: - "--enable_runfiles" test_targets: - "//..." +tasks: + web_scala_ubuntu2004: + name: "Scala workspace for web" + platform: ubuntu2004 + test_flags: + - "--test_tag_filters=-noci,-external,-native,-sauce" + build_targets: ["//..."] + test_targets: ["//..."] + working_directory: web_scala From 1d290c0ef0ce96d4bae4b894e71b05044df63315 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 17 Mar 2025 23:02:44 +0000 Subject: [PATCH 010/107] More polish to bazel ci --- .bazelci/presubmit.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index f33cd97b..fad45f62 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -26,10 +26,26 @@ platforms: - "//..." tasks: web_scala_ubuntu2004: - name: "Scala workspace for web" + name: "Scala workspace for web in ubuntun" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: ["//..."] test_targets: ["//..."] working_directory: web_scala + web_scala_macos: + name: "Scala workspace for web in macos" + platform: macos + test_flags: + - "--test_tag_filters=-noci,-external,-native,-sauce" + build_targets: [ "//..." ] + test_targets: [ "//..." ] + working_directory: web_scala + web_scala_windows: + name: "Scala workspace for web in windows" + platform: windows + test_flags: + - "--test_tag_filters=-noci,-external,-native,-sauce" + build_targets: [ "//..." ] + test_targets: [ "//..." ] + working_directory: web_scala \ No newline at end of file From 4e64e912cb93ba72ac9ce83861504f1cf16559b9 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 17 Mar 2025 23:55:19 +0000 Subject: [PATCH 011/107] Revert auto formatting --- .bazelci/presubmit.yml | 52 ++++++++++++++++++++++++++++++-- MODULE.bazel | 31 ++++--------------- go/web/BUILD.bazel | 4 +-- go/webtest/BUILD.bazel | 6 ++-- web/internal/executable_name.bzl | 8 ++--- 5 files changed, 65 insertions(+), 36 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index fad45f62..eb5e6fdf 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -26,7 +26,7 @@ platforms: - "//..." tasks: web_scala_ubuntu2004: - name: "Scala workspace for web in ubuntun" + name: "Scala workspace for web in ubuntu" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" @@ -48,4 +48,52 @@ tasks: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: web_scala \ No newline at end of file + working_directory: web_scala + web_java_ubuntu2004: + name: "Java workspace for web in ubuntu" + platform: ubuntu2004 + test_flags: + - "--test_tag_filters=-noci,-external,-native,-sauce" + build_targets: [ "//..." ] + test_targets: [ "//..." ] + working_directory: web_java + web_java_macos: + name: "Java workspace for web in macos" + platform: macos + test_flags: + - "--test_tag_filters=-noci,-external,-native,-sauce" + build_targets: [ "//..." ] + test_targets: [ "//..." ] + working_directory: web_java + web_java_windows: + name: "Java workspace for web in windows" + platform: windows + test_flags: + - "--test_tag_filters=-noci,-external,-native,-sauce" + build_targets: [ "//..." ] + test_targets: [ "//..." ] + working_directory: web_java + web_python_ubuntu2004: + name: "Python workspace for web in ubuntu" + platform: ubuntu2004 + test_flags: + - "--test_tag_filters=-noci,-external,-native,-sauce" + build_targets: [ "//..." ] + test_targets: [ "//..." ] + working_directory: web_python + web_python_macos: + name: "Python workspace for web in macos" + platform: macos + test_flags: + - "--test_tag_filters=-noci,-external,-native,-sauce" + build_targets: [ "//..." ] + test_targets: [ "//..." ] + working_directory: web_python + web_python_windows: + name: "Python workspace for web in windows" + platform: windows + test_flags: + - "--test_tag_filters=-noci,-external,-native,-sauce" + build_targets: [ "//..." ] + test_targets: [ "//..." ] + working_directory: web_python diff --git a/MODULE.bazel b/MODULE.bazel index e2e077b6..f74b3686 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -3,28 +3,14 @@ module( version = "0.4.0", ) -bazel_dep( - name = "bazel_skylib", - version = "1.7.1", -) +bazel_dep(name = "bazel_skylib", version = "1.7.1") -bazel_dep( - name = "platforms", - version = "0.0.10", -) +bazel_dep(name = "platforms", version = "0.0.10") ##### Go dependencies ##### -bazel_dep( - name = "rules_go", - version = "0.51.0-rc1", - repo_name = "io_bazel_rules_go", -) +bazel_dep(name = "rules_go", version = "0.51.0-rc1", repo_name = "io_bazel_rules_go") -bazel_dep( - name = "gazelle", - version = "0.40.0", - repo_name = "bazel_gazelle", -) +bazel_dep(name = "gazelle", version = "0.40.0", repo_name = "bazel_gazelle") go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") @@ -38,10 +24,7 @@ use_repo( ) ##### Java dependencies ##### -bazel_dep( - name = "rules_jvm_external", - version = "6.6", -) +bazel_dep(name = "rules_jvm_external",version = "6.6") maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") @@ -58,9 +41,7 @@ use_repo(maven, "maven") ##### Browsers dependencies ##### browser_repositories = use_extension("//web:extension.bzl", "browser_repositories_extension") - browser_repositories.install(version = "0.3.4") - use_repo( browser_repositories, "com_saucelabs_sauce_connect_linux_x64", @@ -71,7 +52,7 @@ use_repo( "org_chromium_chromedriver_macos_x64", "org_chromium_chromedriver_windows_x64", "org_chromium_chromium_linux_x64", - "org_chromium_chromium_macos_arm64", # Only available in 0.3.3 + "org_chromium_chromium_macos_arm64", # Only available in 0.3.3 "org_chromium_chromium_macos_x64", "org_chromium_chromium_windows_x64", "org_mozilla_firefox_linux_x64", diff --git a/go/web/BUILD.bazel b/go/web/BUILD.bazel index de41e9e4..b3e67c60 100644 --- a/go/web/BUILD.bazel +++ b/go/web/BUILD.bazel @@ -15,7 +15,7 @@ ################################################################################ # load("@bazel_skylib//:bzl_library.bzl", "bzl_library") -load("@rules_webtesting//web:web.bzl", "web_test_config") +load("//web:web.bzl", "web_test_config") package( default_testonly = True, @@ -26,7 +26,7 @@ bzl_library( name = "go", srcs = ["go.bzl"], deps = [ - "@rules_webtesting//web/internal:wrap_web_test_suite", + "//web/internal:wrap_web_test_suite", # should depend on @io_bazel_rules_go//go:def.bzl ], ) diff --git a/go/webtest/BUILD.bazel b/go/webtest/BUILD.bazel index 74974add..645f5f86 100644 --- a/go/webtest/BUILD.bazel +++ b/go/webtest/BUILD.bazel @@ -16,7 +16,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") # ################################################################################ # -load("@rules_webtesting//go/web:go.bzl", "go_web_test_suite") +load("//go/web:go.bzl", "go_web_test_suite") licenses(["notice"]) # Apache 2.0 @@ -27,8 +27,8 @@ go_library( visibility = ["//visibility:public"], deps = [ "@com_github_tebeka_selenium//:go_default_library", - "@rules_webtesting//go/bazel:go_default_library", - "@rules_webtesting//go/metadata:go_default_library", + "//go/bazel:go_default_library", + "//go/metadata:go_default_library", ], ) diff --git a/web/internal/executable_name.bzl b/web/internal/executable_name.bzl index 18f3177d..b1038686 100644 --- a/web/internal/executable_name.bzl +++ b/web/internal/executable_name.bzl @@ -22,8 +22,8 @@ def get_platform_executable_name(): release output, where the binaries can be referenced using the known file names. """ return select({ - "@rules_webtesting//common/conditions:linux_x64": "main_linux_x64", - "@rules_webtesting//common/conditions:macos_x64": "main_darwin_x64", - "@rules_webtesting//common/conditions:macos_arm64": "main_darwin_arm64", - "@rules_webtesting//common/conditions:windows_x64": "main_windows_x64.exe", + "//common/conditions:linux_x64": "main_linux_x64", + "//common/conditions:macos_x64": "main_darwin_x64", + "//common/conditions:macos_arm64": "main_darwin_arm64", + "//common/conditions:windows_x64": "main_windows_x64.exe", }) From de27d5211e87a1f2cd3b9269a16585e05fcf2358 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 18 Mar 2025 00:25:41 +0000 Subject: [PATCH 012/107] More polish --- go/web/go.bzl | 4 ++-- go/webdriver/BUILD.bazel | 2 +- go/webtest/BUILD.bazel | 15 +++++++-------- go/wtl/proxy/BUILD.bazel | 3 +-- go/wtl/proxy/driverhub/quithandler/BUILD.bazel | 3 +-- go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel | 3 +-- rules_webtesting.iml | 12 ------------ web/BUILD.bazel | 3 +-- web/internal/BUILD.bazel | 2 +- web_java/java/BUILD.bazel | 2 +- web_java/java/java.bzl | 7 +++---- web_python/python/BUILD.bazel | 2 +- web_python/pythontests/BUILD.bazel | 2 +- 13 files changed, 21 insertions(+), 39 deletions(-) delete mode 100644 rules_webtesting.iml diff --git a/go/web/go.bzl b/go/web/go.bzl index 183226b8..839b6bba 100644 --- a/go/web/go.bzl +++ b/go/web/go.bzl @@ -13,9 +13,9 @@ # limitations under the License. """Web Test rules for Go.""" +load("//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") +load("/web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@rules_webtesting//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") -load("@rules_webtesting//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") def go_web_test_suite(name, go_test_tags = DEFAULT_WRAPPED_TEST_TAGS, **kwargs): """Defines a test_suite of web_test targets that wrap a go_test target. diff --git a/go/webdriver/BUILD.bazel b/go/webdriver/BUILD.bazel index c73692f1..ce446db1 100644 --- a/go/webdriver/BUILD.bazel +++ b/go/webdriver/BUILD.bazel @@ -14,8 +14,8 @@ # ################################################################################ # -load("@io_bazel_rules_go//go:def.bzl", "go_library") load("//go/web:go.bzl", "go_web_test_suite") +load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/webtest/BUILD.bazel b/go/webtest/BUILD.bazel index 645f5f86..b4b5d474 100644 --- a/go/webtest/BUILD.bazel +++ b/go/webtest/BUILD.bazel @@ -1,5 +1,3 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +15,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") ################################################################################ # load("//go/web:go.bzl", "go_web_test_suite") +load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 @@ -26,9 +25,9 @@ go_library( importpath = "github.com/bazelbuild/rules_webtesting/go/webtest", visibility = ["//visibility:public"], deps = [ - "@com_github_tebeka_selenium//:go_default_library", "//go/bazel:go_default_library", "//go/metadata:go_default_library", + "@com_github_tebeka_selenium//:go_default_library", ], ) @@ -39,12 +38,12 @@ go_web_test_suite( "webtest_test.go", ], browsers = [ - "@rules_webtesting//browsers:chromium-local", - "@rules_webtesting//browsers:firefox-local", - "@rules_webtesting//browsers/sauce:chrome-win10", - "@rules_webtesting//browsers/sauce:chrome-win10-connect", + "//browsers:chromium-local", + "//browsers:firefox-local", + "//browsers/sauce:chrome-win10", + "//browsers/sauce:chrome-win10-connect", ], - data = ["@rules_webtesting//testdata"], + data = ["//testdata"], embed = [":go_default_library"], deps = ["@com_github_tebeka_selenium//:go_default_library"], ) diff --git a/go/wtl/proxy/BUILD.bazel b/go/wtl/proxy/BUILD.bazel index 91cc4cad..d6d36f54 100644 --- a/go/wtl/proxy/BUILD.bazel +++ b/go/wtl/proxy/BUILD.bazel @@ -1,5 +1,3 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +15,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") ################################################################################ # load("//go/web:go.bzl", "go_web_test_suite") +load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/driverhub/quithandler/BUILD.bazel b/go/wtl/proxy/driverhub/quithandler/BUILD.bazel index 23436758..e1e1b0a9 100644 --- a/go/wtl/proxy/driverhub/quithandler/BUILD.bazel +++ b/go/wtl/proxy/driverhub/quithandler/BUILD.bazel @@ -1,5 +1,3 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +15,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") ################################################################################ # load("//go/web:go.bzl", "go_web_test_suite") +load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel b/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel index d977f318..6908eebe 100644 --- a/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel +++ b/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel @@ -1,5 +1,3 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +15,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") ################################################################################ # load("//go/web:go.bzl", "go_web_test_suite") +load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/rules_webtesting.iml b/rules_webtesting.iml deleted file mode 100644 index b3840569..00000000 --- a/rules_webtesting.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/web/BUILD.bazel b/web/BUILD.bazel index 71a372e4..3c2c08ec 100644 --- a/web/BUILD.bazel +++ b/web/BUILD.bazel @@ -1,5 +1,3 @@ -load("@bazel_skylib//:bzl_library.bzl", "bzl_library") - # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +15,7 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") ################################################################################ # load(":web.bzl", "web_test_config") +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") package( default_testonly = True, diff --git a/web/internal/BUILD.bazel b/web/internal/BUILD.bazel index 582fef40..d92ea949 100644 --- a/web/internal/BUILD.bazel +++ b/web/internal/BUILD.bazel @@ -18,7 +18,7 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") package( default_testonly = True, - default_visibility = ["//visibility:public"], + default_visibility = ["//web:__subpackages__"], ) licenses(["notice"]) # Apache 2.0 diff --git a/web_java/java/BUILD.bazel b/web_java/java/BUILD.bazel index 67a7da87..bee0207f 100644 --- a/web_java/java/BUILD.bazel +++ b/web_java/java/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2016 Google Inc. +# Copyright 2025 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/web_java/java/java.bzl b/web_java/java/java.bzl index b6476ea5..2ac9af52 100644 --- a/web_java/java/java.bzl +++ b/web_java/java/java.bzl @@ -13,8 +13,8 @@ # limitations under the License. """Web Test rules for Java.""" -load("@rules_webtesting//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") -load("@rules_webtesting//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") +load("//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") +load("//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") def java_web_test_suite(name, java_test_tags = DEFAULT_WRAPPED_TEST_TAGS, test_class = None, **kwargs): """Defines a test_suite of web_test targets that wrap a java_test target. @@ -29,8 +29,7 @@ def java_web_test_suite(name, java_test_tags = DEFAULT_WRAPPED_TEST_TAGS, test_c test_package = native.package_name().replace("javatests/", "") test_package = test_package.replace("/", ".") test_class = test_package + "." + name - print("test class is" + str(test_class) + "," + "the native class is" + str(native.package_name())) - + wrap_web_test_suite( name = name, rule = native.java_test, diff --git a/web_python/python/BUILD.bazel b/web_python/python/BUILD.bazel index 0c5a2bc8..f17000e8 100644 --- a/web_python/python/BUILD.bazel +++ b/web_python/python/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2024 Google Inc. +# Copyright 2025 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/web_python/pythontests/BUILD.bazel b/web_python/pythontests/BUILD.bazel index 8caf87eb..dda92c09 100644 --- a/web_python/pythontests/BUILD.bazel +++ b/web_python/pythontests/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2016 Google Inc. +# Copyright 2025 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 583083de6f52a4a0527a25c21d1c402c74797c14 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 18 Mar 2025 00:42:19 +0000 Subject: [PATCH 013/107] More polish --- go/web/go.bzl | 2 +- web/internal/BUILD.bazel | 2 +- web_java/java/java.bzl | 6 +++--- web_java/javatests/com/google/testing/web/BUILD.bazel | 2 +- web_java/javatests/com/google/testing/web/WebTestTest.java | 2 +- web_python/BUILD.bazel | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go/web/go.bzl b/go/web/go.bzl index 839b6bba..1168176e 100644 --- a/go/web/go.bzl +++ b/go/web/go.bzl @@ -14,7 +14,7 @@ """Web Test rules for Go.""" load("//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") -load("/web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") +load("//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_test") def go_web_test_suite(name, go_test_tags = DEFAULT_WRAPPED_TEST_TAGS, **kwargs): diff --git a/web/internal/BUILD.bazel b/web/internal/BUILD.bazel index d92ea949..582fef40 100644 --- a/web/internal/BUILD.bazel +++ b/web/internal/BUILD.bazel @@ -18,7 +18,7 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") package( default_testonly = True, - default_visibility = ["//web:__subpackages__"], + default_visibility = ["//visibility:public"], ) licenses(["notice"]) # Apache 2.0 diff --git a/web_java/java/java.bzl b/web_java/java/java.bzl index 2ac9af52..ecb84912 100644 --- a/web_java/java/java.bzl +++ b/web_java/java/java.bzl @@ -13,8 +13,8 @@ # limitations under the License. """Web Test rules for Java.""" -load("//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") -load("//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") +load("@rules_webtesting//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") +load("@rules_webtesting//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") def java_web_test_suite(name, java_test_tags = DEFAULT_WRAPPED_TEST_TAGS, test_class = None, **kwargs): """Defines a test_suite of web_test targets that wrap a java_test target. @@ -29,7 +29,7 @@ def java_web_test_suite(name, java_test_tags = DEFAULT_WRAPPED_TEST_TAGS, test_c test_package = native.package_name().replace("javatests/", "") test_package = test_package.replace("/", ".") test_class = test_package + "." + name - + wrap_web_test_suite( name = name, rule = native.java_test, diff --git a/web_java/javatests/com/google/testing/web/BUILD.bazel b/web_java/javatests/com/google/testing/web/BUILD.bazel index d72c3919..78dece81 100644 --- a/web_java/javatests/com/google/testing/web/BUILD.bazel +++ b/web_java/javatests/com/google/testing/web/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2016 Google Inc. +# Copyright 2025 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/web_java/javatests/com/google/testing/web/WebTestTest.java b/web_java/javatests/com/google/testing/web/WebTestTest.java index cf924af7..922a1cb0 100644 --- a/web_java/javatests/com/google/testing/web/WebTestTest.java +++ b/web_java/javatests/com/google/testing/web/WebTestTest.java @@ -31,4 +31,4 @@ public void newWebDriverSession() { driver.get(wt.HTTPAddress().resolve("/healthz").toString()); driver.quit(); } -} \ No newline at end of file +} diff --git a/web_python/BUILD.bazel b/web_python/BUILD.bazel index d3b5d5c1..f619eeeb 100644 --- a/web_python/BUILD.bazel +++ b/web_python/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2024 Google Inc. +# Copyright 2025 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From b0497da84e10f77c1ed1d0c0f3a80a81e1540bbf Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 18 Mar 2025 04:27:16 +0000 Subject: [PATCH 014/107] More polish --- .bazelci/presubmit.yml | 30 +++++++++---------- .bazelignore | 6 ++-- .../BUILD.bazel | 0 .../MODULE.bazel | 2 +- .../web}/BUILD.bazel | 0 .../web}/java.bzl | 0 .../com/google/testing/web/BUILD.bazel | 2 +- .../com/google/testing/web/WebTestTest.java | 0 .../BUILD.bazel | 0 .../MODULE.bazel | 2 +- .../requirements.in | 0 .../requirements_lock.txt | 0 .../requirements_lock_windows.txt | 0 .../web}/BUILD.bazel | 0 .../web}/py.bzl | 2 +- .../webtests}/BUILD.bazel | 2 +- .../webtests}/webtest.py | 0 .../webtests}/webtest_test.py | 2 +- .../MODULE.bazel | 2 +- .../scalatests/BUILD.bazel | 4 +-- .../scalatests/WebTestTest.scala | 0 .../web}/BUILD.bazel | 2 +- .../web}/scala.bzl | 2 +- 23 files changed, 29 insertions(+), 29 deletions(-) rename {web_java => rules_web_testing_java}/BUILD.bazel (100%) rename {web_java => rules_web_testing_java}/MODULE.bazel (93%) rename {web_java/java => rules_web_testing_java/web}/BUILD.bazel (100%) rename {web_java/java => rules_web_testing_java/web}/java.bzl (100%) rename {web_java/javatests => rules_web_testing_java/webtests}/com/google/testing/web/BUILD.bazel (96%) rename {web_java/javatests => rules_web_testing_java/webtests}/com/google/testing/web/WebTestTest.java (100%) rename {web_python => rules_web_testing_python}/BUILD.bazel (100%) rename {web_python => rules_web_testing_python}/MODULE.bazel (95%) rename {web_python => rules_web_testing_python}/requirements.in (100%) rename {web_python => rules_web_testing_python}/requirements_lock.txt (100%) rename {web_python => rules_web_testing_python}/requirements_lock_windows.txt (100%) rename {web_python/python => rules_web_testing_python/web}/BUILD.bazel (100%) rename {web_python/python => rules_web_testing_python/web}/py.bzl (97%) rename {web_python/pythontests => rules_web_testing_python/webtests}/BUILD.bazel (95%) rename {web_python/pythontests => rules_web_testing_python/webtests}/webtest.py (100%) rename {web_python/pythontests => rules_web_testing_python/webtests}/webtest_test.py (97%) rename {web_scala => rules_web_testing_scala}/MODULE.bazel (96%) rename {web_scala => rules_web_testing_scala}/scalatests/BUILD.bazel (91%) rename {web_scala => rules_web_testing_scala}/scalatests/WebTestTest.scala (100%) rename {web_scala/scala => rules_web_testing_scala/web}/BUILD.bazel (97%) rename {web_scala/scala => rules_web_testing_scala/web}/scala.bzl (97%) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index eb5e6fdf..fc149787 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -33,46 +33,46 @@ tasks: build_targets: ["//..."] test_targets: ["//..."] working_directory: web_scala - web_scala_macos: + rules_web_testing_scala_macos: name: "Scala workspace for web in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: web_scala - web_scala_windows: + working_directory: rules_web_testing_scala + rules_web_testing_scala_windows: name: "Scala workspace for web in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: web_scala - web_java_ubuntu2004: + working_directory: rules_web_testing_scala + rules_web_testing_java_ubuntu2004: name: "Java workspace for web in ubuntu" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: web_java - web_java_macos: + working_directory: rules_web_testing_java + rules_web_testing_java_macos: name: "Java workspace for web in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: web_java - web_java_windows: + working_directory: rules_web_testing_java + rules_web_testing_java_windows: name: "Java workspace for web in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: web_java + working_directory: rules_web_testing_java web_python_ubuntu2004: name: "Python workspace for web in ubuntu" platform: ubuntu2004 @@ -80,20 +80,20 @@ tasks: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: web_python - web_python_macos: + working_directory: rules_web_testing_python + rules_web_testing_python_macos: name: "Python workspace for web in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: web_python - web_python_windows: + working_directory: rules_web_testing_python + rules_web_testing_python_windows: name: "Python workspace for web in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: web_python + working_directory: rules_web_testing_python diff --git a/.bazelignore b/.bazelignore index 5c42c0c5..a51c320b 100644 --- a/.bazelignore +++ b/.bazelignore @@ -1,3 +1,3 @@ -web_java -web_python -web_scala +rules_web_testing_java +rules_web_testing_python +rules_web_testing_scala diff --git a/web_java/BUILD.bazel b/rules_web_testing_java/BUILD.bazel similarity index 100% rename from web_java/BUILD.bazel rename to rules_web_testing_java/BUILD.bazel diff --git a/web_java/MODULE.bazel b/rules_web_testing_java/MODULE.bazel similarity index 93% rename from web_java/MODULE.bazel rename to rules_web_testing_java/MODULE.bazel index 10a0a24d..8e7f6b39 100644 --- a/web_java/MODULE.bazel +++ b/rules_web_testing_java/MODULE.bazel @@ -1,5 +1,5 @@ module( - name = "rules_webtesting_web_java", + name = "rules_web_testing_java", version = "0.4.0", ) diff --git a/web_java/java/BUILD.bazel b/rules_web_testing_java/web/BUILD.bazel similarity index 100% rename from web_java/java/BUILD.bazel rename to rules_web_testing_java/web/BUILD.bazel diff --git a/web_java/java/java.bzl b/rules_web_testing_java/web/java.bzl similarity index 100% rename from web_java/java/java.bzl rename to rules_web_testing_java/web/java.bzl diff --git a/web_java/javatests/com/google/testing/web/BUILD.bazel b/rules_web_testing_java/webtests/com/google/testing/web/BUILD.bazel similarity index 96% rename from web_java/javatests/com/google/testing/web/BUILD.bazel rename to rules_web_testing_java/webtests/com/google/testing/web/BUILD.bazel index 78dece81..e5bdb8ec 100644 --- a/web_java/javatests/com/google/testing/web/BUILD.bazel +++ b/rules_web_testing_java/webtests/com/google/testing/web/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("//java:java.bzl", "java_web_test_suite") +load("//web:java.bzl", "java_web_test_suite") licenses(["notice"]) # Apache 2.0 diff --git a/web_java/javatests/com/google/testing/web/WebTestTest.java b/rules_web_testing_java/webtests/com/google/testing/web/WebTestTest.java similarity index 100% rename from web_java/javatests/com/google/testing/web/WebTestTest.java rename to rules_web_testing_java/webtests/com/google/testing/web/WebTestTest.java diff --git a/web_python/BUILD.bazel b/rules_web_testing_python/BUILD.bazel similarity index 100% rename from web_python/BUILD.bazel rename to rules_web_testing_python/BUILD.bazel diff --git a/web_python/MODULE.bazel b/rules_web_testing_python/MODULE.bazel similarity index 95% rename from web_python/MODULE.bazel rename to rules_web_testing_python/MODULE.bazel index d3d2e2b7..28f33dad 100644 --- a/web_python/MODULE.bazel +++ b/rules_web_testing_python/MODULE.bazel @@ -1,5 +1,5 @@ module( - name = "rules_webtesting_web_python", + name = "rules_web_testing_python", version = "0.4.0", ) diff --git a/web_python/requirements.in b/rules_web_testing_python/requirements.in similarity index 100% rename from web_python/requirements.in rename to rules_web_testing_python/requirements.in diff --git a/web_python/requirements_lock.txt b/rules_web_testing_python/requirements_lock.txt similarity index 100% rename from web_python/requirements_lock.txt rename to rules_web_testing_python/requirements_lock.txt diff --git a/web_python/requirements_lock_windows.txt b/rules_web_testing_python/requirements_lock_windows.txt similarity index 100% rename from web_python/requirements_lock_windows.txt rename to rules_web_testing_python/requirements_lock_windows.txt diff --git a/web_python/python/BUILD.bazel b/rules_web_testing_python/web/BUILD.bazel similarity index 100% rename from web_python/python/BUILD.bazel rename to rules_web_testing_python/web/BUILD.bazel diff --git a/web_python/python/py.bzl b/rules_web_testing_python/web/py.bzl similarity index 97% rename from web_python/python/py.bzl rename to rules_web_testing_python/web/py.bzl index 3a641736..db58bce8 100644 --- a/web_python/python/py.bzl +++ b/rules_web_testing_python/web/py.bzl @@ -1,4 +1,4 @@ -# Copyright 2016 Google Inc. +# Copyright 2025 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/web_python/pythontests/BUILD.bazel b/rules_web_testing_python/webtests/BUILD.bazel similarity index 95% rename from web_python/pythontests/BUILD.bazel rename to rules_web_testing_python/webtests/BUILD.bazel index dda92c09..6f344535 100644 --- a/web_python/pythontests/BUILD.bazel +++ b/rules_web_testing_python/webtests/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("@rules_webtesting_web_python//python:py.bzl", "py_web_test_suite") +load("//web:py.bzl", "py_web_test_suite") licenses(["notice"]) # Apache 2.0 diff --git a/web_python/pythontests/webtest.py b/rules_web_testing_python/webtests/webtest.py similarity index 100% rename from web_python/pythontests/webtest.py rename to rules_web_testing_python/webtests/webtest.py diff --git a/web_python/pythontests/webtest_test.py b/rules_web_testing_python/webtests/webtest_test.py similarity index 97% rename from web_python/pythontests/webtest_test.py rename to rules_web_testing_python/webtests/webtest_test.py index a140e1ba..f1faa763 100644 --- a/web_python/pythontests/webtest_test.py +++ b/rules_web_testing_python/webtests/webtest_test.py @@ -15,7 +15,7 @@ import unittest -from pythontests import webtest +from webtests import webtest class BrowserTest(unittest.TestCase): diff --git a/web_scala/MODULE.bazel b/rules_web_testing_scala/MODULE.bazel similarity index 96% rename from web_scala/MODULE.bazel rename to rules_web_testing_scala/MODULE.bazel index 84695e1e..3168de5c 100644 --- a/web_scala/MODULE.bazel +++ b/rules_web_testing_scala/MODULE.bazel @@ -1,5 +1,5 @@ module( - name = "rules_webtesting_web_scala", + name = "rules_web_testing_scala", version = "0.4.0", ) diff --git a/web_scala/scalatests/BUILD.bazel b/rules_web_testing_scala/scalatests/BUILD.bazel similarity index 91% rename from web_scala/scalatests/BUILD.bazel rename to rules_web_testing_scala/scalatests/BUILD.bazel index 8ea9f570..5c0208f6 100644 --- a/web_scala/scalatests/BUILD.bazel +++ b/rules_web_testing_scala/scalatests/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2018 Google Inc. +# Copyright 2025 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ # ################################################################################ # -load("@rules_webtesting_web_scala//scala:scala.bzl", "scala_web_test_suite") +load("//web:scala.bzl", "scala_web_test_suite") licenses(["notice"]) # Apache 2.0 diff --git a/web_scala/scalatests/WebTestTest.scala b/rules_web_testing_scala/scalatests/WebTestTest.scala similarity index 100% rename from web_scala/scalatests/WebTestTest.scala rename to rules_web_testing_scala/scalatests/WebTestTest.scala diff --git a/web_scala/scala/BUILD.bazel b/rules_web_testing_scala/web/BUILD.bazel similarity index 97% rename from web_scala/scala/BUILD.bazel rename to rules_web_testing_scala/web/BUILD.bazel index 71796c11..ad48c48b 100644 --- a/web_scala/scala/BUILD.bazel +++ b/rules_web_testing_scala/web/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2016 Google Inc. +# Copyright 2025 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/web_scala/scala/scala.bzl b/rules_web_testing_scala/web/scala.bzl similarity index 97% rename from web_scala/scala/scala.bzl rename to rules_web_testing_scala/web/scala.bzl index b78ec7e7..870d2f38 100644 --- a/web_scala/scala/scala.bzl +++ b/rules_web_testing_scala/web/scala.bzl @@ -1,4 +1,4 @@ -# Copyright 2016 Google Inc. +# Copyright 2025 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 74ffa27084fe3d95ec7fe5987d7e71dfdc60cce6 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 18 Mar 2025 04:41:13 +0000 Subject: [PATCH 015/107] More polish --- .../webtests/com/google/testing/web/WebTestTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules_web_testing_java/webtests/com/google/testing/web/WebTestTest.java b/rules_web_testing_java/webtests/com/google/testing/web/WebTestTest.java index 922a1cb0..354b073f 100644 --- a/rules_web_testing_java/webtests/com/google/testing/web/WebTestTest.java +++ b/rules_web_testing_java/webtests/com/google/testing/web/WebTestTest.java @@ -14,12 +14,13 @@ // // ////////////////////////////////////////////////////////////////////////////// // -package com.google.testing.web; +package webtests.com.google.testing.web; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import org.openqa.selenium.WebDriver; +import com.google.testing.web.WebTest; @RunWith(JUnit4.class) public class WebTestTest { From cc04d192f16c54d2f648c06ad823bffe15d028d0 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 18 Mar 2025 22:06:59 +0000 Subject: [PATCH 016/107] Modularize rules_webtesting --- .bazelci/presubmit.yml | 36 ++-- .bazelignore | 6 +- .../requirements_lock.txt | 71 ------- .../requirements_lock_windows.txt | 144 -------------- .../BUILD.bazel | 0 .../MODULE.bazel | 0 .../com/google/testing/web/BUILD.bazel | 2 +- .../com/google/testing/web/WebTestTest.java | 2 +- .../web/BUILD.bazel | 0 .../web/java.bzl | 0 .../BUILD.bazel | 2 +- .../MODULE.bazel | 0 .../requirements.in | 0 .../requirements_lock.txt | 0 .../requirements_lock_windows.txt | 0 .../testing/web}/BUILD.bazel | 2 +- web_testing_python/testing/web/debugger/BUILD | 22 +++ .../testing/web/debugger/debugger.py | 179 ++++++++++++++++++ .../testing/web}/webtest.py | 2 +- .../testing/web}/webtest_test.py | 4 +- .../web/BUILD.bazel | 0 .../web/py.bzl | 0 .../MODULE.bazel | 0 .../scalatests/BUILD.bazel | 2 +- .../scalatests/WebTestTest.scala | 0 .../web/BUILD.bazel | 0 .../web/scala.bzl | 0 27 files changed, 230 insertions(+), 244 deletions(-) delete mode 100644 rules_web_testing_python/requirements_lock.txt delete mode 100644 rules_web_testing_python/requirements_lock_windows.txt rename {rules_web_testing_java => web_testing_java}/BUILD.bazel (100%) rename {rules_web_testing_java => web_testing_java}/MODULE.bazel (100%) rename {rules_web_testing_java/webtests => web_testing_java/javatests}/com/google/testing/web/BUILD.bazel (97%) rename {rules_web_testing_java/webtests => web_testing_java/javatests}/com/google/testing/web/WebTestTest.java (96%) rename {rules_web_testing_java => web_testing_java}/web/BUILD.bazel (100%) rename {rules_web_testing_java => web_testing_java}/web/java.bzl (100%) rename {rules_web_testing_python => web_testing_python}/BUILD.bazel (97%) rename {rules_web_testing_python => web_testing_python}/MODULE.bazel (100%) rename {rules_web_testing_python => web_testing_python}/requirements.in (100%) rename requirements_lock.txt => web_testing_python/requirements_lock.txt (100%) rename requirements_lock_windows.txt => web_testing_python/requirements_lock_windows.txt (100%) rename {rules_web_testing_python/webtests => web_testing_python/testing/web}/BUILD.bazel (98%) create mode 100644 web_testing_python/testing/web/debugger/BUILD create mode 100644 web_testing_python/testing/web/debugger/debugger.py rename {rules_web_testing_python/webtests => web_testing_python/testing/web}/webtest.py (98%) rename {rules_web_testing_python/webtests => web_testing_python/testing/web}/webtest_test.py (94%) rename {rules_web_testing_python => web_testing_python}/web/BUILD.bazel (100%) rename {rules_web_testing_python => web_testing_python}/web/py.bzl (100%) rename {rules_web_testing_scala => web_testing_scala}/MODULE.bazel (100%) rename {rules_web_testing_scala => web_testing_scala}/scalatests/BUILD.bazel (97%) rename {rules_web_testing_scala => web_testing_scala}/scalatests/WebTestTest.scala (100%) rename {rules_web_testing_scala => web_testing_scala}/web/BUILD.bazel (100%) rename {rules_web_testing_scala => web_testing_scala}/web/scala.bzl (100%) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index fc149787..7f7f5b7c 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -25,75 +25,75 @@ platforms: test_targets: - "//..." tasks: - web_scala_ubuntu2004: + web_testing_scala_ubuntu2004: name: "Scala workspace for web in ubuntu" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: ["//..."] test_targets: ["//..."] - working_directory: web_scala - rules_web_testing_scala_macos: + working_directory: web_testing_scala + web_testing_scala_macos: name: "Scala workspace for web in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: rules_web_testing_scala - rules_web_testing_scala_windows: + working_directory: web_testing_scala + web_testing_scala_windows: name: "Scala workspace for web in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: rules_web_testing_scala - rules_web_testing_java_ubuntu2004: + working_directory: web_testing_scala + web_testing_java_ubuntu2004: name: "Java workspace for web in ubuntu" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: rules_web_testing_java - rules_web_testing_java_macos: + working_directory: web_testing_java + web_testing_java_macos: name: "Java workspace for web in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: rules_web_testing_java - rules_web_testing_java_windows: + working_directory: web_testing_java + web_testing_java_windows: name: "Java workspace for web in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: rules_web_testing_java - web_python_ubuntu2004: + working_directory: web_testing_java + web_testing_python_ubuntu2004: name: "Python workspace for web in ubuntu" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: rules_web_testing_python - rules_web_testing_python_macos: + working_directory: web_testing_python + web_testing_python_macos: name: "Python workspace for web in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: rules_web_testing_python - rules_web_testing_python_windows: + working_directory: web_testing_python + web_testing_python_windows: name: "Python workspace for web in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" build_targets: [ "//..." ] test_targets: [ "//..." ] - working_directory: rules_web_testing_python + working_directory: web_testing_python diff --git a/.bazelignore b/.bazelignore index a51c320b..bdf56a88 100644 --- a/.bazelignore +++ b/.bazelignore @@ -1,3 +1,3 @@ -rules_web_testing_java -rules_web_testing_python -rules_web_testing_scala +web_testing_java +web_testing_python +web_testing_scala diff --git a/rules_web_testing_python/requirements_lock.txt b/rules_web_testing_python/requirements_lock.txt deleted file mode 100644 index 423b3ab0..00000000 --- a/rules_web_testing_python/requirements_lock.txt +++ /dev/null @@ -1,71 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# bazel run //:requirements.update -# -attrs==24.2.0 \ - --hash=sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346 \ - --hash=sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2 - # via - # outcome - # trio -certifi==2024.8.30 \ - --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ - --hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9 - # via selenium -h11==0.14.0 \ - --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ - --hash=sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761 - # via wsproto -idna==3.10 \ - --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ - --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 - # via trio -outcome==1.3.0.post0 \ - --hash=sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8 \ - --hash=sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b - # via trio -pysocks==1.7.1 \ - --hash=sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299 \ - --hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5 \ - --hash=sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0 - # via urllib3 -selenium==4.27.1 \ - --hash=sha256:5296c425a75ff1b44d0d5199042b36a6d1ef76c04fb775b97b40be739a9caae2 \ - --hash=sha256:b89b1f62b5cfe8025868556fe82360d6b649d464f75d2655cb966c8f8447ea18 - # via -r requirements.in -sniffio==1.3.1 \ - --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ - --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc - # via trio -sortedcontainers==2.4.0 \ - --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ - --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 - # via trio -trio==0.27.0 \ - --hash=sha256:1dcc95ab1726b2da054afea8fd761af74bad79bd52381b84eae408e983c76831 \ - --hash=sha256:68eabbcf8f457d925df62da780eff15ff5dc68fd6b367e2dde59f7aaf2a0b884 - # via - # selenium - # trio-websocket -trio-websocket==0.11.1 \ - --hash=sha256:18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f \ - --hash=sha256:520d046b0d030cf970b8b2b2e00c4c2245b3807853ecd44214acd33d74581638 - # via selenium -typing-extensions==4.12.2 \ - --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ - --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 - # via selenium -urllib3[socks]==2.2.3 \ - --hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \ - --hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9 - # via selenium -websocket-client==1.8.0 \ - --hash=sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526 \ - --hash=sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da - # via selenium -wsproto==1.2.0 \ - --hash=sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065 \ - --hash=sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736 - # via trio-websocket diff --git a/rules_web_testing_python/requirements_lock_windows.txt b/rules_web_testing_python/requirements_lock_windows.txt deleted file mode 100644 index d94eee74..00000000 --- a/rules_web_testing_python/requirements_lock_windows.txt +++ /dev/null @@ -1,144 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# bazel run //:requirements.update -# -attrs==24.2.0 \ - --hash=sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346 \ - --hash=sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2 - # via - # outcome - # trio -certifi==2024.8.30 \ - --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ - --hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9 - # via selenium -cffi==1.17.1 \ - --hash=sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8 \ - --hash=sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2 \ - --hash=sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1 \ - --hash=sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15 \ - --hash=sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36 \ - --hash=sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824 \ - --hash=sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8 \ - --hash=sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36 \ - --hash=sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17 \ - --hash=sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf \ - --hash=sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc \ - --hash=sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3 \ - --hash=sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed \ - --hash=sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702 \ - --hash=sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1 \ - --hash=sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8 \ - --hash=sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903 \ - --hash=sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6 \ - --hash=sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d \ - --hash=sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b \ - --hash=sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e \ - --hash=sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be \ - --hash=sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c \ - --hash=sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683 \ - --hash=sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9 \ - --hash=sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c \ - --hash=sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8 \ - --hash=sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1 \ - --hash=sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4 \ - --hash=sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655 \ - --hash=sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67 \ - --hash=sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595 \ - --hash=sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0 \ - --hash=sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65 \ - --hash=sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41 \ - --hash=sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6 \ - --hash=sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401 \ - --hash=sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6 \ - --hash=sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3 \ - --hash=sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16 \ - --hash=sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93 \ - --hash=sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e \ - --hash=sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4 \ - --hash=sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964 \ - --hash=sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c \ - --hash=sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576 \ - --hash=sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0 \ - --hash=sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3 \ - --hash=sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662 \ - --hash=sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3 \ - --hash=sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff \ - --hash=sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5 \ - --hash=sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd \ - --hash=sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f \ - --hash=sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5 \ - --hash=sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14 \ - --hash=sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d \ - --hash=sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9 \ - --hash=sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7 \ - --hash=sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382 \ - --hash=sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a \ - --hash=sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e \ - --hash=sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a \ - --hash=sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4 \ - --hash=sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99 \ - --hash=sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87 \ - --hash=sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b - # via trio -h11==0.14.0 \ - --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ - --hash=sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761 - # via wsproto -idna==3.10 \ - --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ - --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 - # via trio -outcome==1.3.0.post0 \ - --hash=sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8 \ - --hash=sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b - # via trio -pycparser==2.22 \ - --hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \ - --hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc - # via cffi -pysocks==1.7.1 \ - --hash=sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299 \ - --hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5 \ - --hash=sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0 - # via urllib3 -selenium==4.27.1 \ - --hash=sha256:5296c425a75ff1b44d0d5199042b36a6d1ef76c04fb775b97b40be739a9caae2 \ - --hash=sha256:b89b1f62b5cfe8025868556fe82360d6b649d464f75d2655cb966c8f8447ea18 - # via -r requirements.in -sniffio==1.3.1 \ - --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ - --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc - # via trio -sortedcontainers==2.4.0 \ - --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ - --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 - # via trio -trio==0.27.0 \ - --hash=sha256:1dcc95ab1726b2da054afea8fd761af74bad79bd52381b84eae408e983c76831 \ - --hash=sha256:68eabbcf8f457d925df62da780eff15ff5dc68fd6b367e2dde59f7aaf2a0b884 - # via - # selenium - # trio-websocket -trio-websocket==0.11.1 \ - --hash=sha256:18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f \ - --hash=sha256:520d046b0d030cf970b8b2b2e00c4c2245b3807853ecd44214acd33d74581638 - # via selenium -typing-extensions==4.12.2 \ - --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ - --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 - # via selenium -urllib3[socks]==2.2.3 \ - --hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \ - --hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9 - # via selenium -websocket-client==1.8.0 \ - --hash=sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526 \ - --hash=sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da - # via selenium -wsproto==1.2.0 \ - --hash=sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065 \ - --hash=sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736 - # via trio-websocket diff --git a/rules_web_testing_java/BUILD.bazel b/web_testing_java/BUILD.bazel similarity index 100% rename from rules_web_testing_java/BUILD.bazel rename to web_testing_java/BUILD.bazel diff --git a/rules_web_testing_java/MODULE.bazel b/web_testing_java/MODULE.bazel similarity index 100% rename from rules_web_testing_java/MODULE.bazel rename to web_testing_java/MODULE.bazel diff --git a/rules_web_testing_java/webtests/com/google/testing/web/BUILD.bazel b/web_testing_java/javatests/com/google/testing/web/BUILD.bazel similarity index 97% rename from rules_web_testing_java/webtests/com/google/testing/web/BUILD.bazel rename to web_testing_java/javatests/com/google/testing/web/BUILD.bazel index e5bdb8ec..03b49ae5 100644 --- a/rules_web_testing_java/webtests/com/google/testing/web/BUILD.bazel +++ b/web_testing_java/javatests/com/google/testing/web/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2025 Google Inc. +# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/rules_web_testing_java/webtests/com/google/testing/web/WebTestTest.java b/web_testing_java/javatests/com/google/testing/web/WebTestTest.java similarity index 96% rename from rules_web_testing_java/webtests/com/google/testing/web/WebTestTest.java rename to web_testing_java/javatests/com/google/testing/web/WebTestTest.java index 354b073f..a085e473 100644 --- a/rules_web_testing_java/webtests/com/google/testing/web/WebTestTest.java +++ b/web_testing_java/javatests/com/google/testing/web/WebTestTest.java @@ -14,7 +14,7 @@ // // ////////////////////////////////////////////////////////////////////////////// // -package webtests.com.google.testing.web; +package com.google.testing.web; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/rules_web_testing_java/web/BUILD.bazel b/web_testing_java/web/BUILD.bazel similarity index 100% rename from rules_web_testing_java/web/BUILD.bazel rename to web_testing_java/web/BUILD.bazel diff --git a/rules_web_testing_java/web/java.bzl b/web_testing_java/web/java.bzl similarity index 100% rename from rules_web_testing_java/web/java.bzl rename to web_testing_java/web/java.bzl diff --git a/rules_web_testing_python/BUILD.bazel b/web_testing_python/BUILD.bazel similarity index 97% rename from rules_web_testing_python/BUILD.bazel rename to web_testing_python/BUILD.bazel index f619eeeb..b5ad4b8c 100644 --- a/rules_web_testing_python/BUILD.bazel +++ b/web_testing_python/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2025 Google Inc. +# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/rules_web_testing_python/MODULE.bazel b/web_testing_python/MODULE.bazel similarity index 100% rename from rules_web_testing_python/MODULE.bazel rename to web_testing_python/MODULE.bazel diff --git a/rules_web_testing_python/requirements.in b/web_testing_python/requirements.in similarity index 100% rename from rules_web_testing_python/requirements.in rename to web_testing_python/requirements.in diff --git a/requirements_lock.txt b/web_testing_python/requirements_lock.txt similarity index 100% rename from requirements_lock.txt rename to web_testing_python/requirements_lock.txt diff --git a/requirements_lock_windows.txt b/web_testing_python/requirements_lock_windows.txt similarity index 100% rename from requirements_lock_windows.txt rename to web_testing_python/requirements_lock_windows.txt diff --git a/rules_web_testing_python/webtests/BUILD.bazel b/web_testing_python/testing/web/BUILD.bazel similarity index 98% rename from rules_web_testing_python/webtests/BUILD.bazel rename to web_testing_python/testing/web/BUILD.bazel index 6f344535..d56e049b 100644 --- a/rules_web_testing_python/webtests/BUILD.bazel +++ b/web_testing_python/testing/web/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2025 Google Inc. +# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/web_testing_python/testing/web/debugger/BUILD b/web_testing_python/testing/web/debugger/BUILD new file mode 100644 index 00000000..16cfb1f0 --- /dev/null +++ b/web_testing_python/testing/web/debugger/BUILD @@ -0,0 +1,22 @@ +# Copyright 2017 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# +licenses(["notice"]) # Apache 2.0 + +py_binary( + name = "debugger", + srcs = glob(["*.py"]), +) diff --git a/web_testing_python/testing/web/debugger/debugger.py b/web_testing_python/testing/web/debugger/debugger.py new file mode 100644 index 00000000..41f0fa0e --- /dev/null +++ b/web_testing_python/testing/web/debugger/debugger.py @@ -0,0 +1,179 @@ +# Copyright 2017 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Web Test Launcher Debugger Front-End.""" + +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +import code +import getpass +import hashlib +import json +import socket +import sys +from six.moves import urllib + + +class Debugger: + """Debugger connects to the WTL debugger and sends and receives messages.""" + + def __init__(self, port, host="localhost"): + self._conn = socket.create_connection(address=(host, port)) + self._file = self._conn.makefile(mode="w") + self._decoder = json.JSONDecoder() + self._next_id = 1 + self._buffer = "" + + def _get_next_id(self): + id = self._next_id + self._next_id = self._next_id + 1 + return id + + def _read_next(self): + while True: + try: + self._buffer = self._buffer.strip() + obj, p = self._decoder.raw_decode(self._buffer) + self._buffer = self._buffer[p:] + return obj + except: + pass + s = self._conn.recv(4096).decode("utf-8") + if s == "": + quit() + self._buffer = self._buffer + s + + def _read_until_waiting(self): + while True: + n = self._read_next() + print(n) + if n["status"] != "running": + return + + def step(self): + """Execute the waiting WebDriver command and stop at the next one.""" + id = self._get_next_id() + json.dump(obj={"id": id, "command": "step"}, fp=self._file) + self._file.flush() + self._read_until_waiting() + + def run(self): + """Execute WebDriver commands until a breakpoint is reached.""" + id = self._get_next_id() + json.dump(obj={"id": id, "command": "continue"}, fp=self._file) + self._file.flush() + self._read_until_waiting() + + def stop(self): + """Quit WTL and the debugger.""" + id = self._get_next_id() + json.dump(obj={"id": id, "command": "stop"}, fp=self._file) + self._file.flush() + quit() + + def set_breakpoint(self, path=None, methods=None, body=None): + """Set a WTL breakpoint. + + Args: + path: string, Go regular expression to compare to WebDriver command paths. + methods: list of strings, a list of HTTP methods ("POST", "GET", etc). + body: string, Go regular expression to compare to body of WebDriver + command. + + Returns: + int, id of the breakpoint (can be used in delete_breakpoint command). + """ + id = self._get_next_id() + + bp = {"id": id} + if path: + bp["path"] = path + if methods: + bp["methods"] = methods + if body: + bp["body"] = body + + json.dump( + obj={ + "id": id, + "command": "set breakpoint", + "breakpoint": bp, + }, + fp=self._file) + self._file.flush() + self._read_until_waiting() + return id + + def delete_breakpoint(self, breakpoint_id): + """Delete a previously set WTL breakpoint. + + Args: + breakpoint_id: int, id of the breakpoint to delete. + """ + id = self._get_next_id() + + json.dump( + obj={ + "id": id, + "command": "delete breakpoint", + "breakpoint": { + "id": breakpoint_id + }, + }, + fp=self._file) + self._file.flush() + self._read_until_waiting() + + +def collect_analytics(): + try: + urllib.request.urlopen( + "http://www.google-analytics.com/collect?v=1&aip=1&tid=UA-52159295-3" + "&t=screenview&cd=start&an=WTL+Debugger&uid=" + + hashlib.md5(getpass.getuser()).hexdigest()).close + except: + # Error collecting usage + pass + + +def main(args): + host = "localhost" + if len(args) == 2: + port = args[1] + elif len(args) == 3: + host = args[1] + port = args[2] + else: + print("Usage %s [host] port") + quit() + + wtl = Debugger(host=host, port=port) + + collect_analytics() + + code.interact( + """ +\033[95m\033[1mPython Interactive Console\033[0m + +Debugger Commands: + wtl.run(): Run test until next WTL breakpoint. + wtl.step(): Execute the current waiting command and break at the next one. + wtl.stop(): Quit WTL and the Debugger. + help(wtl): Additional debugger commands. +""", + local={"wtl": wtl}) + + +if __name__ == "__main__": + main(sys.argv) diff --git a/rules_web_testing_python/webtests/webtest.py b/web_testing_python/testing/web/webtest.py similarity index 98% rename from rules_web_testing_python/webtests/webtest.py rename to web_testing_python/testing/web/webtest.py index 71458b69..5e3fd490 100644 --- a/rules_web_testing_python/webtests/webtest.py +++ b/web_testing_python/testing/web/webtest.py @@ -14,7 +14,7 @@ """Browser provisioning and information API. Provision a browser: - from pythontests import webtest + from testing.web import webtest driver = webtest.new_webdriver_session() diff --git a/rules_web_testing_python/webtests/webtest_test.py b/web_testing_python/testing/web/webtest_test.py similarity index 94% rename from rules_web_testing_python/webtests/webtest_test.py rename to web_testing_python/testing/web/webtest_test.py index f1faa763..4c484556 100644 --- a/rules_web_testing_python/webtests/webtest_test.py +++ b/web_testing_python/testing/web/webtest_test.py @@ -11,11 +11,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Tests for web.web_python.pythontests.""" +"""Tests for testing.web.webtest.""" import unittest -from webtests import webtest +from testing.web import webtest class BrowserTest(unittest.TestCase): diff --git a/rules_web_testing_python/web/BUILD.bazel b/web_testing_python/web/BUILD.bazel similarity index 100% rename from rules_web_testing_python/web/BUILD.bazel rename to web_testing_python/web/BUILD.bazel diff --git a/rules_web_testing_python/web/py.bzl b/web_testing_python/web/py.bzl similarity index 100% rename from rules_web_testing_python/web/py.bzl rename to web_testing_python/web/py.bzl diff --git a/rules_web_testing_scala/MODULE.bazel b/web_testing_scala/MODULE.bazel similarity index 100% rename from rules_web_testing_scala/MODULE.bazel rename to web_testing_scala/MODULE.bazel diff --git a/rules_web_testing_scala/scalatests/BUILD.bazel b/web_testing_scala/scalatests/BUILD.bazel similarity index 97% rename from rules_web_testing_scala/scalatests/BUILD.bazel rename to web_testing_scala/scalatests/BUILD.bazel index 5c0208f6..7b3425ec 100644 --- a/rules_web_testing_scala/scalatests/BUILD.bazel +++ b/web_testing_scala/scalatests/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2025 Google Inc. +# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/rules_web_testing_scala/scalatests/WebTestTest.scala b/web_testing_scala/scalatests/WebTestTest.scala similarity index 100% rename from rules_web_testing_scala/scalatests/WebTestTest.scala rename to web_testing_scala/scalatests/WebTestTest.scala diff --git a/rules_web_testing_scala/web/BUILD.bazel b/web_testing_scala/web/BUILD.bazel similarity index 100% rename from rules_web_testing_scala/web/BUILD.bazel rename to web_testing_scala/web/BUILD.bazel diff --git a/rules_web_testing_scala/web/scala.bzl b/web_testing_scala/web/scala.bzl similarity index 100% rename from rules_web_testing_scala/web/scala.bzl rename to web_testing_scala/web/scala.bzl From 3fd3f78b086d168ffb2b5a6a0a2c4cf4c893f928 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 18 Mar 2025 22:29:08 +0000 Subject: [PATCH 017/107] More polish --- MODULE.bazel | 2 +- build_web_modules.sh | 25 ------------------- .../com/google/testing/web/WebTestTest.java | 1 - .../testing/web/webtest_test.py | 1 + web_testing_python/web/py.bzl | 2 +- 5 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 build_web_modules.sh diff --git a/MODULE.bazel b/MODULE.bazel index f74b3686..3effa99e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -24,7 +24,7 @@ use_repo( ) ##### Java dependencies ##### -bazel_dep(name = "rules_jvm_external",version = "6.6") +bazel_dep(name = "rules_jvm_external", version = "6.6") maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") diff --git a/build_web_modules.sh b/build_web_modules.sh deleted file mode 100644 index d134651b..00000000 --- a/build_web_modules.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google Inc. All Rights Reserved -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS-IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -ex - -# Build and test web java and related tests in web_java module -(cd web_java && bazel test ... --java_runtime_version=17) - -# Build and test web python and related tests in web_python module -(cd web_python && bazel test ...) - -# Build and test web scala and related tests in web_scala module -(cd web_scala && bazel test ...) diff --git a/web_testing_java/javatests/com/google/testing/web/WebTestTest.java b/web_testing_java/javatests/com/google/testing/web/WebTestTest.java index a085e473..922a1cb0 100644 --- a/web_testing_java/javatests/com/google/testing/web/WebTestTest.java +++ b/web_testing_java/javatests/com/google/testing/web/WebTestTest.java @@ -20,7 +20,6 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import org.openqa.selenium.WebDriver; -import com.google.testing.web.WebTest; @RunWith(JUnit4.class) public class WebTestTest { diff --git a/web_testing_python/testing/web/webtest_test.py b/web_testing_python/testing/web/webtest_test.py index 4c484556..bcaa4a1d 100644 --- a/web_testing_python/testing/web/webtest_test.py +++ b/web_testing_python/testing/web/webtest_test.py @@ -17,6 +17,7 @@ from testing.web import webtest + class BrowserTest(unittest.TestCase): def testBrowserProvisioningNoCaps(self): diff --git a/web_testing_python/web/py.bzl b/web_testing_python/web/py.bzl index db58bce8..3a641736 100644 --- a/web_testing_python/web/py.bzl +++ b/web_testing_python/web/py.bzl @@ -1,4 +1,4 @@ -# Copyright 2025 Google Inc. +# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 7097ef4b7ca19dedd0361cc1745461408978deb7 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 18 Mar 2025 23:31:58 +0000 Subject: [PATCH 018/107] More polish --- .bazelignore | 1 + MODULE.bazel | 40 ++++++++++++++++--- go/webdriver/BUILD.bazel | 2 +- go/webtest/BUILD.bazel | 5 ++- go/wtl/proxy/BUILD.bazel | 2 +- .../proxy/driverhub/quithandler/BUILD.bazel | 2 +- .../proxy/driverhub/scripttimeout/BUILD.bazel | 2 +- web_testing_go/MODULE.bazel | 24 +++++++++++ {go => web_testing_go}/web/BUILD.bazel | 4 +- {go => web_testing_go}/web/go.bzl | 4 +- web_testing_scala/web/scala.bzl | 2 +- 11 files changed, 71 insertions(+), 17 deletions(-) create mode 100644 web_testing_go/MODULE.bazel rename {go => web_testing_go}/web/BUILD.bazel (88%) rename {go => web_testing_go}/web/go.bzl (87%) diff --git a/.bazelignore b/.bazelignore index bdf56a88..9dad43df 100644 --- a/.bazelignore +++ b/.bazelignore @@ -1,3 +1,4 @@ +web_testing_go web_testing_java web_testing_python web_testing_scala diff --git a/MODULE.bazel b/MODULE.bazel index 3effa99e..b177b3eb 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -3,14 +3,37 @@ module( version = "0.4.0", ) -bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep( + name = "rules_web_testing_go", +) + +local_path_override( + module_name = "rules_web_testing_go", + path = "web_testing_go", +) -bazel_dep(name = "platforms", version = "0.0.10") +bazel_dep( + name = "bazel_skylib", + version = "1.7.1", +) + +bazel_dep( + name = "platforms", + version = "0.0.10", +) ##### Go dependencies ##### -bazel_dep(name = "rules_go", version = "0.51.0-rc1", repo_name = "io_bazel_rules_go") +bazel_dep( + name = "rules_go", + version = "0.51.0-rc1", + repo_name = "io_bazel_rules_go", +) -bazel_dep(name = "gazelle", version = "0.40.0", repo_name = "bazel_gazelle") +bazel_dep( + name = "gazelle", + version = "0.40.0", + repo_name = "bazel_gazelle", +) go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") @@ -24,7 +47,10 @@ use_repo( ) ##### Java dependencies ##### -bazel_dep(name = "rules_jvm_external", version = "6.6") +bazel_dep( + name = "rules_jvm_external", + version = "6.6", +) maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") @@ -41,7 +67,9 @@ use_repo(maven, "maven") ##### Browsers dependencies ##### browser_repositories = use_extension("//web:extension.bzl", "browser_repositories_extension") + browser_repositories.install(version = "0.3.4") + use_repo( browser_repositories, "com_saucelabs_sauce_connect_linux_x64", @@ -52,7 +80,7 @@ use_repo( "org_chromium_chromedriver_macos_x64", "org_chromium_chromedriver_windows_x64", "org_chromium_chromium_linux_x64", - "org_chromium_chromium_macos_arm64", # Only available in 0.3.3 + "org_chromium_chromium_macos_arm64", # Only available in 0.3.3 "org_chromium_chromium_macos_x64", "org_chromium_chromium_windows_x64", "org_mozilla_firefox_linux_x64", diff --git a/go/webdriver/BUILD.bazel b/go/webdriver/BUILD.bazel index ce446db1..d25279a8 100644 --- a/go/webdriver/BUILD.bazel +++ b/go/webdriver/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("//go/web:go.bzl", "go_web_test_suite") +load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/webtest/BUILD.bazel b/go/webtest/BUILD.bazel index b4b5d474..e27e5e29 100644 --- a/go/webtest/BUILD.bazel +++ b/go/webtest/BUILD.bazel @@ -1,3 +1,5 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +16,7 @@ # ################################################################################ # -load("//go/web:go.bzl", "go_web_test_suite") -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/BUILD.bazel b/go/wtl/proxy/BUILD.bazel index d6d36f54..52c87858 100644 --- a/go/wtl/proxy/BUILD.bazel +++ b/go/wtl/proxy/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("//go/web:go.bzl", "go_web_test_suite") +load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/driverhub/quithandler/BUILD.bazel b/go/wtl/proxy/driverhub/quithandler/BUILD.bazel index e1e1b0a9..7e90b9ce 100644 --- a/go/wtl/proxy/driverhub/quithandler/BUILD.bazel +++ b/go/wtl/proxy/driverhub/quithandler/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("//go/web:go.bzl", "go_web_test_suite") +load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel b/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel index 6908eebe..c037a326 100644 --- a/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel +++ b/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("//go/web:go.bzl", "go_web_test_suite") +load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/web_testing_go/MODULE.bazel b/web_testing_go/MODULE.bazel new file mode 100644 index 00000000..20f84f22 --- /dev/null +++ b/web_testing_go/MODULE.bazel @@ -0,0 +1,24 @@ +module( + name = "rules_web_testing_go", + version = "0.4.0", +) + +bazel_dep( + name = "rules_webtesting", +) + +local_path_override( + module_name = "rules_webtesting", + path = "..", +) + +bazel_dep( + name = "bazel_skylib", + version = "1.7.1", +) + +bazel_dep( + name = "rules_go", + version = "0.51.0-rc1", + repo_name = "io_bazel_rules_go", +) diff --git a/go/web/BUILD.bazel b/web_testing_go/web/BUILD.bazel similarity index 88% rename from go/web/BUILD.bazel rename to web_testing_go/web/BUILD.bazel index b3e67c60..de41e9e4 100644 --- a/go/web/BUILD.bazel +++ b/web_testing_go/web/BUILD.bazel @@ -15,7 +15,7 @@ ################################################################################ # load("@bazel_skylib//:bzl_library.bzl", "bzl_library") -load("//web:web.bzl", "web_test_config") +load("@rules_webtesting//web:web.bzl", "web_test_config") package( default_testonly = True, @@ -26,7 +26,7 @@ bzl_library( name = "go", srcs = ["go.bzl"], deps = [ - "//web/internal:wrap_web_test_suite", + "@rules_webtesting//web/internal:wrap_web_test_suite", # should depend on @io_bazel_rules_go//go:def.bzl ], ) diff --git a/go/web/go.bzl b/web_testing_go/web/go.bzl similarity index 87% rename from go/web/go.bzl rename to web_testing_go/web/go.bzl index 1168176e..183226b8 100644 --- a/go/web/go.bzl +++ b/web_testing_go/web/go.bzl @@ -13,9 +13,9 @@ # limitations under the License. """Web Test rules for Go.""" -load("//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") -load("//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@rules_webtesting//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") +load("@rules_webtesting//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") def go_web_test_suite(name, go_test_tags = DEFAULT_WRAPPED_TEST_TAGS, **kwargs): """Defines a test_suite of web_test targets that wrap a go_test target. diff --git a/web_testing_scala/web/scala.bzl b/web_testing_scala/web/scala.bzl index 870d2f38..b78ec7e7 100644 --- a/web_testing_scala/web/scala.bzl +++ b/web_testing_scala/web/scala.bzl @@ -1,4 +1,4 @@ -# Copyright 2025 Google Inc. +# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 5acecd8bf93e89300ccbccc699c6e2d987f77acd Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 19 Mar 2025 02:30:05 +0000 Subject: [PATCH 019/107] More polish --- MODULE.bazel | 1 + go/webdriver/BUILD.bazel | 3 ++- go/wtl/proxy/BUILD.bazel | 3 ++- go/wtl/proxy/driverhub/quithandler/BUILD.bazel | 3 ++- go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel | 3 ++- web_testing_java/MODULE.bazel | 5 +++++ web_testing_python/MODULE.bazel | 5 +++++ web_testing_scala/MODULE.bazel | 5 +++++ 8 files changed, 24 insertions(+), 4 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index b177b3eb..7413550b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -5,6 +5,7 @@ module( bazel_dep( name = "rules_web_testing_go", + version = "0.4.0", ) local_path_override( diff --git a/go/webdriver/BUILD.bazel b/go/webdriver/BUILD.bazel index d25279a8..67229ad0 100644 --- a/go/webdriver/BUILD.bazel +++ b/go/webdriver/BUILD.bazel @@ -1,3 +1,5 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,7 +17,6 @@ ################################################################################ # load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") -load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/BUILD.bazel b/go/wtl/proxy/BUILD.bazel index 52c87858..28e0286c 100644 --- a/go/wtl/proxy/BUILD.bazel +++ b/go/wtl/proxy/BUILD.bazel @@ -1,3 +1,5 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,7 +17,6 @@ ################################################################################ # load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") -load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/driverhub/quithandler/BUILD.bazel b/go/wtl/proxy/driverhub/quithandler/BUILD.bazel index 7e90b9ce..7d2dd97d 100644 --- a/go/wtl/proxy/driverhub/quithandler/BUILD.bazel +++ b/go/wtl/proxy/driverhub/quithandler/BUILD.bazel @@ -1,3 +1,5 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,7 +17,6 @@ ################################################################################ # load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") -load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel b/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel index c037a326..9978e939 100644 --- a/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel +++ b/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel @@ -1,3 +1,5 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,7 +17,6 @@ ################################################################################ # load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") -load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/web_testing_java/MODULE.bazel b/web_testing_java/MODULE.bazel index 8e7f6b39..4cee4ab4 100644 --- a/web_testing_java/MODULE.bazel +++ b/web_testing_java/MODULE.bazel @@ -12,6 +12,11 @@ local_path_override( path = "..", ) +local_path_override( + module_name = "rules_web_testing_go", + path = "../web_testing_go", +) + bazel_dep( name = "bazel_skylib", version = "1.7.1", diff --git a/web_testing_python/MODULE.bazel b/web_testing_python/MODULE.bazel index 28f33dad..0d091c3d 100644 --- a/web_testing_python/MODULE.bazel +++ b/web_testing_python/MODULE.bazel @@ -17,6 +17,11 @@ local_path_override( path = "..", ) +local_path_override( + module_name = "rules_web_testing_go", + path = "../web_testing_go", +) + bazel_dep( name = "rules_python", version = "1.0.0", diff --git a/web_testing_scala/MODULE.bazel b/web_testing_scala/MODULE.bazel index 3168de5c..03fe5677 100644 --- a/web_testing_scala/MODULE.bazel +++ b/web_testing_scala/MODULE.bazel @@ -12,6 +12,11 @@ local_path_override( path = "..", ) +local_path_override( + module_name = "rules_web_testing_go", + path = "../web_testing_go", +) + bazel_dep( name = "bazel_skylib", version = "1.7.1", From 007f966f6185cd3fd93ce3ae4ea86a93b7f109c0 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 19 Mar 2025 02:39:35 +0000 Subject: [PATCH 020/107] Revert formatting --- MODULE.bazel | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 7413550b..6fc7e4fd 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -13,45 +13,24 @@ local_path_override( path = "web_testing_go", ) -bazel_dep( - name = "bazel_skylib", - version = "1.7.1", -) +bazel_dep(name = "bazel_skylib", version = "1.7.1") -bazel_dep( - name = "platforms", - version = "0.0.10", -) +bazel_dep(name = "platforms", version = "0.0.10") ##### Go dependencies ##### -bazel_dep( - name = "rules_go", - version = "0.51.0-rc1", - repo_name = "io_bazel_rules_go", -) +bazel_dep(name = "rules_go", version = "0.51.0-rc1", repo_name = "io_bazel_rules_go") -bazel_dep( - name = "gazelle", - version = "0.40.0", - repo_name = "bazel_gazelle", -) +bazel_dep(name = "gazelle", version = "0.40.0", repo_name = "bazel_gazelle") go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") go_deps.from_file(go_mod = "//:go.mod") # All *direct* Go dependencies of the module have to be listed explicitly. -use_repo( - go_deps, - "com_github_gorilla_mux", - "com_github_tebeka_selenium", -) +use_repo(go_deps, "com_github_gorilla_mux", "com_github_tebeka_selenium") ##### Java dependencies ##### -bazel_dep( - name = "rules_jvm_external", - version = "6.6", -) +bazel_dep(name = "rules_jvm_external", version = "6.6") maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") From 62bbe071fb6d3feb680e331ef4010abe0e978c2c Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 19 Mar 2025 02:51:08 +0000 Subject: [PATCH 021/107] Revert auto formatting --- go/webdriver/BUILD.bazel | 3 +-- go/wtl/proxy/BUILD.bazel | 3 +-- go/wtl/proxy/driverhub/quithandler/BUILD.bazel | 3 +-- go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel | 3 +-- web_testing_scala/scalatests/BUILD.bazel | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/go/webdriver/BUILD.bazel b/go/webdriver/BUILD.bazel index 67229ad0..d25279a8 100644 --- a/go/webdriver/BUILD.bazel +++ b/go/webdriver/BUILD.bazel @@ -1,5 +1,3 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +15,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") ################################################################################ # load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") +load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/BUILD.bazel b/go/wtl/proxy/BUILD.bazel index 28e0286c..52c87858 100644 --- a/go/wtl/proxy/BUILD.bazel +++ b/go/wtl/proxy/BUILD.bazel @@ -1,5 +1,3 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +15,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") ################################################################################ # load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") +load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/driverhub/quithandler/BUILD.bazel b/go/wtl/proxy/driverhub/quithandler/BUILD.bazel index 7d2dd97d..7e90b9ce 100644 --- a/go/wtl/proxy/driverhub/quithandler/BUILD.bazel +++ b/go/wtl/proxy/driverhub/quithandler/BUILD.bazel @@ -1,5 +1,3 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +15,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") ################################################################################ # load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") +load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel b/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel index 9978e939..c037a326 100644 --- a/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel +++ b/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel @@ -1,5 +1,3 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +15,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") ################################################################################ # load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") +load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/web_testing_scala/scalatests/BUILD.bazel b/web_testing_scala/scalatests/BUILD.bazel index 7b3425ec..da190c10 100644 --- a/web_testing_scala/scalatests/BUILD.bazel +++ b/web_testing_scala/scalatests/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2016 Google Inc. +# Copyright 2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 2e6173b47e46758975f13e29a45f5db2d313e811 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 19 Mar 2025 02:54:41 +0000 Subject: [PATCH 022/107] Revert formatting --- MODULE.bazel | 2 +- go/webtest/BUILD.bazel | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 6fc7e4fd..f99deb8b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -60,7 +60,7 @@ use_repo( "org_chromium_chromedriver_macos_x64", "org_chromium_chromedriver_windows_x64", "org_chromium_chromium_linux_x64", - "org_chromium_chromium_macos_arm64", # Only available in 0.3.3 + "org_chromium_chromium_macos_arm64", # Only available in 0.3.3 "org_chromium_chromium_macos_x64", "org_chromium_chromium_windows_x64", "org_mozilla_firefox_linux_x64", diff --git a/go/webtest/BUILD.bazel b/go/webtest/BUILD.bazel index e27e5e29..a4f5056a 100644 --- a/go/webtest/BUILD.bazel +++ b/go/webtest/BUILD.bazel @@ -1,5 +1,3 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +15,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") ################################################################################ # load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") +load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 From d5543b3f104213e6963ce87c3c1432fd401ca011 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 19 Mar 2025 04:22:45 +0000 Subject: [PATCH 023/107] Create symbol link --- web_testing_go/webtest/webtest | 1 + .../java}/com/google/testing/bazel/BUILD.bazel | 0 .../java}/com/google/testing/bazel/Bazel.java | 0 .../java}/com/google/testing/web/BUILD.bazel | 0 .../java}/com/google/testing/web/WebTest.java | 0 web_testing_java/javatests/com/google/testing/web/BUILD.bazel | 2 +- 6 files changed, 2 insertions(+), 1 deletion(-) create mode 120000 web_testing_go/webtest/webtest rename {java => web_testing_java/java}/com/google/testing/bazel/BUILD.bazel (100%) rename {java => web_testing_java/java}/com/google/testing/bazel/Bazel.java (100%) rename {java => web_testing_java/java}/com/google/testing/web/BUILD.bazel (100%) rename {java => web_testing_java/java}/com/google/testing/web/WebTest.java (100%) diff --git a/web_testing_go/webtest/webtest b/web_testing_go/webtest/webtest new file mode 120000 index 00000000..eb06eb85 --- /dev/null +++ b/web_testing_go/webtest/webtest @@ -0,0 +1 @@ +/usr/local/google/home/mollyibot/rules_webtesting03132/go/webtest \ No newline at end of file diff --git a/java/com/google/testing/bazel/BUILD.bazel b/web_testing_java/java/com/google/testing/bazel/BUILD.bazel similarity index 100% rename from java/com/google/testing/bazel/BUILD.bazel rename to web_testing_java/java/com/google/testing/bazel/BUILD.bazel diff --git a/java/com/google/testing/bazel/Bazel.java b/web_testing_java/java/com/google/testing/bazel/Bazel.java similarity index 100% rename from java/com/google/testing/bazel/Bazel.java rename to web_testing_java/java/com/google/testing/bazel/Bazel.java diff --git a/java/com/google/testing/web/BUILD.bazel b/web_testing_java/java/com/google/testing/web/BUILD.bazel similarity index 100% rename from java/com/google/testing/web/BUILD.bazel rename to web_testing_java/java/com/google/testing/web/BUILD.bazel diff --git a/java/com/google/testing/web/WebTest.java b/web_testing_java/java/com/google/testing/web/WebTest.java similarity index 100% rename from java/com/google/testing/web/WebTest.java rename to web_testing_java/java/com/google/testing/web/WebTest.java diff --git a/web_testing_java/javatests/com/google/testing/web/BUILD.bazel b/web_testing_java/javatests/com/google/testing/web/BUILD.bazel index 03b49ae5..3cddeb79 100644 --- a/web_testing_java/javatests/com/google/testing/web/BUILD.bazel +++ b/web_testing_java/javatests/com/google/testing/web/BUILD.bazel @@ -28,8 +28,8 @@ java_web_test_suite( "@rules_webtesting//browsers/sauce:chrome-win10-connect", ], deps = [ + "//java/com/google/testing/web", "@maven//:junit_junit", "@maven//:org_seleniumhq_selenium_selenium_api", - "@rules_webtesting//java/com/google/testing/web", ], ) From f367409e95fde98e72d6bd3a712910552f6fc655 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 19 Mar 2025 04:27:15 +0000 Subject: [PATCH 024/107] change to relative path --- web_testing_go/webtest | 1 + web_testing_go/webtest/webtest | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 120000 web_testing_go/webtest delete mode 120000 web_testing_go/webtest/webtest diff --git a/web_testing_go/webtest b/web_testing_go/webtest new file mode 120000 index 00000000..4fac5cc8 --- /dev/null +++ b/web_testing_go/webtest @@ -0,0 +1 @@ +/go/webtest \ No newline at end of file diff --git a/web_testing_go/webtest/webtest b/web_testing_go/webtest/webtest deleted file mode 120000 index eb06eb85..00000000 --- a/web_testing_go/webtest/webtest +++ /dev/null @@ -1 +0,0 @@ -/usr/local/google/home/mollyibot/rules_webtesting03132/go/webtest \ No newline at end of file From 423602e716692a0dd00ee4b2cd0b70edae402e1a Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 19 Mar 2025 23:39:55 +0000 Subject: [PATCH 025/107] More polish --- .bazelci/presubmit.yml | 24 +++++ MODULE.bazel | 16 --- go/bazel/BUILD.bazel | 2 +- go/metadata/BUILD.bazel | 6 +- testdata/BUILD.bazel | 2 +- web_testing_go/BUILD.bazel | 26 +++++ web_testing_go/MODULE.bazel | 9 ++ web_testing_go/go.mod | 10 ++ web_testing_go/go.sum | 114 +++++++++++++++++++++ web_testing_go/webtest | 1 - web_testing_go/webtest/BUILD.bazel | 49 +++++++++ web_testing_go/webtest/browserinfo_test.go | 1 + web_testing_go/webtest/webtest.go | 1 + web_testing_go/webtest/webtest_test.go | 1 + web_testing_scala/MODULE.bazel | 9 ++ web_testing_scala/scalatests/BUILD.bazel | 2 +- 16 files changed, 250 insertions(+), 23 deletions(-) create mode 100644 web_testing_go/BUILD.bazel create mode 100644 web_testing_go/go.mod create mode 100644 web_testing_go/go.sum delete mode 120000 web_testing_go/webtest create mode 100644 web_testing_go/webtest/BUILD.bazel create mode 120000 web_testing_go/webtest/browserinfo_test.go create mode 120000 web_testing_go/webtest/webtest.go create mode 120000 web_testing_go/webtest/webtest_test.go diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 7f7f5b7c..8e01199f 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -25,6 +25,30 @@ platforms: test_targets: - "//..." tasks: + web_testing_go_ubuntu2004: + name: "Go workspace for web in ubuntu" + platform: ubuntu2004 + test_flags: + - "--test_tag_filters=-noci,-external,-native,-sauce" + build_targets: ["//..."] + test_targets: ["//..."] + working_directory: web_testing_go + web_testing_go_macos: + name: "Go workspace for web in macos" + platform: macos + test_flags: + - "--test_tag_filters=-noci,-external,-native,-sauce" + build_targets: [ "//..." ] + test_targets: [ "//..." ] + working_directory: web_testing_go + web_testing_go_windows: + name: "Go workspace for web in windows" + platform: windows + test_flags: + - "--test_tag_filters=-noci,-external,-native,-sauce" + build_targets: [ "//..." ] + test_targets: [ "//..." ] + working_directory: web_testing_go web_testing_scala_ubuntu2004: name: "Scala workspace for web in ubuntu" platform: ubuntu2004 diff --git a/MODULE.bazel b/MODULE.bazel index f99deb8b..e6a47e2b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -29,22 +29,6 @@ go_deps.from_file(go_mod = "//:go.mod") # All *direct* Go dependencies of the module have to be listed explicitly. use_repo(go_deps, "com_github_gorilla_mux", "com_github_tebeka_selenium") -##### Java dependencies ##### -bazel_dep(name = "rules_jvm_external", version = "6.6") - -maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") - -maven.install( - artifacts = [ - "com.google.guava:guava:33.2.1-jre", - "org.seleniumhq.selenium:selenium-remote-driver:4.27.0", - "org.seleniumhq.selenium:selenium-api:4.27.0", - "junit:junit:4.13.2", - ], -) - -use_repo(maven, "maven") - ##### Browsers dependencies ##### browser_repositories = use_extension("//web:extension.bzl", "browser_repositories_extension") diff --git a/go/bazel/BUILD.bazel b/go/bazel/BUILD.bazel index 2df1344b..df42180d 100644 --- a/go/bazel/BUILD.bazel +++ b/go/bazel/BUILD.bazel @@ -22,6 +22,6 @@ go_library( name = "go_default_library", srcs = ["bazel.go"], importpath = "github.com/bazelbuild/rules_webtesting/go/bazel", - visibility = ["//go:__subpackages__"], + visibility = ["//visibility:public"], deps = ["//go/cmdhelper:go_default_library"], ) diff --git a/go/metadata/BUILD.bazel b/go/metadata/BUILD.bazel index 99a5d16b..181da00e 100644 --- a/go/metadata/BUILD.bazel +++ b/go/metadata/BUILD.bazel @@ -25,7 +25,7 @@ go_library( "web_test_files.go", ], importpath = "github.com/bazelbuild/rules_webtesting/go/metadata", - visibility = ["//go:__subpackages__"], + visibility = ["//visibility:public"], deps = [ "//go/bazel:go_default_library", "//go/httphelper:go_default_library", @@ -39,7 +39,7 @@ go_test( "extension_test.go", "metadata_test.go", ], - data = ["//testdata"], + data = ["@rules_webtesting//testdata"], embed = [":go_default_library"], - deps = ["//go/bazel:go_default_library"], + deps = ["@rules_webtesting//go/bazel:go_default_library"], ) diff --git a/testdata/BUILD.bazel b/testdata/BUILD.bazel index cdaac083..4b8a3994 100644 --- a/testdata/BUILD.bazel +++ b/testdata/BUILD.bazel @@ -23,7 +23,7 @@ licenses(["notice"]) # Apache 2.0 filegroup( name = "testdata", srcs = glob(["*"]), - visibility = ["//:__subpackages__"], + visibility = ["//visibility:public"], ) web_test_files( diff --git a/web_testing_go/BUILD.bazel b/web_testing_go/BUILD.bazel new file mode 100644 index 00000000..ab52bbb1 --- /dev/null +++ b/web_testing_go/BUILD.bazel @@ -0,0 +1,26 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# +load("@bazel_gazelle//:def.bzl", "gazelle") + +licenses(["notice"]) # Apache 2.0 + +exports_files(["LICENSE"]) + +gazelle( + name = "gazelle", + prefix = "github.com/bazelbuild/rules_webtesting", +) diff --git a/web_testing_go/MODULE.bazel b/web_testing_go/MODULE.bazel index 20f84f22..fe89678a 100644 --- a/web_testing_go/MODULE.bazel +++ b/web_testing_go/MODULE.bazel @@ -22,3 +22,12 @@ bazel_dep( version = "0.51.0-rc1", repo_name = "io_bazel_rules_go", ) + +bazel_dep(name = "gazelle", version = "0.40.0", repo_name = "bazel_gazelle") + +go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") + +go_deps.from_file(go_mod = "//:go.mod") + +# All *direct* Go dependencies of the module have to be listed explicitly. +use_repo(go_deps, "com_github_gorilla_mux", "com_github_tebeka_selenium") \ No newline at end of file diff --git a/web_testing_go/go.mod b/web_testing_go/go.mod new file mode 100644 index 00000000..8c2aa93c --- /dev/null +++ b/web_testing_go/go.mod @@ -0,0 +1,10 @@ +module github.com/bazelbuild/rules_webtesting + +go 1.17 + +require ( + github.com/gorilla/mux v1.8.1 + github.com/tebeka/selenium v0.9.9 +) + +require github.com/blang/semver v3.5.1+incompatible // indirect diff --git a/web_testing_go/go.sum b/web_testing_go/go.sum new file mode 100644 index 00000000..e4f19c45 --- /dev/null +++ b/web_testing_go/go.sum @@ -0,0 +1,114 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.41.0/go.mod h1:OauMR7DV8fzvZIl2qg6rkaIhD/vmgk4iwEw/h6ercmg= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e h1:4ZrkT/RzpnROylmoQL57iVUL57wGKTR5O6KpVnbm2tA= +github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-github/v27 v27.0.4/go.mod h1:/0Gr8pJ55COkmv+S/yPKCczSkUPIM/LnFyubufRNIS0= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/tebeka/selenium v0.9.9 h1:cNziB+etNgyH/7KlNI7RMC1ua5aH1+5wUlFQyzeMh+w= +github.com/tebeka/selenium v0.9.9/go.mod h1:5Fr8+pUvU6B1OiPfkdCKdXZyr5znvVkxuPd0NOdZCQc= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624190245-7f2218787638/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190626174449-989357319d63/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/web_testing_go/webtest b/web_testing_go/webtest deleted file mode 120000 index 4fac5cc8..00000000 --- a/web_testing_go/webtest +++ /dev/null @@ -1 +0,0 @@ -/go/webtest \ No newline at end of file diff --git a/web_testing_go/webtest/BUILD.bazel b/web_testing_go/webtest/BUILD.bazel new file mode 100644 index 00000000..64f2aadd --- /dev/null +++ b/web_testing_go/webtest/BUILD.bazel @@ -0,0 +1,49 @@ +# Copyright 2017 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# +load("//web:go.bzl", "go_web_test_suite") +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +licenses(["notice"]) # Apache 2.0 + +go_library( + name = "go_default_library", + srcs = ["webtest.go"], + importpath = "github.com/bazelbuild/rules_webtesting/web_testing_go/webtest", + visibility = ["//visibility:public"], + deps = [ + "@rules_webtesting//go/bazel:go_default_library", + "@rules_webtesting//go/metadata:go_default_library", + "@com_github_tebeka_selenium//:go_default_library", + ], +) + +go_web_test_suite( + name = "go_default_test", + srcs = [ + "browserinfo_test.go", + "webtest_test.go", + ], + browsers = [ + "@rules_webtesting//browsers:chromium-local", + "@rules_webtesting//browsers:firefox-local", + "@rules_webtesting//browsers/sauce:chrome-win10", + "@rules_webtesting//browsers/sauce:chrome-win10-connect", + ], + data = ["@rules_webtesting//testdata"], + embed = [":go_default_library"], + deps = ["@com_github_tebeka_selenium//:go_default_library"], +) diff --git a/web_testing_go/webtest/browserinfo_test.go b/web_testing_go/webtest/browserinfo_test.go new file mode 120000 index 00000000..1ca84f79 --- /dev/null +++ b/web_testing_go/webtest/browserinfo_test.go @@ -0,0 +1 @@ +/usr/local/google/home/mollyibot/rules_webtesting03132/go/webtest/browserinfo_test.go \ No newline at end of file diff --git a/web_testing_go/webtest/webtest.go b/web_testing_go/webtest/webtest.go new file mode 120000 index 00000000..13b963fb --- /dev/null +++ b/web_testing_go/webtest/webtest.go @@ -0,0 +1 @@ +/usr/local/google/home/mollyibot/rules_webtesting03132/go/webtest/webtest.go \ No newline at end of file diff --git a/web_testing_go/webtest/webtest_test.go b/web_testing_go/webtest/webtest_test.go new file mode 120000 index 00000000..73363cbb --- /dev/null +++ b/web_testing_go/webtest/webtest_test.go @@ -0,0 +1 @@ +/usr/local/google/home/mollyibot/rules_webtesting03132/go/webtest/webtest_test.go \ No newline at end of file diff --git a/web_testing_scala/MODULE.bazel b/web_testing_scala/MODULE.bazel index 03fe5677..71e21aac 100644 --- a/web_testing_scala/MODULE.bazel +++ b/web_testing_scala/MODULE.bazel @@ -17,6 +17,15 @@ local_path_override( path = "../web_testing_go", ) +bazel_dep( + name = "rules_web_testing_java", +) + +local_path_override( + module_name = "rules_web_testing_java", + path = "../web_testing_java", +) + bazel_dep( name = "bazel_skylib", version = "1.7.1", diff --git a/web_testing_scala/scalatests/BUILD.bazel b/web_testing_scala/scalatests/BUILD.bazel index da190c10..b4cee0d7 100644 --- a/web_testing_scala/scalatests/BUILD.bazel +++ b/web_testing_scala/scalatests/BUILD.bazel @@ -30,6 +30,6 @@ scala_web_test_suite( deps = [ "@maven//:junit_junit", "@maven//:org_seleniumhq_selenium_selenium_api", - "@rules_webtesting//java/com/google/testing/web", + "@rules_web_testing_java//java/com/google/testing/web", ], ) From db3bfdfe0db8af9ca891988591488e720e1df2b5 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 20 Mar 2025 01:53:50 +0000 Subject: [PATCH 026/107] More polish --- MODULE.bazel | 5 - web_testing_go/MODULE.bazel | 2 +- web_testing_go/go.mod | 10 -- web_testing_go/go.sum | 114 --------------------- web_testing_go/webtest/browserinfo_test.go | 2 +- web_testing_go/webtest/webtest.go | 2 +- web_testing_go/webtest/webtest_test.go | 2 +- web_testing_java/MODULE.bazel | 5 - web_testing_python/MODULE.bazel | 5 - web_testing_scala/MODULE.bazel | 5 - 10 files changed, 4 insertions(+), 148 deletions(-) delete mode 100644 web_testing_go/go.mod delete mode 100644 web_testing_go/go.sum diff --git a/MODULE.bazel b/MODULE.bazel index e6a47e2b..d0880b5b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -8,11 +8,6 @@ bazel_dep( version = "0.4.0", ) -local_path_override( - module_name = "rules_web_testing_go", - path = "web_testing_go", -) - bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "platforms", version = "0.0.10") diff --git a/web_testing_go/MODULE.bazel b/web_testing_go/MODULE.bazel index fe89678a..c50a63e8 100644 --- a/web_testing_go/MODULE.bazel +++ b/web_testing_go/MODULE.bazel @@ -27,7 +27,7 @@ bazel_dep(name = "gazelle", version = "0.40.0", repo_name = "bazel_gazelle") go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") -go_deps.from_file(go_mod = "//:go.mod") +go_deps.from_file(go_mod = "@rules_webtesting//:go.mod") # All *direct* Go dependencies of the module have to be listed explicitly. use_repo(go_deps, "com_github_gorilla_mux", "com_github_tebeka_selenium") \ No newline at end of file diff --git a/web_testing_go/go.mod b/web_testing_go/go.mod deleted file mode 100644 index 8c2aa93c..00000000 --- a/web_testing_go/go.mod +++ /dev/null @@ -1,10 +0,0 @@ -module github.com/bazelbuild/rules_webtesting - -go 1.17 - -require ( - github.com/gorilla/mux v1.8.1 - github.com/tebeka/selenium v0.9.9 -) - -require github.com/blang/semver v3.5.1+incompatible // indirect diff --git a/web_testing_go/go.sum b/web_testing_go/go.sum deleted file mode 100644 index e4f19c45..00000000 --- a/web_testing_go/go.sum +++ /dev/null @@ -1,114 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.41.0/go.mod h1:OauMR7DV8fzvZIl2qg6rkaIhD/vmgk4iwEw/h6ercmg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e h1:4ZrkT/RzpnROylmoQL57iVUL57wGKTR5O6KpVnbm2tA= -github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-github/v27 v27.0.4/go.mod h1:/0Gr8pJ55COkmv+S/yPKCczSkUPIM/LnFyubufRNIS0= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= -github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/tebeka/selenium v0.9.9 h1:cNziB+etNgyH/7KlNI7RMC1ua5aH1+5wUlFQyzeMh+w= -github.com/tebeka/selenium v0.9.9/go.mod h1:5Fr8+pUvU6B1OiPfkdCKdXZyr5znvVkxuPd0NOdZCQc= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624190245-7f2218787638/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190626174449-989357319d63/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/web_testing_go/webtest/browserinfo_test.go b/web_testing_go/webtest/browserinfo_test.go index 1ca84f79..22fad2ea 120000 --- a/web_testing_go/webtest/browserinfo_test.go +++ b/web_testing_go/webtest/browserinfo_test.go @@ -1 +1 @@ -/usr/local/google/home/mollyibot/rules_webtesting03132/go/webtest/browserinfo_test.go \ No newline at end of file +../../go/webtest/browserinfo_test.go \ No newline at end of file diff --git a/web_testing_go/webtest/webtest.go b/web_testing_go/webtest/webtest.go index 13b963fb..080357e1 120000 --- a/web_testing_go/webtest/webtest.go +++ b/web_testing_go/webtest/webtest.go @@ -1 +1 @@ -/usr/local/google/home/mollyibot/rules_webtesting03132/go/webtest/webtest.go \ No newline at end of file +../../go/webtest/webtest.go \ No newline at end of file diff --git a/web_testing_go/webtest/webtest_test.go b/web_testing_go/webtest/webtest_test.go index 73363cbb..acabea0e 120000 --- a/web_testing_go/webtest/webtest_test.go +++ b/web_testing_go/webtest/webtest_test.go @@ -1 +1 @@ -/usr/local/google/home/mollyibot/rules_webtesting03132/go/webtest/webtest_test.go \ No newline at end of file +../../go/webtest/webtest_test.go \ No newline at end of file diff --git a/web_testing_java/MODULE.bazel b/web_testing_java/MODULE.bazel index 4cee4ab4..8e7f6b39 100644 --- a/web_testing_java/MODULE.bazel +++ b/web_testing_java/MODULE.bazel @@ -12,11 +12,6 @@ local_path_override( path = "..", ) -local_path_override( - module_name = "rules_web_testing_go", - path = "../web_testing_go", -) - bazel_dep( name = "bazel_skylib", version = "1.7.1", diff --git a/web_testing_python/MODULE.bazel b/web_testing_python/MODULE.bazel index 0d091c3d..28f33dad 100644 --- a/web_testing_python/MODULE.bazel +++ b/web_testing_python/MODULE.bazel @@ -17,11 +17,6 @@ local_path_override( path = "..", ) -local_path_override( - module_name = "rules_web_testing_go", - path = "../web_testing_go", -) - bazel_dep( name = "rules_python", version = "1.0.0", diff --git a/web_testing_scala/MODULE.bazel b/web_testing_scala/MODULE.bazel index 71e21aac..d76126e7 100644 --- a/web_testing_scala/MODULE.bazel +++ b/web_testing_scala/MODULE.bazel @@ -21,11 +21,6 @@ bazel_dep( name = "rules_web_testing_java", ) -local_path_override( - module_name = "rules_web_testing_java", - path = "../web_testing_java", -) - bazel_dep( name = "bazel_skylib", version = "1.7.1", From 6aa748f210dab55c0c9709ab09c3772af52d9ca4 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 20 Mar 2025 04:26:26 +0000 Subject: [PATCH 027/107] Change sym link --- MODULE.bazel | 5 --- go/web/BUILD.bazel | 32 +++++++++++++++++ go/web/go.bzl | 33 ++++++++++++++++++ go/webdriver/BUILD.bazel | 2 +- go/webtest/BUILD.bazel | 2 +- go/wtl/proxy/BUILD.bazel | 2 +- .../proxy/driverhub/quithandler/BUILD.bazel | 2 +- .../proxy/driverhub/scripttimeout/BUILD.bazel | 2 +- web_testing_go/web/BUILD.bazel | 33 +----------------- web_testing_go/web/go.bzl | 34 +------------------ web_testing_scala/MODULE.bazel | 5 --- 11 files changed, 72 insertions(+), 80 deletions(-) create mode 100644 go/web/BUILD.bazel create mode 100644 go/web/go.bzl mode change 100644 => 120000 web_testing_go/web/BUILD.bazel mode change 100644 => 120000 web_testing_go/web/go.bzl diff --git a/MODULE.bazel b/MODULE.bazel index d0880b5b..ac865778 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -3,11 +3,6 @@ module( version = "0.4.0", ) -bazel_dep( - name = "rules_web_testing_go", - version = "0.4.0", -) - bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "platforms", version = "0.0.10") diff --git a/go/web/BUILD.bazel b/go/web/BUILD.bazel new file mode 100644 index 00000000..de41e9e4 --- /dev/null +++ b/go/web/BUILD.bazel @@ -0,0 +1,32 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("@rules_webtesting//web:web.bzl", "web_test_config") + +package( + default_testonly = True, + default_visibility = ["//visibility:public"], +) + +bzl_library( + name = "go", + srcs = ["go.bzl"], + deps = [ + "@rules_webtesting//web/internal:wrap_web_test_suite", + # should depend on @io_bazel_rules_go//go:def.bzl + ], +) diff --git a/go/web/go.bzl b/go/web/go.bzl new file mode 100644 index 00000000..183226b8 --- /dev/null +++ b/go/web/go.bzl @@ -0,0 +1,33 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Web Test rules for Go.""" + +load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@rules_webtesting//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") +load("@rules_webtesting//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") + +def go_web_test_suite(name, go_test_tags = DEFAULT_WRAPPED_TEST_TAGS, **kwargs): + """Defines a test_suite of web_test targets that wrap a go_test target. + + Args: + name: The base name of the test. + go_test_tags: A list of test tag strings to use for the go_test target. + **kwargs: Arguments for wrapped_web_test_suite + """ + wrap_web_test_suite( + name = name, + rule = go_test, + wrapped_test_tags = go_test_tags, + **kwargs + ) diff --git a/go/webdriver/BUILD.bazel b/go/webdriver/BUILD.bazel index d25279a8..ce446db1 100644 --- a/go/webdriver/BUILD.bazel +++ b/go/webdriver/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") +load("//go/web:go.bzl", "go_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/webtest/BUILD.bazel b/go/webtest/BUILD.bazel index a4f5056a..b4b5d474 100644 --- a/go/webtest/BUILD.bazel +++ b/go/webtest/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") +load("//go/web:go.bzl", "go_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/BUILD.bazel b/go/wtl/proxy/BUILD.bazel index 52c87858..d6d36f54 100644 --- a/go/wtl/proxy/BUILD.bazel +++ b/go/wtl/proxy/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") +load("//go/web:go.bzl", "go_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/driverhub/quithandler/BUILD.bazel b/go/wtl/proxy/driverhub/quithandler/BUILD.bazel index 7e90b9ce..e1e1b0a9 100644 --- a/go/wtl/proxy/driverhub/quithandler/BUILD.bazel +++ b/go/wtl/proxy/driverhub/quithandler/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") +load("//go/web:go.bzl", "go_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel b/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel index c037a326..6908eebe 100644 --- a/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel +++ b/go/wtl/proxy/driverhub/scripttimeout/BUILD.bazel @@ -14,7 +14,7 @@ # ################################################################################ # -load("@rules_web_testing_go//web:go.bzl", "go_web_test_suite") +load("//go/web:go.bzl", "go_web_test_suite") load("@io_bazel_rules_go//go:def.bzl", "go_library") licenses(["notice"]) # Apache 2.0 diff --git a/web_testing_go/web/BUILD.bazel b/web_testing_go/web/BUILD.bazel deleted file mode 100644 index de41e9e4..00000000 --- a/web_testing_go/web/BUILD.bazel +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ -# -load("@bazel_skylib//:bzl_library.bzl", "bzl_library") -load("@rules_webtesting//web:web.bzl", "web_test_config") - -package( - default_testonly = True, - default_visibility = ["//visibility:public"], -) - -bzl_library( - name = "go", - srcs = ["go.bzl"], - deps = [ - "@rules_webtesting//web/internal:wrap_web_test_suite", - # should depend on @io_bazel_rules_go//go:def.bzl - ], -) diff --git a/web_testing_go/web/BUILD.bazel b/web_testing_go/web/BUILD.bazel new file mode 120000 index 00000000..f6298d4c --- /dev/null +++ b/web_testing_go/web/BUILD.bazel @@ -0,0 +1 @@ +../../go/web/BUILD.bazel \ No newline at end of file diff --git a/web_testing_go/web/go.bzl b/web_testing_go/web/go.bzl deleted file mode 100644 index 183226b8..00000000 --- a/web_testing_go/web/go.bzl +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Web Test rules for Go.""" - -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@rules_webtesting//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") -load("@rules_webtesting//web/internal:wrap_web_test_suite.bzl", "wrap_web_test_suite") - -def go_web_test_suite(name, go_test_tags = DEFAULT_WRAPPED_TEST_TAGS, **kwargs): - """Defines a test_suite of web_test targets that wrap a go_test target. - - Args: - name: The base name of the test. - go_test_tags: A list of test tag strings to use for the go_test target. - **kwargs: Arguments for wrapped_web_test_suite - """ - wrap_web_test_suite( - name = name, - rule = go_test, - wrapped_test_tags = go_test_tags, - **kwargs - ) diff --git a/web_testing_go/web/go.bzl b/web_testing_go/web/go.bzl new file mode 120000 index 00000000..821f7f6d --- /dev/null +++ b/web_testing_go/web/go.bzl @@ -0,0 +1 @@ +../../go/web/go.bzl \ No newline at end of file diff --git a/web_testing_scala/MODULE.bazel b/web_testing_scala/MODULE.bazel index d76126e7..4683f447 100644 --- a/web_testing_scala/MODULE.bazel +++ b/web_testing_scala/MODULE.bazel @@ -12,11 +12,6 @@ local_path_override( path = "..", ) -local_path_override( - module_name = "rules_web_testing_go", - path = "../web_testing_go", -) - bazel_dep( name = "rules_web_testing_java", ) From 8a3b2528688195318c3633d6b2afbff54f81d592 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 20 Mar 2025 20:59:33 +0000 Subject: [PATCH 028/107] Modify readme --- .bazelci/presubmit.yml | 24 ++++++++++++------------ README.md | 8 ++++++-- go/web/BUILD.bazel | 2 +- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 8e01199f..3e62d8a0 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -26,7 +26,7 @@ platforms: - "//..." tasks: web_testing_go_ubuntu2004: - name: "Go workspace for web in ubuntu" + name: "rules_web_testing_go in ubuntu" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" @@ -34,7 +34,7 @@ tasks: test_targets: ["//..."] working_directory: web_testing_go web_testing_go_macos: - name: "Go workspace for web in macos" + name: "rules_web_testing_go in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" @@ -42,7 +42,7 @@ tasks: test_targets: [ "//..." ] working_directory: web_testing_go web_testing_go_windows: - name: "Go workspace for web in windows" + name: "rules_web_testing_go in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" @@ -50,7 +50,7 @@ tasks: test_targets: [ "//..." ] working_directory: web_testing_go web_testing_scala_ubuntu2004: - name: "Scala workspace for web in ubuntu" + name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" @@ -58,7 +58,7 @@ tasks: test_targets: ["//..."] working_directory: web_testing_scala web_testing_scala_macos: - name: "Scala workspace for web in macos" + name: "rules_web_testing_scala in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" @@ -66,7 +66,7 @@ tasks: test_targets: [ "//..." ] working_directory: web_testing_scala web_testing_scala_windows: - name: "Scala workspace for web in windows" + name: "rules_web_testing_scala in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" @@ -74,7 +74,7 @@ tasks: test_targets: [ "//..." ] working_directory: web_testing_scala web_testing_java_ubuntu2004: - name: "Java workspace for web in ubuntu" + name: "rules_web_testing_java in ubuntu" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" @@ -82,7 +82,7 @@ tasks: test_targets: [ "//..." ] working_directory: web_testing_java web_testing_java_macos: - name: "Java workspace for web in macos" + name: "rules_web_testing_java in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" @@ -90,7 +90,7 @@ tasks: test_targets: [ "//..." ] working_directory: web_testing_java web_testing_java_windows: - name: "Java workspace for web in windows" + name: "rules_web_testing_java in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" @@ -98,7 +98,7 @@ tasks: test_targets: [ "//..." ] working_directory: web_testing_java web_testing_python_ubuntu2004: - name: "Python workspace for web in ubuntu" + name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" @@ -106,7 +106,7 @@ tasks: test_targets: [ "//..." ] working_directory: web_testing_python web_testing_python_macos: - name: "Python workspace for web in macos" + name: "rules_web_testing_python in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" @@ -114,7 +114,7 @@ tasks: test_targets: [ "//..." ] working_directory: web_testing_python web_testing_python_windows: - name: "Python workspace for web in windows" + name: "rules_web_testing_python in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" diff --git a/README.md b/README.md index adf6569c..e665b0b4 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,14 @@ WebDriver. ## Configure your Bazel project -For all languages, you need to add the following to your MODULE.bazel file: +For each language , you need to add the following to your MODULE.bazel file: ```bzl -bazel_dep(name = "rules_webtesting", version = "0.4.0") +bazel_dep(name = "rules_webtesting_${language}", version = "0.4.0") +``` +For example for Java: +```bzl +bazel_dep(name = "rules_webtesting_java", version = "0.4.0") ``` ## Write your tests diff --git a/go/web/BUILD.bazel b/go/web/BUILD.bazel index de41e9e4..10e32208 100644 --- a/go/web/BUILD.bazel +++ b/go/web/BUILD.bazel @@ -19,7 +19,7 @@ load("@rules_webtesting//web:web.bzl", "web_test_config") package( default_testonly = True, - default_visibility = ["//visibility:public"], + default_visibility = ["//go:__subpackages__"], ) bzl_library( From a2c2afc1aed5ec3a8650f160fa5ddcd7e2cb3b63 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 21 Mar 2025 04:22:12 +0000 Subject: [PATCH 029/107] Modify ReadMe --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e665b0b4..c0e84d03 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ import ( "testing" "github.com/tebeka/selenium" - "github.com/bazelbuild/rules_webtesting/go/webtest" + "github.com/bazelbuild/rules_web_testing_go/webtest" ) func TestWebApp(t *testing.T) { @@ -104,7 +104,7 @@ In your BUILD files, load the correct language specific build rule and create a test target using it: ```bzl -load("@rules_webtesting//web:py.bzl", "py_web_test_suite") +load("@rules_web_testing_python//web:py.bzl", "py_web_test_suite") py_web_test_suite( name = "browser_test", From 24f50e000cb5c3378e95ce0848507a97ff44bea4 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Sat, 22 Mar 2025 00:23:52 +0000 Subject: [PATCH 030/107] test pipeline --- .bazelci/presubmit.yml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 3e62d8a0..db91779f 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -1,29 +1,4 @@ --- -platforms: - ubuntu2204: - build_targets: - - "//..." - test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" - test_targets: - - "//..." - macos: - build_targets: - - "//..." - test_flags: - - "--test_tag_filters=-noci,-sauce,-external,-native" - test_targets: - - "//..." - windows: - build_flags: - - "--enable_runfiles" - build_targets: - - "//..." - test_flags: - - "--test_tag_filters=-noci,-sauce,-external,-native" - - "--enable_runfiles" - test_targets: - - "//..." tasks: web_testing_go_ubuntu2004: name: "rules_web_testing_go in ubuntu" From afec4d7c110677c773e802330eb1b5e64ba26b6e Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Sat, 22 Mar 2025 01:17:40 +0000 Subject: [PATCH 031/107] Modify --- web_testing_scala/MODULE.bazel | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web_testing_scala/MODULE.bazel b/web_testing_scala/MODULE.bazel index 4683f447..e9f16d34 100644 --- a/web_testing_scala/MODULE.bazel +++ b/web_testing_scala/MODULE.bazel @@ -16,6 +16,12 @@ bazel_dep( name = "rules_web_testing_java", ) + +local_path_override( + module_name = "rules_web_testing_java", + path = "../web_testing_java", +) + bazel_dep( name = "bazel_skylib", version = "1.7.1", From e40d5b51fcbb39eae481f7acdc24ce0b17d50617 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Sat, 22 Mar 2025 01:41:03 +0000 Subject: [PATCH 032/107] modify2 --- .bazelci/presubmit.yml | 48 +++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index db91779f..bc7074d4 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -5,94 +5,94 @@ tasks: platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - build_targets: ["//..."] - test_targets: ["//..."] + build_targets: ["..."] + test_targets: ["..."] working_directory: web_testing_go web_testing_go_macos: name: "rules_web_testing_go in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - build_targets: [ "//..." ] - test_targets: [ "//..." ] + build_targets: ["..." ] + test_targets: [ "..." ] working_directory: web_testing_go web_testing_go_windows: name: "rules_web_testing_go in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - build_targets: [ "//..." ] - test_targets: [ "//..." ] + build_targets: [ "..." ] + test_targets: [ "..." ] working_directory: web_testing_go web_testing_scala_ubuntu2004: name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - build_targets: ["//..."] - test_targets: ["//..."] + build_targets: ["..."] + test_targets: ["..."] working_directory: web_testing_scala web_testing_scala_macos: name: "rules_web_testing_scala in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - build_targets: [ "//..." ] - test_targets: [ "//..." ] + build_targets: [ "..." ] + test_targets: [ "..." ] working_directory: web_testing_scala web_testing_scala_windows: name: "rules_web_testing_scala in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - build_targets: [ "//..." ] - test_targets: [ "//..." ] + build_targets: [ "..." ] + test_targets: [ "..." ] working_directory: web_testing_scala web_testing_java_ubuntu2004: name: "rules_web_testing_java in ubuntu" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - build_targets: [ "//..." ] - test_targets: [ "//..." ] + build_targets: [ "..." ] + test_targets: [ "..." ] working_directory: web_testing_java web_testing_java_macos: name: "rules_web_testing_java in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - build_targets: [ "//..." ] - test_targets: [ "//..." ] + build_targets: [ "..." ] + test_targets: [ "..." ] working_directory: web_testing_java web_testing_java_windows: name: "rules_web_testing_java in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - build_targets: [ "//..." ] - test_targets: [ "//..." ] + build_targets: [ "..." ] + test_targets: [ "..." ] working_directory: web_testing_java web_testing_python_ubuntu2004: name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - build_targets: [ "//..." ] - test_targets: [ "//..." ] + build_targets: [ "..." ] + test_targets: [ "..." ] working_directory: web_testing_python web_testing_python_macos: name: "rules_web_testing_python in macos" platform: macos test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - build_targets: [ "//..." ] - test_targets: [ "//..." ] + build_targets: [ "..." ] + test_targets: [ "..." ] working_directory: web_testing_python web_testing_python_windows: name: "rules_web_testing_python in windows" platform: windows test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - build_targets: [ "//..." ] - test_targets: [ "//..." ] + build_targets: [ "..." ] + test_targets: [ "..." ] working_directory: web_testing_python From e41bad4be17d07063eb384b6736e97022d65c00f Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Sat, 29 Mar 2025 00:12:24 +0000 Subject: [PATCH 033/107] remove native tag --- browsers/BUILD.bazel | 3 --- 1 file changed, 3 deletions(-) diff --git a/browsers/BUILD.bazel b/browsers/BUILD.bazel index f8d5a280..ada9253b 100644 --- a/browsers/BUILD.bazel +++ b/browsers/BUILD.bazel @@ -50,9 +50,6 @@ browser( browser( name = "chromium-local", metadata = "chromium-local.json", - required_tags = [ - "native", - ], deps = [ "//go/wsl", "//third_party/chromedriver", From 2a5af80acb50a95d6be45f28f7c24f68b85df472 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Sat, 29 Mar 2025 06:00:24 +0000 Subject: [PATCH 034/107] enable native tests --- .bazelci/presubmit.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index bc7074d4..16b3cdf6 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -4,7 +4,7 @@ tasks: name: "rules_web_testing_go in ubuntu" platform: ubuntu2004 test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" build_targets: ["..."] test_targets: ["..."] working_directory: web_testing_go @@ -12,7 +12,7 @@ tasks: name: "rules_web_testing_go in macos" platform: macos test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" build_targets: ["..." ] test_targets: [ "..." ] working_directory: web_testing_go @@ -20,7 +20,7 @@ tasks: name: "rules_web_testing_go in windows" platform: windows test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_go @@ -28,7 +28,7 @@ tasks: name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" build_targets: ["..."] test_targets: ["..."] working_directory: web_testing_scala @@ -36,7 +36,7 @@ tasks: name: "rules_web_testing_scala in macos" platform: macos test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_scala @@ -44,7 +44,7 @@ tasks: name: "rules_web_testing_scala in windows" platform: windows test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_scala @@ -52,7 +52,7 @@ tasks: name: "rules_web_testing_java in ubuntu" platform: ubuntu2004 test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_java @@ -60,7 +60,7 @@ tasks: name: "rules_web_testing_java in macos" platform: macos test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_java @@ -68,7 +68,7 @@ tasks: name: "rules_web_testing_java in windows" platform: windows test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_java @@ -76,7 +76,7 @@ tasks: name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_python @@ -84,7 +84,7 @@ tasks: name: "rules_web_testing_python in macos" platform: macos test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_python @@ -92,7 +92,7 @@ tasks: name: "rules_web_testing_python in windows" platform: windows test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_python From 3699511f39f0f959f290f40d577ecb8479fd7258 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 31 Mar 2025 06:41:38 +0000 Subject: [PATCH 035/107] modify tests --- web_testing_go/testdata/BUILD | 26 +++++++++++++++++++++++++ web_testing_go/testdata/all-fields.json | 1 + web_testing_go/webtest/BUILD.bazel | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 web_testing_go/testdata/BUILD create mode 120000 web_testing_go/testdata/all-fields.json diff --git a/web_testing_go/testdata/BUILD b/web_testing_go/testdata/BUILD new file mode 100644 index 00000000..28431762 --- /dev/null +++ b/web_testing_go/testdata/BUILD @@ -0,0 +1,26 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# + +package(default_testonly = True) + +licenses(["notice"]) # Apache 2.0 + +filegroup( + name = "testdata", + srcs = glob(["*"]), + visibility = ["//visibility:public"], +) \ No newline at end of file diff --git a/web_testing_go/testdata/all-fields.json b/web_testing_go/testdata/all-fields.json new file mode 120000 index 00000000..1dd3b8eb --- /dev/null +++ b/web_testing_go/testdata/all-fields.json @@ -0,0 +1 @@ +../../testdata/all-fields.json \ No newline at end of file diff --git a/web_testing_go/webtest/BUILD.bazel b/web_testing_go/webtest/BUILD.bazel index 64f2aadd..ce882d9c 100644 --- a/web_testing_go/webtest/BUILD.bazel +++ b/web_testing_go/webtest/BUILD.bazel @@ -43,7 +43,7 @@ go_web_test_suite( "@rules_webtesting//browsers/sauce:chrome-win10", "@rules_webtesting//browsers/sauce:chrome-win10-connect", ], - data = ["@rules_webtesting//testdata"], + data = ["//testdata"], embed = [":go_default_library"], deps = ["@com_github_tebeka_selenium//:go_default_library"], ) From 94e62f3e1d604af2b52b497599e212700c3a2053 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 31 Mar 2025 19:26:13 +0000 Subject: [PATCH 036/107] disable python chrome test as it is timeout --- web_testing_python/testing/web/BUILD.bazel | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web_testing_python/testing/web/BUILD.bazel b/web_testing_python/testing/web/BUILD.bazel index d56e049b..d14447e8 100644 --- a/web_testing_python/testing/web/BUILD.bazel +++ b/web_testing_python/testing/web/BUILD.bazel @@ -43,6 +43,8 @@ py_web_test_suite( tags = { "chromium-local": [ "native", + "sauce", + "notravis", ], "chrome-win10": [ "exclusive", From 946581e2b0328cf183586e3f8868d5cff5c0a52d Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 3 Apr 2025 04:07:35 +0000 Subject: [PATCH 037/107] test original test without external flag --- .bazelci/presubmit.yml | 110 +++++++---------------------------------- 1 file changed, 19 insertions(+), 91 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 16b3cdf6..2e572006 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -1,98 +1,26 @@ --- -tasks: - web_testing_go_ubuntu2004: - name: "rules_web_testing_go in ubuntu" - platform: ubuntu2004 +platforms: + ubuntu2204: + build_targets: + - "//..." test_flags: - "--test_tag_filters=-noci,-sauce" - build_targets: ["..."] - test_targets: ["..."] - working_directory: web_testing_go - web_testing_go_macos: - name: "rules_web_testing_go in macos" - platform: macos + test_targets: + - "//..." + macos: + build_targets: + - "//..." test_flags: - "--test_tag_filters=-noci,-sauce" - build_targets: ["..." ] - test_targets: [ "..." ] - working_directory: web_testing_go - web_testing_go_windows: - name: "rules_web_testing_go in windows" - platform: windows + test_targets: + - "//..." + windows: + build_flags: + - "--enable_runfiles" + build_targets: + - "//..." test_flags: - "--test_tag_filters=-noci,-sauce" - build_targets: [ "..." ] - test_targets: [ "..." ] - working_directory: web_testing_go - web_testing_scala_ubuntu2004: - name: "rules_web_testing_scala in ubuntu" - platform: ubuntu2004 - test_flags: - - "--test_tag_filters=-noci,-sauce" - build_targets: ["..."] - test_targets: ["..."] - working_directory: web_testing_scala - web_testing_scala_macos: - name: "rules_web_testing_scala in macos" - platform: macos - test_flags: - - "--test_tag_filters=-noci,-sauce" - build_targets: [ "..." ] - test_targets: [ "..." ] - working_directory: web_testing_scala - web_testing_scala_windows: - name: "rules_web_testing_scala in windows" - platform: windows - test_flags: - - "--test_tag_filters=-noci,-sauce" - build_targets: [ "..." ] - test_targets: [ "..." ] - working_directory: web_testing_scala - web_testing_java_ubuntu2004: - name: "rules_web_testing_java in ubuntu" - platform: ubuntu2004 - test_flags: - - "--test_tag_filters=-noci,-sauce" - build_targets: [ "..." ] - test_targets: [ "..." ] - working_directory: web_testing_java - web_testing_java_macos: - name: "rules_web_testing_java in macos" - platform: macos - test_flags: - - "--test_tag_filters=-noci,-sauce" - build_targets: [ "..." ] - test_targets: [ "..." ] - working_directory: web_testing_java - web_testing_java_windows: - name: "rules_web_testing_java in windows" - platform: windows - test_flags: - - "--test_tag_filters=-noci,-sauce" - build_targets: [ "..." ] - test_targets: [ "..." ] - working_directory: web_testing_java - web_testing_python_ubuntu2004: - name: "rules_web_testing_python in ubuntu" - platform: ubuntu2004 - test_flags: - - "--test_tag_filters=-noci,-sauce" - build_targets: [ "..." ] - test_targets: [ "..." ] - working_directory: web_testing_python - web_testing_python_macos: - name: "rules_web_testing_python in macos" - platform: macos - test_flags: - - "--test_tag_filters=-noci,-sauce" - build_targets: [ "..." ] - test_targets: [ "..." ] - working_directory: web_testing_python - web_testing_python_windows: - name: "rules_web_testing_python in windows" - platform: windows - test_flags: - - "--test_tag_filters=-noci,-sauce" - build_targets: [ "..." ] - test_targets: [ "..." ] - working_directory: web_testing_python + - "--enable_runfiles" + test_targets: + - "//..." From 85907df5484263b29e5643d0b60184ad7b1d8904 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 3 Apr 2025 04:17:35 +0000 Subject: [PATCH 038/107] Update presubmit yml --- .bazelci/presubmit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 2e572006..0d2235f2 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -4,14 +4,14 @@ platforms: build_targets: - "//..." test_flags: - - "--test_tag_filters=-noci,-sauce" + - "--test_tag_filters=-noci,-external,-native,-sauce" test_targets: - "//..." macos: build_targets: - "//..." test_flags: - - "--test_tag_filters=-noci,-sauce" + - "--test_tag_filters=-noci,-sauce,-external,-native" test_targets: - "//..." windows: @@ -20,7 +20,7 @@ platforms: build_targets: - "//..." test_flags: - - "--test_tag_filters=-noci,-sauce" + - "--test_tag_filters=-noci,-sauce,-external,-native" - "--enable_runfiles" test_targets: - "//..." From 1312df5c6923d58c7921c1faad6db93765a6beac Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 3 Apr 2025 05:29:23 +0000 Subject: [PATCH 039/107] Remove external and native --- .bazelci/presubmit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 0d2235f2..2e572006 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -4,14 +4,14 @@ platforms: build_targets: - "//..." test_flags: - - "--test_tag_filters=-noci,-external,-native,-sauce" + - "--test_tag_filters=-noci,-sauce" test_targets: - "//..." macos: build_targets: - "//..." test_flags: - - "--test_tag_filters=-noci,-sauce,-external,-native" + - "--test_tag_filters=-noci,-sauce" test_targets: - "//..." windows: @@ -20,7 +20,7 @@ platforms: build_targets: - "//..." test_flags: - - "--test_tag_filters=-noci,-sauce,-external,-native" + - "--test_tag_filters=-noci,-sauce" - "--enable_runfiles" test_targets: - "//..." From ede487ace8ff6238a329f0a8913a0097b06a9066 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 3 Apr 2025 17:46:15 +0000 Subject: [PATCH 040/107] Update gazelle version --- web_testing_go/MODULE.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_testing_go/MODULE.bazel b/web_testing_go/MODULE.bazel index c50a63e8..ef80b9bf 100644 --- a/web_testing_go/MODULE.bazel +++ b/web_testing_go/MODULE.bazel @@ -23,7 +23,7 @@ bazel_dep( repo_name = "io_bazel_rules_go", ) -bazel_dep(name = "gazelle", version = "0.40.0", repo_name = "bazel_gazelle") +bazel_dep(name = "gazelle", version = "0.42.0", repo_name = "bazel_gazelle") go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") From 90d393fb853699c85b07b5c0d1c61fdd3d0e80d2 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 16 Apr 2025 19:36:33 +0000 Subject: [PATCH 041/107] update the bazel ci to search for the libco --- .bazelci/presubmit.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 2e572006..b5dec4e5 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -1,6 +1,8 @@ --- platforms: ubuntu2204: + shell_commands: + - "apt policy libxcb1" build_targets: - "//..." test_flags: From 1ad4a0e58b18c7f002f2ce6a505c7af524d73c4f Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 16 Apr 2025 21:51:40 +0000 Subject: [PATCH 042/107] install libxcb1 --- .bazelci/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index b5dec4e5..49958f0f 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -2,7 +2,7 @@ platforms: ubuntu2204: shell_commands: - - "apt policy libxcb1" + - "sudo apt -y update && sudo apt -y install libxcb1" build_targets: - "//..." test_flags: From 0b030110583ccb53a7fcf19e392c18d19e83a211 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 18 Apr 2025 02:28:11 +0000 Subject: [PATCH 043/107] install more dynamic deps --- .bazelci/presubmit.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 49958f0f..d40d5c30 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -2,7 +2,37 @@ platforms: ubuntu2204: shell_commands: - - "sudo apt -y update && sudo apt -y install libxcb1" + - "sudo apt -y update && sudo apt -ylibasound2" + - "sudo apt -y update && sudo apt -ylibatk-bridge2.0-0" + - "sudo apt -y update && sudo apt -y libatk1.0-0" + - "sudo apt -y update && sudo apt -y libc6" + - "sudo apt -y update && sudo apt -y libcairo2" + - "sudo apt -y update && sudo apt -y libcups2" + - "sudo apt -y update && sudo apt -y libdbus-1-3" + - "sudo apt -y update && sudo apt -y libexpat1" + - "sudo apt -y update && sudo apt -y libfontconfig1" + - "sudo apt -y update && sudo apt -y libgbm1" + - "sudo apt -y update && sudo apt -y libgcc1" + - "sudo apt -y update && sudo apt -y libglib2.0-0" + - "sudo apt -y update && sudo apt -y libgtk-3-0" + - "sudo apt -y update && sudo apt -y libnspr4" + - "sudo apt -y update && sudo apt -y libnss3" + - "sudo apt -y update && sudo apt -y libpango-1.0-0" + - "sudo apt -y update && sudo apt -y libpangocairo-1.0-0" + - "sudo apt -y update && sudo apt -y libstdc++6" + - "sudo apt -y update && sudo apt -y libx11-6" + - "sudo apt -y update && sudo apt -y libx11-xcb1" + - "sudo apt -y update && sudo apt -y libxcb1" + - "sudo apt -y update && sudo apt -y libxcomposite1" + - "sudo apt -y update && sudo apt -y libxcursor1" + - "sudo apt -y update && sudo apt -y libxdamage1" + - "sudo apt -y update && sudo apt -y libxext6" + - "sudo apt -y update && sudo apt -y libxfixes3" + - "sudo apt -y update && sudo apt -y libxi6" + - "sudo apt -y update && sudo apt -y libxrandr2" + - "sudo apt -y update && sudo apt -y libxrender1" + - "sudo apt -y update && sudo apt -y libxss1" + - "sudo apt -y update && sudo apt -y libxtst6" build_targets: - "//..." test_flags: From fcb2000de15ef8a851802bf5b377e6eba6441b93 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 18 Apr 2025 16:50:48 +0000 Subject: [PATCH 044/107] check packages --- .bazelci/presubmit.yml | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index d40d5c30..2412eb56 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -2,37 +2,8 @@ platforms: ubuntu2204: shell_commands: - - "sudo apt -y update && sudo apt -ylibasound2" - - "sudo apt -y update && sudo apt -ylibatk-bridge2.0-0" - - "sudo apt -y update && sudo apt -y libatk1.0-0" - - "sudo apt -y update && sudo apt -y libc6" - - "sudo apt -y update && sudo apt -y libcairo2" - - "sudo apt -y update && sudo apt -y libcups2" - - "sudo apt -y update && sudo apt -y libdbus-1-3" - - "sudo apt -y update && sudo apt -y libexpat1" - - "sudo apt -y update && sudo apt -y libfontconfig1" - - "sudo apt -y update && sudo apt -y libgbm1" - - "sudo apt -y update && sudo apt -y libgcc1" - - "sudo apt -y update && sudo apt -y libglib2.0-0" - - "sudo apt -y update && sudo apt -y libgtk-3-0" - - "sudo apt -y update && sudo apt -y libnspr4" - - "sudo apt -y update && sudo apt -y libnss3" - - "sudo apt -y update && sudo apt -y libpango-1.0-0" - - "sudo apt -y update && sudo apt -y libpangocairo-1.0-0" - - "sudo apt -y update && sudo apt -y libstdc++6" - - "sudo apt -y update && sudo apt -y libx11-6" - - "sudo apt -y update && sudo apt -y libx11-xcb1" - - "sudo apt -y update && sudo apt -y libxcb1" - - "sudo apt -y update && sudo apt -y libxcomposite1" - - "sudo apt -y update && sudo apt -y libxcursor1" - - "sudo apt -y update && sudo apt -y libxdamage1" - - "sudo apt -y update && sudo apt -y libxext6" - - "sudo apt -y update && sudo apt -y libxfixes3" - - "sudo apt -y update && sudo apt -y libxi6" - - "sudo apt -y update && sudo apt -y libxrandr2" - - "sudo apt -y update && sudo apt -y libxrender1" - - "sudo apt -y update && sudo apt -y libxss1" - - "sudo apt -y update && sudo apt -y libxtst6" + - "apt list --upgradable" + build_targets: - "//..." test_flags: From 700ccaebfefd0d2d85c28234d25e9c6d2401503d Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 18 Apr 2025 18:54:25 +0000 Subject: [PATCH 045/107] update install script --- .bazelci/presubmit.yml | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 2412eb56..908c248c 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -2,8 +2,37 @@ platforms: ubuntu2204: shell_commands: - - "apt list --upgradable" - + - "sudo apt -y update && sudo apt -y libasound2" + - "sudo apt -y update && sudo apt -y libatk-bridge2.0-0" + - "sudo apt -y update && sudo apt -y libatk1.0-0" + - "sudo apt -y update && sudo apt -y libc6" + - "sudo apt -y update && sudo apt -y libcairo2" + - "sudo apt -y update && sudo apt -y libcups2" + - "sudo apt -y update && sudo apt -y libdbus-1-3" + - "sudo apt -y update && sudo apt -y libexpat1" + - "sudo apt -y update && sudo apt -y libfontconfig1" + - "sudo apt -y update && sudo apt -y libgbm1" + - "sudo apt -y update && sudo apt -y libgcc1" + - "sudo apt -y update && sudo apt -y libglib2.0-0" + - "sudo apt -y update && sudo apt -y libgtk-3-0" + - "sudo apt -y update && sudo apt -y libnspr4" + - "sudo apt -y update && sudo apt -y libnss3" + - "sudo apt -y update && sudo apt -y libpango-1.0-0" + - "sudo apt -y update && sudo apt -y libpangocairo-1.0-0" + - "sudo apt -y update && sudo apt -y libstdc++6" + - "sudo apt -y update && sudo apt -y libx11-6" + - "sudo apt -y update && sudo apt -y libx11-xcb1" + - "sudo apt -y update && sudo apt -y libxcb1" + - "sudo apt -y update && sudo apt -y libxcomposite1" + - "sudo apt -y update && sudo apt -y libxcursor1" + - "sudo apt -y update && sudo apt -y libxdamage1" + - "sudo apt -y update && sudo apt -y libxext6" + - "sudo apt -y update && sudo apt -y libxfixes3" + - "sudo apt -y update && sudo apt -y libxi6" + - "sudo apt -y update && sudo apt -y libxrandr2" + - "sudo apt -y update && sudo apt -y libxrender1" + - "sudo apt -y update && sudo apt -y libxss1" + - "sudo apt -y update && sudo apt -y libxtst6" build_targets: - "//..." test_flags: From d7249341f3d440ef36360fb6d4cf19150385cbdf Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 18 Apr 2025 19:14:23 +0000 Subject: [PATCH 046/107] intall more packages --- .bazelci/presubmit.yml | 62 +++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 908c248c..268d01d7 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -2,37 +2,37 @@ platforms: ubuntu2204: shell_commands: - - "sudo apt -y update && sudo apt -y libasound2" - - "sudo apt -y update && sudo apt -y libatk-bridge2.0-0" - - "sudo apt -y update && sudo apt -y libatk1.0-0" - - "sudo apt -y update && sudo apt -y libc6" - - "sudo apt -y update && sudo apt -y libcairo2" - - "sudo apt -y update && sudo apt -y libcups2" - - "sudo apt -y update && sudo apt -y libdbus-1-3" - - "sudo apt -y update && sudo apt -y libexpat1" - - "sudo apt -y update && sudo apt -y libfontconfig1" - - "sudo apt -y update && sudo apt -y libgbm1" - - "sudo apt -y update && sudo apt -y libgcc1" - - "sudo apt -y update && sudo apt -y libglib2.0-0" - - "sudo apt -y update && sudo apt -y libgtk-3-0" - - "sudo apt -y update && sudo apt -y libnspr4" - - "sudo apt -y update && sudo apt -y libnss3" - - "sudo apt -y update && sudo apt -y libpango-1.0-0" - - "sudo apt -y update && sudo apt -y libpangocairo-1.0-0" - - "sudo apt -y update && sudo apt -y libstdc++6" - - "sudo apt -y update && sudo apt -y libx11-6" - - "sudo apt -y update && sudo apt -y libx11-xcb1" - - "sudo apt -y update && sudo apt -y libxcb1" - - "sudo apt -y update && sudo apt -y libxcomposite1" - - "sudo apt -y update && sudo apt -y libxcursor1" - - "sudo apt -y update && sudo apt -y libxdamage1" - - "sudo apt -y update && sudo apt -y libxext6" - - "sudo apt -y update && sudo apt -y libxfixes3" - - "sudo apt -y update && sudo apt -y libxi6" - - "sudo apt -y update && sudo apt -y libxrandr2" - - "sudo apt -y update && sudo apt -y libxrender1" - - "sudo apt -y update && sudo apt -y libxss1" - - "sudo apt -y update && sudo apt -y libxtst6" + - "sudo apt -y update && sudo apt -y install libasound2" + - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" + - "sudo apt -y update && sudo apt -y install libatk1.0-0" + - "sudo apt -y update && sudo apt -y install libc6" + - "sudo apt -y update && sudo apt -y install libcairo2" + - "sudo apt -y update && sudo apt -y install libcups2" + - "sudo apt -y update && sudo apt -y install libdbus-1-3" + - "sudo apt -y update && sudo apt -y install libexpat1" + - "sudo apt -y update && sudo apt -y install libfontconfig1" + - "sudo apt -y update && sudo apt -y install libgbm1" + - "sudo apt -y update && sudo apt -y install libgcc1" + - "sudo apt -y update && sudo apt -y install libglib2.0-0" + - "sudo apt -y update && sudo apt -y install libgtk-3-0" + - "sudo apt -y update && sudo apt -y install libnspr4" + - "sudo apt -y update && sudo apt -y install libnss3" + - "sudo apt -y update && sudo apt -y install libpango-1.0-0" + - "sudo apt -y update && sudo apt -y install libpangocairo-1.0-0" + - "sudo apt -y update && sudo apt -y install libstdc++6" + - "sudo apt -y update && sudo apt -y install libx11-6" + - "sudo apt -y update && sudo apt -y install libx11-xcb1" + - "sudo apt -y update && sudo apt -y install libxcb1" + - "sudo apt -y update && sudo apt -y install libxcomposite1" + - "sudo apt -y update && sudo apt -y install libxcursor1" + - "sudo apt -y update && sudo apt -y install libxdamage1" + - "sudo apt -y update && sudo apt -y install libxext6" + - "sudo apt -y update && sudo apt -y install libxfixes3" + - "sudo apt -y update && sudo apt -y install libxi6" + - "sudo apt -y update && sudo apt -y install libxrandr2" + - "sudo apt -y update && sudo apt -y install libxrender1" + - "sudo apt -y update && sudo apt -y install libxss1" + - "sudo apt -y update && sudo apt -y install libxtst6" build_targets: - "//..." test_flags: From 832eff7ec3c4054b9dc584e54ea9d17d98cf7ab1 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 22 Apr 2025 17:40:35 +0000 Subject: [PATCH 047/107] Update config in macos --- .bazelci/presubmit.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 268d01d7..7cdca995 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -40,6 +40,38 @@ platforms: test_targets: - "//..." macos: + shell_commands: + - "sudo apt -y update && sudo apt -y install libasound2" + - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" + - "sudo apt -y update && sudo apt -y install libatk1.0-0" + - "sudo apt -y update && sudo apt -y install libc6" + - "sudo apt -y update && sudo apt -y install libcairo2" + - "sudo apt -y update && sudo apt -y install libcups2" + - "sudo apt -y update && sudo apt -y install libdbus-1-3" + - "sudo apt -y update && sudo apt -y install libexpat1" + - "sudo apt -y update && sudo apt -y install libfontconfig1" + - "sudo apt -y update && sudo apt -y install libgbm1" + - "sudo apt -y update && sudo apt -y install libgcc1" + - "sudo apt -y update && sudo apt -y install libglib2.0-0" + - "sudo apt -y update && sudo apt -y install libgtk-3-0" + - "sudo apt -y update && sudo apt -y install libnspr4" + - "sudo apt -y update && sudo apt -y install libnss3" + - "sudo apt -y update && sudo apt -y install libpango-1.0-0" + - "sudo apt -y update && sudo apt -y install libpangocairo-1.0-0" + - "sudo apt -y update && sudo apt -y install libstdc++6" + - "sudo apt -y update && sudo apt -y install libx11-6" + - "sudo apt -y update && sudo apt -y install libx11-xcb1" + - "sudo apt -y update && sudo apt -y install libxcb1" + - "sudo apt -y update && sudo apt -y install libxcomposite1" + - "sudo apt -y update && sudo apt -y install libxcursor1" + - "sudo apt -y update && sudo apt -y install libxdamage1" + - "sudo apt -y update && sudo apt -y install libxext6" + - "sudo apt -y update && sudo apt -y install libxfixes3" + - "sudo apt -y update && sudo apt -y install libxi6" + - "sudo apt -y update && sudo apt -y install libxrandr2" + - "sudo apt -y update && sudo apt -y install libxrender1" + - "sudo apt -y update && sudo apt -y install libxss1" + - "sudo apt -y update && sudo apt -y install libxtst6"c build_targets: - "//..." test_flags: From 70977d54d9a1ba44fc31ade8a97c15919ba784a5 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 22 Apr 2025 17:44:57 +0000 Subject: [PATCH 048/107] remove c --- .bazelci/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 7cdca995..898ecc43 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -71,7 +71,7 @@ platforms: - "sudo apt -y update && sudo apt -y install libxrandr2" - "sudo apt -y update && sudo apt -y install libxrender1" - "sudo apt -y update && sudo apt -y install libxss1" - - "sudo apt -y update && sudo apt -y install libxtst6"c + - "sudo apt -y update && sudo apt -y install libxtst6" build_targets: - "//..." test_flags: From 82d1ba9104d24371a58d76107346334f70089a28 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 23 Apr 2025 18:08:18 +0000 Subject: [PATCH 049/107] add libdbus-glib-1-2 for firefox --- .bazelci/presubmit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 898ecc43..a564fa0e 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -9,6 +9,7 @@ platforms: - "sudo apt -y update && sudo apt -y install libcairo2" - "sudo apt -y update && sudo apt -y install libcups2" - "sudo apt -y update && sudo apt -y install libdbus-1-3" + - "sudo apt -y update && sudo apt -y install libdbus-glib-1-2" - "sudo apt -y update && sudo apt -y install libexpat1" - "sudo apt -y update && sudo apt -y install libfontconfig1" - "sudo apt -y update && sudo apt -y install libgbm1" From 3c566e95a2b3e81aae44af6457380021972442ab Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 24 Apr 2025 00:26:42 +0000 Subject: [PATCH 050/107] update macos system libs --- .bazelci/presubmit.yml | 62 +++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index a564fa0e..ee965645 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -42,37 +42,37 @@ platforms: - "//..." macos: shell_commands: - - "sudo apt -y update && sudo apt -y install libasound2" - - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" - - "sudo apt -y update && sudo apt -y install libatk1.0-0" - - "sudo apt -y update && sudo apt -y install libc6" - - "sudo apt -y update && sudo apt -y install libcairo2" - - "sudo apt -y update && sudo apt -y install libcups2" - - "sudo apt -y update && sudo apt -y install libdbus-1-3" - - "sudo apt -y update && sudo apt -y install libexpat1" - - "sudo apt -y update && sudo apt -y install libfontconfig1" - - "sudo apt -y update && sudo apt -y install libgbm1" - - "sudo apt -y update && sudo apt -y install libgcc1" - - "sudo apt -y update && sudo apt -y install libglib2.0-0" - - "sudo apt -y update && sudo apt -y install libgtk-3-0" - - "sudo apt -y update && sudo apt -y install libnspr4" - - "sudo apt -y update && sudo apt -y install libnss3" - - "sudo apt -y update && sudo apt -y install libpango-1.0-0" - - "sudo apt -y update && sudo apt -y install libpangocairo-1.0-0" - - "sudo apt -y update && sudo apt -y install libstdc++6" - - "sudo apt -y update && sudo apt -y install libx11-6" - - "sudo apt -y update && sudo apt -y install libx11-xcb1" - - "sudo apt -y update && sudo apt -y install libxcb1" - - "sudo apt -y update && sudo apt -y install libxcomposite1" - - "sudo apt -y update && sudo apt -y install libxcursor1" - - "sudo apt -y update && sudo apt -y install libxdamage1" - - "sudo apt -y update && sudo apt -y install libxext6" - - "sudo apt -y update && sudo apt -y install libxfixes3" - - "sudo apt -y update && sudo apt -y install libxi6" - - "sudo apt -y update && sudo apt -y install libxrandr2" - - "sudo apt -y update && sudo apt -y install libxrender1" - - "sudo apt -y update && sudo apt -y install libxss1" - - "sudo apt -y update && sudo apt -y install libxtst6" + - "brew update && brew install libasound2" + - "brew update && brew install libatk-bridge2.0-0" + - "brew update && brew install libatk1.0-0" + - "brew update && brew install libc6" + - "brew update && brew install libcairo2" + - "brew update && brew install libcups2" + - "brew update && brew install libdbus-1-3" + - "brew update && brew install libexpat1" + - "brew update && brew install libfontconfig1" + - "brew update && brew install libgbm1" + - "brew update && brew install libgcc1" + - "brew update && brew install libglib2.0-0" + - "brew update && brew install libgtk-3-0" + - "brew update && brew install libnspr4" + - "brew update && brew install libnss3" + - "brew update && brew install libpango-1.0-0" + - "brew update && brew install libpangocairo-1.0-0" + - "brew update && brew install libstdc++6" + - "brew update && brew install libx11-6" + - "brew update && brew install libx11-xcb1" + - "brew update && brew install libxcb1" + - "brew update && brew install libxcomposite1" + - "brew update && brew install libxcursor1" + - "brew update && brew install libxdamage1" + - "brew update && brew install libxext6" + - "brew update && brew install libxfixes3" + - "brew update && brew install libxi6" + - "brew update && brew install libxrandr2" + - "brew update && brew install libxrender1" + - "brew update && brew install libxss1" + - "brew update && brew install libxtst6" build_targets: - "//..." test_flags: From d8f87a780d6419a8fb52341d4c4f888cd0f82359 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 24 Apr 2025 00:36:41 +0000 Subject: [PATCH 051/107] degrade python version --- web_testing_python/requirements.in | 2 +- web_testing_python/requirements_lock.txt | 65 ++---------------------- 2 files changed, 5 insertions(+), 62 deletions(-) diff --git a/web_testing_python/requirements.in b/web_testing_python/requirements.in index 72e055f5..600b6ebb 100644 --- a/web_testing_python/requirements.in +++ b/web_testing_python/requirements.in @@ -1 +1 @@ -selenium==4.27.1 +selenium==3.141.0 diff --git a/web_testing_python/requirements_lock.txt b/web_testing_python/requirements_lock.txt index 423b3ab0..9585b334 100644 --- a/web_testing_python/requirements_lock.txt +++ b/web_testing_python/requirements_lock.txt @@ -4,68 +4,11 @@ # # bazel run //:requirements.update # -attrs==24.2.0 \ - --hash=sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346 \ - --hash=sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2 - # via - # outcome - # trio -certifi==2024.8.30 \ - --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ - --hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9 - # via selenium -h11==0.14.0 \ - --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ - --hash=sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761 - # via wsproto -idna==3.10 \ - --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ - --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 - # via trio -outcome==1.3.0.post0 \ - --hash=sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8 \ - --hash=sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b - # via trio -pysocks==1.7.1 \ - --hash=sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299 \ - --hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5 \ - --hash=sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0 - # via urllib3 -selenium==4.27.1 \ - --hash=sha256:5296c425a75ff1b44d0d5199042b36a6d1ef76c04fb775b97b40be739a9caae2 \ - --hash=sha256:b89b1f62b5cfe8025868556fe82360d6b649d464f75d2655cb966c8f8447ea18 +selenium==3.141.0 \ + --hash=sha256:2d7131d7bc5a5b99a2d9b04aaf2612c411b03b8ca1b1ee8d3de5845a9be2cb3c \ + --hash=sha256:deaf32b60ad91a4611b98d8002757f29e6f2c2d5fcaf202e1c9ad06d6772300d # via -r requirements.in -sniffio==1.3.1 \ - --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ - --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc - # via trio -sortedcontainers==2.4.0 \ - --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ - --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 - # via trio -trio==0.27.0 \ - --hash=sha256:1dcc95ab1726b2da054afea8fd761af74bad79bd52381b84eae408e983c76831 \ - --hash=sha256:68eabbcf8f457d925df62da780eff15ff5dc68fd6b367e2dde59f7aaf2a0b884 - # via - # selenium - # trio-websocket -trio-websocket==0.11.1 \ - --hash=sha256:18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f \ - --hash=sha256:520d046b0d030cf970b8b2b2e00c4c2245b3807853ecd44214acd33d74581638 - # via selenium -typing-extensions==4.12.2 \ - --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ - --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 - # via selenium -urllib3[socks]==2.2.3 \ +urllib3==2.2.3 \ --hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \ --hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9 # via selenium -websocket-client==1.8.0 \ - --hash=sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526 \ - --hash=sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da - # via selenium -wsproto==1.2.0 \ - --hash=sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065 \ - --hash=sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736 - # via trio-websocket From 688a6a7ea17ba8cee4c7d72ea9d3349b1775cb7e Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Sat, 26 Apr 2025 00:42:49 +0000 Subject: [PATCH 052/107] Upgrade the webtest apiss --- web_testing_python/requirements.in | 2 +- web_testing_python/requirements_lock.txt | 67 +++++++++++++++++++++-- web_testing_python/testing/web/webtest.py | 17 ++++-- 3 files changed, 75 insertions(+), 11 deletions(-) diff --git a/web_testing_python/requirements.in b/web_testing_python/requirements.in index 600b6ebb..e7021a5b 100644 --- a/web_testing_python/requirements.in +++ b/web_testing_python/requirements.in @@ -1 +1 @@ -selenium==3.141.0 +selenium==4.31.0 diff --git a/web_testing_python/requirements_lock.txt b/web_testing_python/requirements_lock.txt index 9585b334..a811cf1f 100644 --- a/web_testing_python/requirements_lock.txt +++ b/web_testing_python/requirements_lock.txt @@ -4,11 +4,70 @@ # # bazel run //:requirements.update # -selenium==3.141.0 \ - --hash=sha256:2d7131d7bc5a5b99a2d9b04aaf2612c411b03b8ca1b1ee8d3de5845a9be2cb3c \ - --hash=sha256:deaf32b60ad91a4611b98d8002757f29e6f2c2d5fcaf202e1c9ad06d6772300d +attrs==25.3.0 \ + --hash=sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3 \ + --hash=sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b + # via + # outcome + # trio +certifi==2025.1.31 \ + --hash=sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651 \ + --hash=sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe + # via selenium +h11==0.16.0 \ + --hash=sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1 \ + --hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86 + # via wsproto +idna==3.10 \ + --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ + --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 + # via trio +outcome==1.3.0.post0 \ + --hash=sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8 \ + --hash=sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b + # via + # trio + # trio-websocket +pysocks==1.7.1 \ + --hash=sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299 \ + --hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5 \ + --hash=sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0 + # via urllib3 +selenium==4.31.0 \ + --hash=sha256:441cffc436a2e6659fe3cfb012692435652efd38b0d368d16f661a5db47825f5 \ + --hash=sha256:7b8b8d5e424d7133cb7aa656263b19ac505ec26d65c0f921a696e7e2c5ccd95b # via -r requirements.in -urllib3==2.2.3 \ +sniffio==1.3.1 \ + --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ + --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc + # via trio +sortedcontainers==2.4.0 \ + --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ + --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 + # via trio +trio==0.30.0 \ + --hash=sha256:0781c857c0c81f8f51e0089929a26b5bb63d57f927728a5586f7e36171f064df \ + --hash=sha256:3bf4f06b8decf8d3cf00af85f40a89824669e2d033bb32469d34840edcfc22a5 + # via + # selenium + # trio-websocket +trio-websocket==0.12.2 \ + --hash=sha256:22c72c436f3d1e264d0910a3951934798dcc5b00ae56fc4ee079d46c7cf20fae \ + --hash=sha256:df605665f1db533f4a386c94525870851096a223adcb97f72a07e8b4beba45b6 + # via selenium +typing-extensions==4.13.2 \ + --hash=sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c \ + --hash=sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef + # via selenium +urllib3[socks]==2.2.3 \ --hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \ --hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9 # via selenium +websocket-client==1.8.0 \ + --hash=sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526 \ + --hash=sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da + # via selenium +wsproto==1.2.0 \ + --hash=sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065 \ + --hash=sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736 + # via trio-websocket diff --git a/web_testing_python/testing/web/webtest.py b/web_testing_python/testing/web/webtest.py index 5e3fd490..d0f93bdd 100644 --- a/web_testing_python/testing/web/webtest.py +++ b/web_testing_python/testing/web/webtest.py @@ -24,8 +24,9 @@ """ import os -from selenium.webdriver.remote import remote_connection -from selenium.webdriver.remote import webdriver +from selenium import webdriver +from selenium.webdriver.remote.client_config import ClientConfig +from selenium.webdriver.remote.remote_connection import RemoteConnection def new_webdriver_session(capabilities=None): @@ -39,14 +40,18 @@ def new_webdriver_session(capabilities=None): A new WebDriver connected to a browser defined by the web test environment. """ - capabilities = capabilities or {} - address = os.environ['WEB_TEST_WEBDRIVER_SERVER'].rstrip('/') + address = os.environ['WEB_TEST_WEBDRIVER_SERVER'].rstrip('/') # Set the timeout for WebDriver http requests so that the socket default # timeout is not used. - remote_connection.RemoteConnection.set_timeout(450) + client_config = ClientConfig(remote_server_addr=address, timeout=450) + executor = RemoteConnection( + client_config=client_config, + ) - return webdriver.WebDriver(address, desired_capabilities=capabilities) + options = webdriver.ChromeOptions() + options.add_argument("--no-sandbox") + return webdriver.Remote(command_executor=executor, options=options) def http_address(): From aea2a495a2d83d2d9b31dd180019a05777630da3 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 28 Apr 2025 18:49:40 +0000 Subject: [PATCH 053/107] specify version of py --- web_testing_python/testing/web/webtest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web_testing_python/testing/web/webtest.py b/web_testing_python/testing/web/webtest.py index d0f93bdd..4e141a4a 100644 --- a/web_testing_python/testing/web/webtest.py +++ b/web_testing_python/testing/web/webtest.py @@ -40,7 +40,7 @@ def new_webdriver_session(capabilities=None): A new WebDriver connected to a browser defined by the web test environment. """ - + os.environ["LANG"] = "en_US.UTF-8" address = os.environ['WEB_TEST_WEBDRIVER_SERVER'].rstrip('/') # Set the timeout for WebDriver http requests so that the socket default # timeout is not used. @@ -50,6 +50,8 @@ def new_webdriver_session(capabilities=None): ) options = webdriver.ChromeOptions() + # options = webdriver.FirefoxOptions() + options.add_argument('--headless') options.add_argument("--no-sandbox") return webdriver.Remote(command_executor=executor, options=options) From 120a281c5f952ccf37032ed035b91966eac0b478 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 28 Apr 2025 20:47:42 +0000 Subject: [PATCH 054/107] Remove tag --- browsers/sauce/chrome-win10.json | 1 - 1 file changed, 1 deletion(-) diff --git a/browsers/sauce/chrome-win10.json b/browsers/sauce/chrome-win10.json index 22d1b61e..fe4b736b 100644 --- a/browsers/sauce/chrome-win10.json +++ b/browsers/sauce/chrome-win10.json @@ -5,7 +5,6 @@ "platform": "Windows 10", "version": "76.0", "name": "%METADATA:LABEL%", - "build": "%ENV:BUILD_TAG%", "tags": ["%METADATA:ENVIRONMENT%", "%METADATA:TEST_LABEL%", "%METADATA:BROWSER_LABEL%", "%METADATA:CONFIG_LABEL%"], "tunnel-identifier": "%SAUCE:TUNNEL_ID%" } From 83b4aeb14ba278bd3e7d5cc6edcff543ee61125f Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 28 Apr 2025 21:04:23 +0000 Subject: [PATCH 055/107] degrade --- web_testing_python/requirements.in | 2 +- web_testing_python/requirements_lock.txt | 67 ++--------------------- web_testing_python/testing/web/webtest.py | 20 +++---- 3 files changed, 12 insertions(+), 77 deletions(-) diff --git a/web_testing_python/requirements.in b/web_testing_python/requirements.in index e7021a5b..600b6ebb 100644 --- a/web_testing_python/requirements.in +++ b/web_testing_python/requirements.in @@ -1 +1 @@ -selenium==4.31.0 +selenium==3.141.0 diff --git a/web_testing_python/requirements_lock.txt b/web_testing_python/requirements_lock.txt index a811cf1f..9585b334 100644 --- a/web_testing_python/requirements_lock.txt +++ b/web_testing_python/requirements_lock.txt @@ -4,70 +4,11 @@ # # bazel run //:requirements.update # -attrs==25.3.0 \ - --hash=sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3 \ - --hash=sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b - # via - # outcome - # trio -certifi==2025.1.31 \ - --hash=sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651 \ - --hash=sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe - # via selenium -h11==0.16.0 \ - --hash=sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1 \ - --hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86 - # via wsproto -idna==3.10 \ - --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ - --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 - # via trio -outcome==1.3.0.post0 \ - --hash=sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8 \ - --hash=sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b - # via - # trio - # trio-websocket -pysocks==1.7.1 \ - --hash=sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299 \ - --hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5 \ - --hash=sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0 - # via urllib3 -selenium==4.31.0 \ - --hash=sha256:441cffc436a2e6659fe3cfb012692435652efd38b0d368d16f661a5db47825f5 \ - --hash=sha256:7b8b8d5e424d7133cb7aa656263b19ac505ec26d65c0f921a696e7e2c5ccd95b +selenium==3.141.0 \ + --hash=sha256:2d7131d7bc5a5b99a2d9b04aaf2612c411b03b8ca1b1ee8d3de5845a9be2cb3c \ + --hash=sha256:deaf32b60ad91a4611b98d8002757f29e6f2c2d5fcaf202e1c9ad06d6772300d # via -r requirements.in -sniffio==1.3.1 \ - --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ - --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc - # via trio -sortedcontainers==2.4.0 \ - --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ - --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 - # via trio -trio==0.30.0 \ - --hash=sha256:0781c857c0c81f8f51e0089929a26b5bb63d57f927728a5586f7e36171f064df \ - --hash=sha256:3bf4f06b8decf8d3cf00af85f40a89824669e2d033bb32469d34840edcfc22a5 - # via - # selenium - # trio-websocket -trio-websocket==0.12.2 \ - --hash=sha256:22c72c436f3d1e264d0910a3951934798dcc5b00ae56fc4ee079d46c7cf20fae \ - --hash=sha256:df605665f1db533f4a386c94525870851096a223adcb97f72a07e8b4beba45b6 - # via selenium -typing-extensions==4.13.2 \ - --hash=sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c \ - --hash=sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef - # via selenium -urllib3[socks]==2.2.3 \ +urllib3==2.2.3 \ --hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \ --hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9 # via selenium -websocket-client==1.8.0 \ - --hash=sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526 \ - --hash=sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da - # via selenium -wsproto==1.2.0 \ - --hash=sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065 \ - --hash=sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736 - # via trio-websocket diff --git a/web_testing_python/testing/web/webtest.py b/web_testing_python/testing/web/webtest.py index 4e141a4a..0c1af23a 100644 --- a/web_testing_python/testing/web/webtest.py +++ b/web_testing_python/testing/web/webtest.py @@ -1,3 +1,4 @@ + # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,9 +25,8 @@ """ import os -from selenium import webdriver -from selenium.webdriver.remote.client_config import ClientConfig -from selenium.webdriver.remote.remote_connection import RemoteConnection +from selenium.webdriver.remote import remote_connection +from selenium.webdriver.remote import webdriver def new_webdriver_session(capabilities=None): @@ -40,20 +40,14 @@ def new_webdriver_session(capabilities=None): A new WebDriver connected to a browser defined by the web test environment. """ - os.environ["LANG"] = "en_US.UTF-8" + capabilities = capabilities or {} address = os.environ['WEB_TEST_WEBDRIVER_SERVER'].rstrip('/') + # Set the timeout for WebDriver http requests so that the socket default # timeout is not used. - client_config = ClientConfig(remote_server_addr=address, timeout=450) - executor = RemoteConnection( - client_config=client_config, - ) + remote_connection.RemoteConnection.set_timeout(450) - options = webdriver.ChromeOptions() - # options = webdriver.FirefoxOptions() - options.add_argument('--headless') - options.add_argument("--no-sandbox") - return webdriver.Remote(command_executor=executor, options=options) + return webdriver.WebDriver(address, desired_capabilities=capabilities) def http_address(): From d74a9ef8dff930aff77c87182b80c3276b24ecd1 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 28 Apr 2025 21:16:43 +0000 Subject: [PATCH 056/107] Update yml --- .bazelci/presubmit.yml | 103 ++++++++--------------------------------- 1 file changed, 20 insertions(+), 83 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index ee965645..69e5bb7b 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -1,91 +1,28 @@ --- -platforms: - ubuntu2204: +tasks: + web_testing_python_ubuntu2004: + name: "rules_web_testing_python in ubuntu" + platform: ubuntu2004 shell_commands: - - "sudo apt -y update && sudo apt -y install libasound2" - - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" - - "sudo apt -y update && sudo apt -y install libatk1.0-0" - - "sudo apt -y update && sudo apt -y install libc6" - - "sudo apt -y update && sudo apt -y install libcairo2" - - "sudo apt -y update && sudo apt -y install libcups2" - - "sudo apt -y update && sudo apt -y install libdbus-1-3" - - "sudo apt -y update && sudo apt -y install libdbus-glib-1-2" - - "sudo apt -y update && sudo apt -y install libexpat1" - - "sudo apt -y update && sudo apt -y install libfontconfig1" - - "sudo apt -y update && sudo apt -y install libgbm1" - - "sudo apt -y update && sudo apt -y install libgcc1" - - "sudo apt -y update && sudo apt -y install libglib2.0-0" - - "sudo apt -y update && sudo apt -y install libgtk-3-0" - - "sudo apt -y update && sudo apt -y install libnspr4" - - "sudo apt -y update && sudo apt -y install libnss3" - - "sudo apt -y update && sudo apt -y install libpango-1.0-0" - - "sudo apt -y update && sudo apt -y install libpangocairo-1.0-0" - - "sudo apt -y update && sudo apt -y install libstdc++6" - - "sudo apt -y update && sudo apt -y install libx11-6" - - "sudo apt -y update && sudo apt -y install libx11-xcb1" - - "sudo apt -y update && sudo apt -y install libxcb1" - - "sudo apt -y update && sudo apt -y install libxcomposite1" - - "sudo apt -y update && sudo apt -y install libxcursor1" - - "sudo apt -y update && sudo apt -y install libxdamage1" - - "sudo apt -y update && sudo apt -y install libxext6" - - "sudo apt -y update && sudo apt -y install libxfixes3" - - "sudo apt -y update && sudo apt -y install libxi6" - - "sudo apt -y update && sudo apt -y install libxrandr2" - - "sudo apt -y update && sudo apt -y install libxrender1" - - "sudo apt -y update && sudo apt -y install libxss1" - - "sudo apt -y update && sudo apt -y install libxtst6" - build_targets: - - "//..." + - "sudo apt -y update && sudo apt -y install libxcb1" test_flags: - "--test_tag_filters=-noci,-sauce" - test_targets: - - "//..." - macos: - shell_commands: - - "brew update && brew install libasound2" - - "brew update && brew install libatk-bridge2.0-0" - - "brew update && brew install libatk1.0-0" - - "brew update && brew install libc6" - - "brew update && brew install libcairo2" - - "brew update && brew install libcups2" - - "brew update && brew install libdbus-1-3" - - "brew update && brew install libexpat1" - - "brew update && brew install libfontconfig1" - - "brew update && brew install libgbm1" - - "brew update && brew install libgcc1" - - "brew update && brew install libglib2.0-0" - - "brew update && brew install libgtk-3-0" - - "brew update && brew install libnspr4" - - "brew update && brew install libnss3" - - "brew update && brew install libpango-1.0-0" - - "brew update && brew install libpangocairo-1.0-0" - - "brew update && brew install libstdc++6" - - "brew update && brew install libx11-6" - - "brew update && brew install libx11-xcb1" - - "brew update && brew install libxcb1" - - "brew update && brew install libxcomposite1" - - "brew update && brew install libxcursor1" - - "brew update && brew install libxdamage1" - - "brew update && brew install libxext6" - - "brew update && brew install libxfixes3" - - "brew update && brew install libxi6" - - "brew update && brew install libxrandr2" - - "brew update && brew install libxrender1" - - "brew update && brew install libxss1" - - "brew update && brew install libxtst6" - build_targets: - - "//..." + build_targets: [ "..." ] + test_targets: [ "..." ] + working_directory: web_testing_python + web_testing_python_macos: + name: "rules_web_testing_python in macos" + platform: macos test_flags: - "--test_tag_filters=-noci,-sauce" - test_targets: - - "//..." - windows: - build_flags: - - "--enable_runfiles" - build_targets: - - "//..." + build_targets: [ "..." ] + test_targets: [ "..." ] + working_directory: web_testing_python + web_testing_python_windows: + name: "rules_web_testing_python in windows" + platform: windows test_flags: - "--test_tag_filters=-noci,-sauce" - - "--enable_runfiles" - test_targets: - - "//..." + build_targets: [ "..." ] + test_targets: [ "..." ] + working_directory: web_testing_python \ No newline at end of file From 3d9e688a7fdf00fd425749fa937a997b7420b78b Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 28 Apr 2025 21:48:22 +0000 Subject: [PATCH 057/107] Add back build tag --- browsers/sauce/chrome-win10.json | 1 + 1 file changed, 1 insertion(+) diff --git a/browsers/sauce/chrome-win10.json b/browsers/sauce/chrome-win10.json index fe4b736b..22d1b61e 100644 --- a/browsers/sauce/chrome-win10.json +++ b/browsers/sauce/chrome-win10.json @@ -5,6 +5,7 @@ "platform": "Windows 10", "version": "76.0", "name": "%METADATA:LABEL%", + "build": "%ENV:BUILD_TAG%", "tags": ["%METADATA:ENVIRONMENT%", "%METADATA:TEST_LABEL%", "%METADATA:BROWSER_LABEL%", "%METADATA:CONFIG_LABEL%"], "tunnel-identifier": "%SAUCE:TUNNEL_ID%" } From f460143dd2a1c7181aa128f1d5f973030a40244b Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 28 Apr 2025 21:56:23 +0000 Subject: [PATCH 058/107] remove external and native --- web_testing_python/testing/web/BUILD.bazel | 3 --- 1 file changed, 3 deletions(-) diff --git a/web_testing_python/testing/web/BUILD.bazel b/web_testing_python/testing/web/BUILD.bazel index d14447e8..9241ad4a 100644 --- a/web_testing_python/testing/web/BUILD.bazel +++ b/web_testing_python/testing/web/BUILD.bazel @@ -42,17 +42,14 @@ py_web_test_suite( ], tags = { "chromium-local": [ - "native", "sauce", "notravis", ], "chrome-win10": [ - "exclusive", "sauce", "notravis", ], "chrome-win10-connect": [ - "exclusive", "noci", "sauce", ], From 410d77b68e2f8ac163a3a2fbf648b45c45dd9b9c Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 28 Apr 2025 21:56:33 +0000 Subject: [PATCH 059/107] remove external and native --- web_testing_python/testing/web/BUILD.bazel | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/web_testing_python/testing/web/BUILD.bazel b/web_testing_python/testing/web/BUILD.bazel index 9241ad4a..682a2b3e 100644 --- a/web_testing_python/testing/web/BUILD.bazel +++ b/web_testing_python/testing/web/BUILD.bazel @@ -42,16 +42,14 @@ py_web_test_suite( ], tags = { "chromium-local": [ - "sauce", - "notravis", + "native", + ], "chrome-win10": [ - "sauce", - "notravis", + "exclusive", ], "chrome-win10-connect": [ - "noci", - "sauce", + "exclusive",g ], "firefox-local": [ "native", From 8b6bdfa026176e7e398b56ec31bfc90d38cb3cbc Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 28 Apr 2025 22:05:39 +0000 Subject: [PATCH 060/107] Remove g --- web_testing_python/testing/web/BUILD.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_testing_python/testing/web/BUILD.bazel b/web_testing_python/testing/web/BUILD.bazel index 682a2b3e..c5fcdcda 100644 --- a/web_testing_python/testing/web/BUILD.bazel +++ b/web_testing_python/testing/web/BUILD.bazel @@ -49,7 +49,7 @@ py_web_test_suite( "exclusive", ], "chrome-win10-connect": [ - "exclusive",g + "exclusive", ], "firefox-local": [ "native", From 4d3e25a80760787b20f0d68e75633bf5fb85aca1 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 28 Apr 2025 22:26:14 +0000 Subject: [PATCH 061/107] fall back marking tests as sauce --- web_testing_python/testing/web/BUILD.bazel | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web_testing_python/testing/web/BUILD.bazel b/web_testing_python/testing/web/BUILD.bazel index c5fcdcda..d14447e8 100644 --- a/web_testing_python/testing/web/BUILD.bazel +++ b/web_testing_python/testing/web/BUILD.bazel @@ -43,13 +43,18 @@ py_web_test_suite( tags = { "chromium-local": [ "native", - + "sauce", + "notravis", ], "chrome-win10": [ "exclusive", + "sauce", + "notravis", ], "chrome-win10-connect": [ "exclusive", + "noci", + "sauce", ], "firefox-local": [ "native", From 78272e7f51c19fbee1b8f530153d79ed152c1525 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 1 May 2025 00:31:02 +0000 Subject: [PATCH 062/107] Add requirements --- .../requirements_lock_windows.txt | 138 +----------------- 1 file changed, 4 insertions(+), 134 deletions(-) diff --git a/web_testing_python/requirements_lock_windows.txt b/web_testing_python/requirements_lock_windows.txt index d94eee74..9585b334 100644 --- a/web_testing_python/requirements_lock_windows.txt +++ b/web_testing_python/requirements_lock_windows.txt @@ -4,141 +4,11 @@ # # bazel run //:requirements.update # -attrs==24.2.0 \ - --hash=sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346 \ - --hash=sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2 - # via - # outcome - # trio -certifi==2024.8.30 \ - --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ - --hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9 - # via selenium -cffi==1.17.1 \ - --hash=sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8 \ - --hash=sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2 \ - --hash=sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1 \ - --hash=sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15 \ - --hash=sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36 \ - --hash=sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824 \ - --hash=sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8 \ - --hash=sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36 \ - --hash=sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17 \ - --hash=sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf \ - --hash=sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc \ - --hash=sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3 \ - --hash=sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed \ - --hash=sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702 \ - --hash=sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1 \ - --hash=sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8 \ - --hash=sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903 \ - --hash=sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6 \ - --hash=sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d \ - --hash=sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b \ - --hash=sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e \ - --hash=sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be \ - --hash=sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c \ - --hash=sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683 \ - --hash=sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9 \ - --hash=sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c \ - --hash=sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8 \ - --hash=sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1 \ - --hash=sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4 \ - --hash=sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655 \ - --hash=sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67 \ - --hash=sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595 \ - --hash=sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0 \ - --hash=sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65 \ - --hash=sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41 \ - --hash=sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6 \ - --hash=sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401 \ - --hash=sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6 \ - --hash=sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3 \ - --hash=sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16 \ - --hash=sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93 \ - --hash=sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e \ - --hash=sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4 \ - --hash=sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964 \ - --hash=sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c \ - --hash=sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576 \ - --hash=sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0 \ - --hash=sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3 \ - --hash=sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662 \ - --hash=sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3 \ - --hash=sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff \ - --hash=sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5 \ - --hash=sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd \ - --hash=sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f \ - --hash=sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5 \ - --hash=sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14 \ - --hash=sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d \ - --hash=sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9 \ - --hash=sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7 \ - --hash=sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382 \ - --hash=sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a \ - --hash=sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e \ - --hash=sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a \ - --hash=sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4 \ - --hash=sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99 \ - --hash=sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87 \ - --hash=sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b - # via trio -h11==0.14.0 \ - --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ - --hash=sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761 - # via wsproto -idna==3.10 \ - --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ - --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 - # via trio -outcome==1.3.0.post0 \ - --hash=sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8 \ - --hash=sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b - # via trio -pycparser==2.22 \ - --hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \ - --hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc - # via cffi -pysocks==1.7.1 \ - --hash=sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299 \ - --hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5 \ - --hash=sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0 - # via urllib3 -selenium==4.27.1 \ - --hash=sha256:5296c425a75ff1b44d0d5199042b36a6d1ef76c04fb775b97b40be739a9caae2 \ - --hash=sha256:b89b1f62b5cfe8025868556fe82360d6b649d464f75d2655cb966c8f8447ea18 +selenium==3.141.0 \ + --hash=sha256:2d7131d7bc5a5b99a2d9b04aaf2612c411b03b8ca1b1ee8d3de5845a9be2cb3c \ + --hash=sha256:deaf32b60ad91a4611b98d8002757f29e6f2c2d5fcaf202e1c9ad06d6772300d # via -r requirements.in -sniffio==1.3.1 \ - --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ - --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc - # via trio -sortedcontainers==2.4.0 \ - --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ - --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 - # via trio -trio==0.27.0 \ - --hash=sha256:1dcc95ab1726b2da054afea8fd761af74bad79bd52381b84eae408e983c76831 \ - --hash=sha256:68eabbcf8f457d925df62da780eff15ff5dc68fd6b367e2dde59f7aaf2a0b884 - # via - # selenium - # trio-websocket -trio-websocket==0.11.1 \ - --hash=sha256:18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f \ - --hash=sha256:520d046b0d030cf970b8b2b2e00c4c2245b3807853ecd44214acd33d74581638 - # via selenium -typing-extensions==4.12.2 \ - --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ - --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 - # via selenium -urllib3[socks]==2.2.3 \ +urllib3==2.2.3 \ --hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \ --hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9 # via selenium -websocket-client==1.8.0 \ - --hash=sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526 \ - --hash=sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da - # via selenium -wsproto==1.2.0 \ - --hash=sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065 \ - --hash=sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736 - # via trio-websocket From 01ed1c5c7cd0946d18eeb221de2c8b7e2796c5ad Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 1 May 2025 02:14:24 +0000 Subject: [PATCH 063/107] Modify yml file --- .bazelci/presubmit.yml | 141 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 69e5bb7b..415cb9a1 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -1,5 +1,146 @@ --- tasks: + web_testing_go_ubuntu2004: + name: "rules_web_testing_go in ubuntu" + platform: ubuntu2004 + shell_commands: + - "sudo apt -y update && sudo apt -y install libasound2" + - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" + - "sudo apt -y update && sudo apt -y install libatk1.0-0" + - "sudo apt -y update && sudo apt -y install libc6" + - "sudo apt -y update && sudo apt -y install libcairo2" + - "sudo apt -y update && sudo apt -y install libcups2" + - "sudo apt -y update && sudo apt -y install libdbus-1-3" + - "sudo apt -y update && sudo apt -y install libexpat1" + - "sudo apt -y update && sudo apt -y install libfontconfig1" + - "sudo apt -y update && sudo apt -y install libgbm1" + - "sudo apt -y update && sudo apt -y install libgcc1" + - "sudo apt -y update && sudo apt -y install libglib2.0-0" + - "sudo apt -y update && sudo apt -y install libgtk-3-0" + - "sudo apt -y update && sudo apt -y install libnspr4" + - "sudo apt -y update && sudo apt -y install libnss3" + - "sudo apt -y update && sudo apt -y install libpango-1.0-0" + - "sudo apt -y update && sudo apt -y install libpangocairo-1.0-0" + - "sudo apt -y update && sudo apt -y install libstdc++6" + - "sudo apt -y update && sudo apt -y install libx11-6" + - "sudo apt -y update && sudo apt -y install libx11-xcb1" + - "sudo apt -y update && sudo apt -y install libxcb1" + - "sudo apt -y update && sudo apt -y install libxcomposite1" + - "sudo apt -y update && sudo apt -y install libxcursor1" + - "sudo apt -y update && sudo apt -y install libxdamage1" + - "sudo apt -y update && sudo apt -y install libxext6" + - "sudo apt -y update && sudo apt -y install libxfixes3" + - "sudo apt -y update && sudo apt -y install libxi6" + - "sudo apt -y update && sudo apt -y install libxrandr2" + - "sudo apt -y update && sudo apt -y install libxrender1" + - "sudo apt -y update && sudo apt -y install libxss1" + - "sudo apt -y update && sudo apt -y install libxtst6" + test_flags: + - "--test_tag_filters=-noci,-sauce" + build_targets: ["..."] + test_targets: ["..."] + working_directory: web_testing_go + web_testing_go_macos: + name: "rules_web_testing_go in macos" + platform: macos + shell_commands: + - "/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"" + - "brew update && brew install libasound2" + - "brew update && brew install libatk-bridge2.0-0" + - "brew update && brew install libatk1.0-0" + - "brew update && brew install libc6" + - "brew update && brew install libcairo2" + - "brew update && brew install libcups2" + - "brew update && brew install libdbus-1-3" + - "brew update && brew install libexpat1" + - "brew update && brew install libfontconfig1" + - "brew update && brew install libgbm1" + - "brew update && brew install libgcc1" + - "brew update && brew install libglib2.0-0" + - "brew update && brew install libgtk-3-0" + - "brew update && brew install libnspr4" + - "brew update && brew install libnss3" + - "brew update && brew install libpango-1.0-0" + - "brew update && brew install libpangocairo-1.0-0" + - "brew update && brew install libstdc++6" + - "brew update && brew install libx11-6" + - "brew update && brew install libx11-xcb1" + - "brew update && brew install libxcb1" + - "brew update && brew install libxcomposite1" + - "brew update && brew install libxcursor1" + - "brew update && brew install libxdamage1" + - "brew update && brew install libxext6" + - "brew update && brew install libxfixes3" + - "brew update && brew install libxi6" + - "brew update && brew install libxrandr2" + - "brew update && brew install libxrender1" + - "brew update && brew install libxss1" + - "brew update && brew install libxtst6" + test_flags: + - "--test_tag_filters=-noci,-sauce" + build_targets: ["..." ] + test_targets: [ "..." ] + working_directory: web_testing_go + web_testing_go_windows: + name: "rules_web_testing_go in windows" + platform: windows + test_flags: + - "--test_tag_filters=-noci,-sauce" + build_targets: [ "..." ] + test_targets: [ "..." ] + working_directory: web_testing_go + web_testing_scala_ubuntu2004: + name: "rules_web_testing_scala in ubuntu" + platform: ubuntu2004 + shell_commands: + - "brew update && brew install libxcb1" + test_flags: + - "--test_tag_filters=-noci,-sauce" + build_targets: ["..."] + test_targets: ["..."] + working_directory: web_testing_scala + web_testing_scala_macos: + name: "rules_web_testing_scala in macos" + platform: macos + test_flags: + - "--test_tag_filters=-noci,-sauce" + build_targets: [ "..." ] + test_targets: [ "..." ] + working_directory: web_testing_scala + web_testing_scala_windows: + name: "rules_web_testing_scala in windows" + platform: windows + test_flags: + - "--test_tag_filters=-noci,-sauce" + build_targets: [ "..." ] + test_targets: [ "..." ] + working_directory: web_testing_scala + web_testing_java_ubuntu2004: + name: "rules_web_testing_java in ubuntu" + platform: ubuntu2004 + shell_commands: + - "sudo apt -y update && sudo apt -y install libxcb1" + test_flags: + - "--test_tag_filters=-noci,-sauce" + build_targets: [ "..." ] + test_targets: [ "..." ] + working_directory: web_testing_java + web_testing_java_macos: + name: "rules_web_testing_java in macos" + platform: macos + test_flags: + - "--test_tag_filters=-noci,-sauce" + build_targets: [ "..." ] + test_targets: [ "..." ] + working_directory: web_testing_java + web_testing_java_windows: + name: "rules_web_testing_java in windows" + platform: windows + test_flags: + - "--test_tag_filters=-noci,-sauce" + build_targets: [ "..." ] + test_targets: [ "..." ] + working_directory: web_testing_java web_testing_python_ubuntu2004: name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 From 97c08e67f28932d0de41d876a983a14a952576bf Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 1 May 2025 07:08:14 +0000 Subject: [PATCH 064/107] Testing --- .bazelci/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 415cb9a1..38a07a1f 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -44,7 +44,7 @@ tasks: name: "rules_web_testing_go in macos" platform: macos shell_commands: - - "/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"" + - "sudo /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"" - "brew update && brew install libasound2" - "brew update && brew install libatk-bridge2.0-0" - "brew update && brew install libatk1.0-0" From 7ad9fe47cdabe05702d22191049e670c4add9819 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 1 May 2025 07:21:22 +0000 Subject: [PATCH 065/107] testing with new shell command --- .bazelci/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 38a07a1f..d9ec6ac5 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -44,7 +44,7 @@ tasks: name: "rules_web_testing_go in macos" platform: macos shell_commands: - - "sudo /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"" + - "mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew" - "brew update && brew install libasound2" - "brew update && brew install libatk-bridge2.0-0" - "brew update && brew install libatk1.0-0" From cff7b53b6b0536288a0389d931fccb0e99f982f3 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 1 May 2025 07:25:42 +0000 Subject: [PATCH 066/107] testing with new shell command --- .bazelci/presubmit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index d9ec6ac5..b933b2f3 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -45,6 +45,7 @@ tasks: platform: macos shell_commands: - "mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew" + - "" - "brew update && brew install libasound2" - "brew update && brew install libatk-bridge2.0-0" - "brew update && brew install libatk1.0-0" From fef8f98870d545c8861633ab254749ee910b5768 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 1 May 2025 17:01:29 +0000 Subject: [PATCH 067/107] testing with new shell command --- .bazelci/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index b933b2f3..51c98535 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -45,7 +45,7 @@ tasks: platform: macos shell_commands: - "mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew" - - "" + - "export PATH=\"homebrew/bin:$PATH\"" - "brew update && brew install libasound2" - "brew update && brew install libatk-bridge2.0-0" - "brew update && brew install libatk1.0-0" From 0c34f417d200e3f666fe95a619dd2716ddf09d78 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 1 May 2025 17:25:29 +0000 Subject: [PATCH 068/107] testing with new shell command --- .bazelci/presubmit.yml | 64 +++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 51c98535..befdf2b7 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -45,38 +45,38 @@ tasks: platform: macos shell_commands: - "mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew" - - "export PATH=\"homebrew/bin:$PATH\"" - - "brew update && brew install libasound2" - - "brew update && brew install libatk-bridge2.0-0" - - "brew update && brew install libatk1.0-0" - - "brew update && brew install libc6" - - "brew update && brew install libcairo2" - - "brew update && brew install libcups2" - - "brew update && brew install libdbus-1-3" - - "brew update && brew install libexpat1" - - "brew update && brew install libfontconfig1" - - "brew update && brew install libgbm1" - - "brew update && brew install libgcc1" - - "brew update && brew install libglib2.0-0" - - "brew update && brew install libgtk-3-0" - - "brew update && brew install libnspr4" - - "brew update && brew install libnss3" - - "brew update && brew install libpango-1.0-0" - - "brew update && brew install libpangocairo-1.0-0" - - "brew update && brew install libstdc++6" - - "brew update && brew install libx11-6" - - "brew update && brew install libx11-xcb1" - - "brew update && brew install libxcb1" - - "brew update && brew install libxcomposite1" - - "brew update && brew install libxcursor1" - - "brew update && brew install libxdamage1" - - "brew update && brew install libxext6" - - "brew update && brew install libxfixes3" - - "brew update && brew install libxi6" - - "brew update && brew install libxrandr2" - - "brew update && brew install libxrender1" - - "brew update && brew install libxss1" - - "brew update && brew install libxtst6" + - "homebrew/bin/brew update" + - "homebrew/bin/brew install libasound2" + - "homebrew/bin/brew install libatk-bridge2.0-0" + - "homebrew/bin/brew install libatk1.0-0" + - "homebrew/bin/brew install libc6" + - "homebrew/bin/brew install libcairo2" + - "homebrew/bin/brew install libcups2" + - "homebrew/bin/brew install libdbus-1-3" + - "homebrew/bin/brew install libexpat1" + - "homebrew/bin/brew install libfontconfig1" + - "homebrew/bin/brew install libgbm1" + - "homebrew/bin/brew install libgcc1" + - "homebrew/bin/brew install libglib2.0-0" + - "homebrew/bin/brew install libgtk-3-0" + - "homebrew/bin/brew install libnspr4" + - "homebrew/bin/brew install libnss3" + - "homebrew/bin/brew install libpango-1.0-0" + - "homebrew/bin/brew install libpangocairo-1.0-0" + - "homebrew/bin/brew install libstdc++6" + - "homebrew/bin/brew install libx11-6" + - "homebrew/bin/brew install libx11-xcb1" + - "homebrew/bin/brew install libxcb1" + - "homebrew/bin/brew install libxcomposite1" + - "homebrew/bin/brew install libxcursor1" + - "homebrew/bin/brew install libxdamage1" + - "homebrew/bin/brew install libxext6" + - "homebrew/bin/brew install libxfixes3" + - "homebrew/bin/brew install libxi6" + - "homebrew/bin/brew install libxrandr2" + - "homebrew/bin/brew install libxrender1" + - "homebrew/bin/brew install libxss1" + - "homebrew/bin/brew install libxtst6" test_flags: - "--test_tag_filters=-noci,-sauce" build_targets: ["..." ] From ec42fda2bbe344f6048ce47bdd7a842ace889bef Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 1 May 2025 17:53:39 +0000 Subject: [PATCH 069/107] Testing --- .bazelci/presubmit.yml | 65 +++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index befdf2b7..5ffd1688 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -45,38 +45,39 @@ tasks: platform: macos shell_commands: - "mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew" - - "homebrew/bin/brew update" - - "homebrew/bin/brew install libasound2" - - "homebrew/bin/brew install libatk-bridge2.0-0" - - "homebrew/bin/brew install libatk1.0-0" - - "homebrew/bin/brew install libc6" - - "homebrew/bin/brew install libcairo2" - - "homebrew/bin/brew install libcups2" - - "homebrew/bin/brew install libdbus-1-3" - - "homebrew/bin/brew install libexpat1" - - "homebrew/bin/brew install libfontconfig1" - - "homebrew/bin/brew install libgbm1" - - "homebrew/bin/brew install libgcc1" - - "homebrew/bin/brew install libglib2.0-0" - - "homebrew/bin/brew install libgtk-3-0" - - "homebrew/bin/brew install libnspr4" - - "homebrew/bin/brew install libnss3" - - "homebrew/bin/brew install libpango-1.0-0" - - "homebrew/bin/brew install libpangocairo-1.0-0" - - "homebrew/bin/brew install libstdc++6" - - "homebrew/bin/brew install libx11-6" - - "homebrew/bin/brew install libx11-xcb1" - - "homebrew/bin/brew install libxcb1" - - "homebrew/bin/brew install libxcomposite1" - - "homebrew/bin/brew install libxcursor1" - - "homebrew/bin/brew install libxdamage1" - - "homebrew/bin/brew install libxext6" - - "homebrew/bin/brew install libxfixes3" - - "homebrew/bin/brew install libxi6" - - "homebrew/bin/brew install libxrandr2" - - "homebrew/bin/brew install libxrender1" - - "homebrew/bin/brew install libxss1" - - "homebrew/bin/brew install libxtst6" + - "echo \"export PATH=homebrew/bin:$PATH\" >> ~/.bash_profile && source ~/.bash_profile" + - "brew update" + - "brew install libasound2" + - "brew install libatk-bridge2.0-0" + - "brew install libatk1.0-0" + - "brew install libc6" + - "brew install libcairo2" + - "brew install libcups2" + - "brew install libdbus-1-3" + - "brew install libexpat1" + - "brew install libfontconfig1" + - "brew install libgbm1" + - "brew install libgcc1" + - "brew install libglib2.0-0" + - "brew install libgtk-3-0" + - "brew install libnspr4" + - "brew install libnss3" + - "brew install libpango-1.0-0" + - "brew install libpangocairo-1.0-0" + - "brew install libstdc++6" + - "brew install libx11-6" + - "brew install libx11-xcb1" + - "brew install libxcb1" + - "brew install libxcomposite1" + - "brew install libxcursor1" + - "brew install libxdamage1" + - "brew install libxext6" + - "brew install libxfixes3" + - "brew install libxi6" + - "brew install libxrandr2" + - "brew install libxrender1" + - "brew install libxss1" + - "brew install libxtst6" test_flags: - "--test_tag_filters=-noci,-sauce" build_targets: ["..." ] From a6254b5a2191c7b9fcaf74a2e4e59a6eff009b37 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 2 May 2025 19:14:41 +0000 Subject: [PATCH 070/107] Update gecko --- web/versioned/browsers-0.3.4.bzl | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/web/versioned/browsers-0.3.4.bzl b/web/versioned/browsers-0.3.4.bzl index 27d2ebc3..cdd74490 100644 --- a/web/versioned/browsers-0.3.4.bzl +++ b/web/versioned/browsers-0.3.4.bzl @@ -220,12 +220,9 @@ def org_mozilla_geckodriver(): platform_archive( name = "org_mozilla_geckodriver_linux_x64", licenses = ["reciprocal"], # MPL 2.0 - sha256 = "12c37f41d11ed982b7be43d02411ff2c75fb7a484e46966d000b47d1665baa88", - # Geckodriver v0.30.0 - urls = [ - "https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz", - "https://storage.googleapis.com/dev-infra-mirror/firefox/97.0/linux_x64/driver-bin.tar.gz", - ], + sha256 = "7fdd8007d22a6f44caa6929a3d74bbd6a00984d88be50255153671bd201e5493", + # Geckodriver v0.31.0 + urls = ["https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz"], named_files = { "GECKODRIVER": "geckodriver", }, @@ -234,12 +231,9 @@ def org_mozilla_geckodriver(): platform_archive( name = "org_mozilla_geckodriver_macos_x64", licenses = ["reciprocal"], # MPL 2.0 - sha256 = "560ba192666c1fe8796404153cfdf2d12551515601c4b3937aabcba6ee300f8c", - # Geckodriver v0.30.0 - urls = [ - "https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-macos.tar.gz", - "https://storage.googleapis.com/dev-infra-mirror/firefox/97.0/mac_x64/driver-bin.tar.gz", - ], + sha256 = "4da5c6effe987e0c9049c69c7018e70a9d79f3c6119657def2cc0c3419f885e6", + # Geckodriver v0.31.0 + urls = ["https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-macos.tar.gz"], named_files = { "GECKODRIVER": "geckodriver", }, @@ -248,12 +242,9 @@ def org_mozilla_geckodriver(): platform_archive( name = "org_mozilla_geckodriver_macos_arm64", licenses = ["reciprocal"], # MPL 2.0 - sha256 = "895bc2146edaea434d57a3b5d9a141be5cb3c5f8e8804916bd4869978ddfd4db", - # Geckodriver v0.30.0 - urls = [ - "https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-macos-aarch64.tar.gz", - "https://storage.googleapis.com/dev-infra-mirror/firefox/97.0/mac_arm64/driver-bin.tar.gz", - ], + sha256 = "bfd3974b313be378087f4e7bc4c90128e67dc042647181b4c4ac302b1b88de7f", + # Geckodriver v0.31.0 + urls = ["https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-macos-aarch64.tar.gz"], named_files = { "GECKODRIVER": "geckodriver", }, From 1ebe59ede6c34c030e4497ae964fb63c70ed3616 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 2 May 2025 19:26:20 +0000 Subject: [PATCH 071/107] add libdbus-1-3:i386 according to https://stackoverflow.com/questions/25829915/libdbus-1-so-3-cannot-open-shared-object-file-no-such-file-or-directory --- .bazelci/presubmit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 5ffd1688..513f962a 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -5,6 +5,7 @@ tasks: platform: ubuntu2004 shell_commands: - "sudo apt -y update && sudo apt -y install libasound2" + - "sudo apt -y install libdbus-1-3:i386" - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" - "sudo apt -y update && sudo apt -y install libatk1.0-0" - "sudo apt -y update && sudo apt -y install libc6" From 6bc7bee766652cb3b6d67147529e30b4aaf57359 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 2 May 2025 19:37:13 +0000 Subject: [PATCH 072/107] updated removing libdbus --- .bazelci/presubmit.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 513f962a..f1251010 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -5,13 +5,11 @@ tasks: platform: ubuntu2004 shell_commands: - "sudo apt -y update && sudo apt -y install libasound2" - - "sudo apt -y install libdbus-1-3:i386" - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" - "sudo apt -y update && sudo apt -y install libatk1.0-0" - "sudo apt -y update && sudo apt -y install libc6" - "sudo apt -y update && sudo apt -y install libcairo2" - "sudo apt -y update && sudo apt -y install libcups2" - - "sudo apt -y update && sudo apt -y install libdbus-1-3" - "sudo apt -y update && sudo apt -y install libexpat1" - "sudo apt -y update && sudo apt -y install libfontconfig1" - "sudo apt -y update && sudo apt -y install libgbm1" From 1343f9b32e59570bc65db2ce156591c924d1ebbc Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 2 May 2025 22:25:20 +0000 Subject: [PATCH 073/107] modify presubmit yml --- .bazelci/presubmit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index f1251010..5ffd1688 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -10,6 +10,7 @@ tasks: - "sudo apt -y update && sudo apt -y install libc6" - "sudo apt -y update && sudo apt -y install libcairo2" - "sudo apt -y update && sudo apt -y install libcups2" + - "sudo apt -y update && sudo apt -y install libdbus-1-3" - "sudo apt -y update && sudo apt -y install libexpat1" - "sudo apt -y update && sudo apt -y install libfontconfig1" - "sudo apt -y update && sudo apt -y install libgbm1" From 63396ec6c2a4b01330b64d276ecc731de9d9dbd6 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 2 May 2025 23:29:23 +0000 Subject: [PATCH 074/107] Add dbus --- .bazelci/presubmit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 5ffd1688..f5dc41e7 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -5,6 +5,7 @@ tasks: platform: ubuntu2004 shell_commands: - "sudo apt -y update && sudo apt -y install libasound2" + - "sudo apt -y update && sudo apt -y install dbus" - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" - "sudo apt -y update && sudo apt -y install libatk1.0-0" - "sudo apt -y update && sudo apt -y install libc6" From 232c8071f340ede779c9f21cc2b4cb636405cc7d Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Fri, 2 May 2025 23:45:14 +0000 Subject: [PATCH 075/107] Add dbus --- .bazelci/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index f5dc41e7..f3ac8ea9 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -5,7 +5,7 @@ tasks: platform: ubuntu2004 shell_commands: - "sudo apt -y update && sudo apt -y install libasound2" - - "sudo apt -y update && sudo apt -y install dbus" + - "sudo apt -y update && sudo apt -y install libdbus-glib-1-2" - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" - "sudo apt -y update && sudo apt -y install libatk1.0-0" - "sudo apt -y update && sudo apt -y install libc6" From e45a039528f5940571c15ab115fefacefb0ed782 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Sat, 3 May 2025 01:11:53 +0000 Subject: [PATCH 076/107] modify presubmit yml --- .bazelci/presubmit.yml | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index f3ac8ea9..51ca876e 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -96,7 +96,38 @@ tasks: name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 shell_commands: - - "brew update && brew install libxcb1" + - "sudo apt -y update && sudo apt -y install libasound2" + - "sudo apt -y update && sudo apt -y install libdbus-glib-1-2" + - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" + - "sudo apt -y update && sudo apt -y install libatk1.0-0" + - "sudo apt -y update && sudo apt -y install libc6" + - "sudo apt -y update && sudo apt -y install libcairo2" + - "sudo apt -y update && sudo apt -y install libcups2" + - "sudo apt -y update && sudo apt -y install libdbus-1-3" + - "sudo apt -y update && sudo apt -y install libexpat1" + - "sudo apt -y update && sudo apt -y install libfontconfig1" + - "sudo apt -y update && sudo apt -y install libgbm1" + - "sudo apt -y update && sudo apt -y install libgcc1" + - "sudo apt -y update && sudo apt -y install libglib2.0-0" + - "sudo apt -y update && sudo apt -y install libgtk-3-0" + - "sudo apt -y update && sudo apt -y install libnspr4" + - "sudo apt -y update && sudo apt -y install libnss3" + - "sudo apt -y update && sudo apt -y install libpango-1.0-0" + - "sudo apt -y update && sudo apt -y install libpangocairo-1.0-0" + - "sudo apt -y update && sudo apt -y install libstdc++6" + - "sudo apt -y update && sudo apt -y install libx11-6" + - "sudo apt -y update && sudo apt -y install libx11-xcb1" + - "sudo apt -y update && sudo apt -y install libxcb1" + - "sudo apt -y update && sudo apt -y install libxcomposite1" + - "sudo apt -y update && sudo apt -y install libxcursor1" + - "sudo apt -y update && sudo apt -y install libxdamage1" + - "sudo apt -y update && sudo apt -y install libxext6" + - "sudo apt -y update && sudo apt -y install libxfixes3" + - "sudo apt -y update && sudo apt -y install libxi6" + - "sudo apt -y update && sudo apt -y install libxrandr2" + - "sudo apt -y update && sudo apt -y install libxrender1" + - "sudo apt -y update && sudo apt -y install libxss1" + - "sudo apt -y update && sudo apt -y install libxtst6" test_flags: - "--test_tag_filters=-noci,-sauce" build_targets: ["..."] From 0a1d70cd8402afaaa1c4f8635c95261f9b169af4 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 5 May 2025 19:21:15 +0000 Subject: [PATCH 077/107] Change yml file --- .bazelci/presubmit.yml | 35 ++++++++++++++++++++++++++++++++++- browsers/firefox-local.json | 3 +-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 51ca876e..45e0c421 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -36,6 +36,7 @@ tasks: - "sudo apt -y update && sudo apt -y install libxrender1" - "sudo apt -y update && sudo apt -y install libxss1" - "sudo apt -y update && sudo apt -y install libxtst6" + - "sudo apt -y update && sudo apt -y install gtk3" test_flags: - "--test_tag_filters=-noci,-sauce" build_targets: ["..."] @@ -179,7 +180,39 @@ tasks: name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 shell_commands: - - "sudo apt -y update && sudo apt -y install libxcb1" + - "sudo apt -y update && sudo apt -y install libasound2" + - "sudo apt -y update && sudo apt -y install libdbus-glib-1-2" + - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" + - "sudo apt -y update && sudo apt -y install libatk1.0-0" + - "sudo apt -y update && sudo apt -y install libc6" + - "sudo apt -y update && sudo apt -y install libcairo2" + - "sudo apt -y update && sudo apt -y install libcups2" + - "sudo apt -y update && sudo apt -y install libdbus-1-3" + - "sudo apt -y update && sudo apt -y install libexpat1" + - "sudo apt -y update && sudo apt -y install libfontconfig1" + - "sudo apt -y update && sudo apt -y install libgbm1" + - "sudo apt -y update && sudo apt -y install libgcc1" + - "sudo apt -y update && sudo apt -y install libglib2.0-0" + - "sudo apt -y update && sudo apt -y install libgtk-3-0" + - "sudo apt -y update && sudo apt -y install libnspr4" + - "sudo apt -y update && sudo apt -y install libnss3" + - "sudo apt -y update && sudo apt -y install libpango-1.0-0" + - "sudo apt -y update && sudo apt -y install libpangocairo-1.0-0" + - "sudo apt -y update && sudo apt -y install libstdc++6" + - "sudo apt -y update && sudo apt -y install libx11-6" + - "sudo apt -y update && sudo apt -y install libx11-xcb1" + - "sudo apt -y update && sudo apt -y install libxcb1" + - "sudo apt -y update && sudo apt -y install libxcomposite1" + - "sudo apt -y update && sudo apt -y install libxcursor1" + - "sudo apt -y update && sudo apt -y install libxdamage1" + - "sudo apt -y update && sudo apt -y install libxext6" + - "sudo apt -y update && sudo apt -y install libxfixes3" + - "sudo apt -y update && sudo apt -y install libxi6" + - "sudo apt -y update && sudo apt -y install libxrandr2" + - "sudo apt -y update && sudo apt -y install libxrender1" + - "sudo apt -y update && sudo apt -y install libxss1" + - "sudo apt -y update && sudo apt -y install libxtst6" + - "sudo apt -y update && sudo apt -y install gtk3" test_flags: - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] diff --git a/browsers/firefox-local.json b/browsers/firefox-local.json index 849aa1c4..40523d39 100644 --- a/browsers/firefox-local.json +++ b/browsers/firefox-local.json @@ -11,8 +11,7 @@ "port":"%WSLPORT:WSL%", "args": [ "--port=%WSLPORT:WSL%", - "--host=%WSL:HOST_IP%", - "--marionette-port=%WSLPORT:MARIONETTE%" + "--host=%WSL:HOST_IP%" ], "status": true, "shutdown": false From 678ade5c91c62d0f236eb90c06d169395f3076ee Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 5 May 2025 19:26:00 +0000 Subject: [PATCH 078/107] Remove gtk3 --- .bazelci/presubmit.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 45e0c421..05094f1b 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -36,7 +36,6 @@ tasks: - "sudo apt -y update && sudo apt -y install libxrender1" - "sudo apt -y update && sudo apt -y install libxss1" - "sudo apt -y update && sudo apt -y install libxtst6" - - "sudo apt -y update && sudo apt -y install gtk3" test_flags: - "--test_tag_filters=-noci,-sauce" build_targets: ["..."] @@ -212,7 +211,6 @@ tasks: - "sudo apt -y update && sudo apt -y install libxrender1" - "sudo apt -y update && sudo apt -y install libxss1" - "sudo apt -y update && sudo apt -y install libxtst6" - - "sudo apt -y update && sudo apt -y install gtk3" test_flags: - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] From aa2d0dea4c372502247a80bab6f6ed096881be87 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Mon, 5 May 2025 23:42:34 +0000 Subject: [PATCH 079/107] Update yml --- .bazelci/presubmit.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 05094f1b..bc01223e 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -36,6 +36,8 @@ tasks: - "sudo apt -y update && sudo apt -y install libxrender1" - "sudo apt -y update && sudo apt -y install libxss1" - "sudo apt -y update && sudo apt -y install libxtst6" + - "which firefox" + - "sudo apt -y update && sudo apt -y firefox-geckodriver" test_flags: - "--test_tag_filters=-noci,-sauce" build_targets: ["..."] From 82f563cbe3eaec3d68b713561765ce0195949278 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 6 May 2025 00:10:52 +0000 Subject: [PATCH 080/107] add new firefox --- .bazelci/presubmit.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index bc01223e..9a0e8ed8 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -36,7 +36,8 @@ tasks: - "sudo apt -y update && sudo apt -y install libxrender1" - "sudo apt -y update && sudo apt -y install libxss1" - "sudo apt -y update && sudo apt -y install libxtst6" - - "which firefox" + - "snap remove firefox" + - "sudo apt -y firefox" - "sudo apt -y update && sudo apt -y firefox-geckodriver" test_flags: - "--test_tag_filters=-noci,-sauce" From fe773e33ea5683dc2d84f9fe8876a79860537771 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 6 May 2025 19:56:32 +0000 Subject: [PATCH 081/107] add back the firefox local --- .bazelci/presubmit.yml | 4 +--- browsers/firefox-local.json | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 9a0e8ed8..6cafaaae 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -36,9 +36,7 @@ tasks: - "sudo apt -y update && sudo apt -y install libxrender1" - "sudo apt -y update && sudo apt -y install libxss1" - "sudo apt -y update && sudo apt -y install libxtst6" - - "snap remove firefox" - - "sudo apt -y firefox" - - "sudo apt -y update && sudo apt -y firefox-geckodriver" + - "sudo apt install libgtk-3-0" test_flags: - "--test_tag_filters=-noci,-sauce" build_targets: ["..."] diff --git a/browsers/firefox-local.json b/browsers/firefox-local.json index 40523d39..849aa1c4 100644 --- a/browsers/firefox-local.json +++ b/browsers/firefox-local.json @@ -11,7 +11,8 @@ "port":"%WSLPORT:WSL%", "args": [ "--port=%WSLPORT:WSL%", - "--host=%WSL:HOST_IP%" + "--host=%WSL:HOST_IP%", + "--marionette-port=%WSLPORT:MARIONETTE%" ], "status": true, "shutdown": false From 3dfe59f3ff597fcdfbf2e033b7e49756cbf2983b Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 6 May 2025 21:05:36 +0000 Subject: [PATCH 082/107] Update webdriver flags with additional --vv --- browsers/firefox-local.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/browsers/firefox-local.json b/browsers/firefox-local.json index 849aa1c4..ecfe560a 100644 --- a/browsers/firefox-local.json +++ b/browsers/firefox-local.json @@ -12,7 +12,8 @@ "args": [ "--port=%WSLPORT:WSL%", "--host=%WSL:HOST_IP%", - "--marionette-port=%WSLPORT:MARIONETTE%" + "--marionette-port=%WSLPORT:MARIONETTE%", + "--vv" ], "status": true, "shutdown": false From c6b9208a26059d494a75e29b86b21d03fb6df088 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 6 May 2025 21:08:53 +0000 Subject: [PATCH 083/107] Update webdriver flags with additional -vv --- browsers/firefox-local.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browsers/firefox-local.json b/browsers/firefox-local.json index ecfe560a..8cbc5e94 100644 --- a/browsers/firefox-local.json +++ b/browsers/firefox-local.json @@ -13,7 +13,7 @@ "--port=%WSLPORT:WSL%", "--host=%WSL:HOST_IP%", "--marionette-port=%WSLPORT:MARIONETTE%", - "--vv" + "-vv" ], "status": true, "shutdown": false From 9b2d02eff11ceb5d902fca8cd2f4c0308a1e8808 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 6 May 2025 21:14:46 +0000 Subject: [PATCH 084/107] Remove duplicate sudo apt -y update --- .bazelci/presubmit.yml | 190 ++++++++++++++++++++--------------------- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 6cafaaae..9ecddeac 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -5,37 +5,37 @@ tasks: platform: ubuntu2004 shell_commands: - "sudo apt -y update && sudo apt -y install libasound2" - - "sudo apt -y update && sudo apt -y install libdbus-glib-1-2" - - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" - - "sudo apt -y update && sudo apt -y install libatk1.0-0" - - "sudo apt -y update && sudo apt -y install libc6" - - "sudo apt -y update && sudo apt -y install libcairo2" - - "sudo apt -y update && sudo apt -y install libcups2" - - "sudo apt -y update && sudo apt -y install libdbus-1-3" - - "sudo apt -y update && sudo apt -y install libexpat1" - - "sudo apt -y update && sudo apt -y install libfontconfig1" - - "sudo apt -y update && sudo apt -y install libgbm1" - - "sudo apt -y update && sudo apt -y install libgcc1" - - "sudo apt -y update && sudo apt -y install libglib2.0-0" - - "sudo apt -y update && sudo apt -y install libgtk-3-0" - - "sudo apt -y update && sudo apt -y install libnspr4" - - "sudo apt -y update && sudo apt -y install libnss3" - - "sudo apt -y update && sudo apt -y install libpango-1.0-0" - - "sudo apt -y update && sudo apt -y install libpangocairo-1.0-0" - - "sudo apt -y update && sudo apt -y install libstdc++6" - - "sudo apt -y update && sudo apt -y install libx11-6" - - "sudo apt -y update && sudo apt -y install libx11-xcb1" - - "sudo apt -y update && sudo apt -y install libxcb1" - - "sudo apt -y update && sudo apt -y install libxcomposite1" - - "sudo apt -y update && sudo apt -y install libxcursor1" - - "sudo apt -y update && sudo apt -y install libxdamage1" - - "sudo apt -y update && sudo apt -y install libxext6" - - "sudo apt -y update && sudo apt -y install libxfixes3" - - "sudo apt -y update && sudo apt -y install libxi6" - - "sudo apt -y update && sudo apt -y install libxrandr2" - - "sudo apt -y update && sudo apt -y install libxrender1" - - "sudo apt -y update && sudo apt -y install libxss1" - - "sudo apt -y update && sudo apt -y install libxtst6" + - "sudo apt -y install libdbus-glib-1-2" + - "sudo apt -y install libatk-bridge2.0-0" + - "sudo apt -y install libatk1.0-0" + - "sudo apt -y install libc6" + - "sudo apt -y install libcairo2" + - "sudo apt -y install libcups2" + - "sudo apt -y install libdbus-1-3" + - "sudo apt -y install libexpat1" + - "sudo apt -y install libfontconfig1" + - "sudo apt -y install libgbm1" + - "sudo apt -y install libgcc1" + - "sudo apt -y install libglib2.0-0" + - "sudo apt -y install libgtk-3-0" + - "sudo apt -y install libnspr4" + - "sudo apt -y install libnss3" + - "sudo apt -y install libpango-1.0-0" + - "sudo apt -y install libpangocairo-1.0-0" + - "sudo apt -y install libstdc++6" + - "sudo apt -y install libx11-6" + - "sudo apt -y install libx11-xcb1" + - "sudo apt -y install libxcb1" + - "sudo apt -y install libxcomposite1" + - "sudo apt -y install libxcursor1" + - "sudo apt -y install libxdamage1" + - "sudo apt -y install libxext6" + - "sudo apt -y install libxfixes3" + - "sudo apt -y install libxi6" + - "sudo apt -y install libxrandr2" + - "sudo apt -y install libxrender1" + - "sudo apt -y install libxss1" + - "sudo apt -y install libxtst6" - "sudo apt install libgtk-3-0" test_flags: - "--test_tag_filters=-noci,-sauce" @@ -97,38 +97,38 @@ tasks: name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 shell_commands: - - "sudo apt -y update && sudo apt -y install libasound2" - - "sudo apt -y update && sudo apt -y install libdbus-glib-1-2" - - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" - - "sudo apt -y update && sudo apt -y install libatk1.0-0" - - "sudo apt -y update && sudo apt -y install libc6" - - "sudo apt -y update && sudo apt -y install libcairo2" - - "sudo apt -y update && sudo apt -y install libcups2" - - "sudo apt -y update && sudo apt -y install libdbus-1-3" - - "sudo apt -y update && sudo apt -y install libexpat1" - - "sudo apt -y update && sudo apt -y install libfontconfig1" - - "sudo apt -y update && sudo apt -y install libgbm1" - - "sudo apt -y update && sudo apt -y install libgcc1" - - "sudo apt -y update && sudo apt -y install libglib2.0-0" - - "sudo apt -y update && sudo apt -y install libgtk-3-0" - - "sudo apt -y update && sudo apt -y install libnspr4" - - "sudo apt -y update && sudo apt -y install libnss3" - - "sudo apt -y update && sudo apt -y install libpango-1.0-0" - - "sudo apt -y update && sudo apt -y install libpangocairo-1.0-0" - - "sudo apt -y update && sudo apt -y install libstdc++6" - - "sudo apt -y update && sudo apt -y install libx11-6" - - "sudo apt -y update && sudo apt -y install libx11-xcb1" - - "sudo apt -y update && sudo apt -y install libxcb1" - - "sudo apt -y update && sudo apt -y install libxcomposite1" - - "sudo apt -y update && sudo apt -y install libxcursor1" - - "sudo apt -y update && sudo apt -y install libxdamage1" - - "sudo apt -y update && sudo apt -y install libxext6" - - "sudo apt -y update && sudo apt -y install libxfixes3" - - "sudo apt -y update && sudo apt -y install libxi6" - - "sudo apt -y update && sudo apt -y install libxrandr2" - - "sudo apt -y update && sudo apt -y install libxrender1" - - "sudo apt -y update && sudo apt -y install libxss1" - - "sudo apt -y update && sudo apt -y install libxtst6" + - "sudo apt -y install libasound2" + - "sudo apt -y install libdbus-glib-1-2" + - "sudo apt -y install libatk-bridge2.0-0" + - "sudo apt -y install libatk1.0-0" + - "sudo apt -y install libc6" + - "sudo apt -y install libcairo2" + - "sudo apt -y install libcups2" + - "sudo apt -y install libdbus-1-3" + - "sudo apt -y install libexpat1" + - "sudo apt -y install libfontconfig1" + - "sudo apt -y install libgbm1" + - "sudo apt -y install libgcc1" + - "sudo apt -y install libglib2.0-0" + - "sudo apt -y install libgtk-3-0" + - "sudo apt -y install libnspr4" + - "sudo apt -y install libnss3" + - "sudo apt -y install libpango-1.0-0" + - "sudo apt -y install libpangocairo-1.0-0" + - "sudo apt -y install libstdc++6" + - "sudo apt -y install libx11-6" + - "sudo apt -y install libx11-xcb1" + - "sudo apt -y install libxcb1" + - "sudo apt -y install libxcomposite1" + - "sudo apt -y install libxcursor1" + - "sudo apt -y install libxdamage1" + - "sudo apt -y install libxext6" + - "sudo apt -y install libxfixes3" + - "sudo apt -y install libxi6" + - "sudo apt -y install libxrandr2" + - "sudo apt -y install libxrender1" + - "sudo apt -y install libxss1" + - "sudo apt -y install libxtst6" test_flags: - "--test_tag_filters=-noci,-sauce" build_targets: ["..."] @@ -154,7 +154,7 @@ tasks: name: "rules_web_testing_java in ubuntu" platform: ubuntu2004 shell_commands: - - "sudo apt -y update && sudo apt -y install libxcb1" + - "sudo apt -y install libxcb1" test_flags: - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] @@ -181,37 +181,37 @@ tasks: platform: ubuntu2004 shell_commands: - "sudo apt -y update && sudo apt -y install libasound2" - - "sudo apt -y update && sudo apt -y install libdbus-glib-1-2" - - "sudo apt -y update && sudo apt -y install libatk-bridge2.0-0" - - "sudo apt -y update && sudo apt -y install libatk1.0-0" - - "sudo apt -y update && sudo apt -y install libc6" - - "sudo apt -y update && sudo apt -y install libcairo2" - - "sudo apt -y update && sudo apt -y install libcups2" - - "sudo apt -y update && sudo apt -y install libdbus-1-3" - - "sudo apt -y update && sudo apt -y install libexpat1" - - "sudo apt -y update && sudo apt -y install libfontconfig1" - - "sudo apt -y update && sudo apt -y install libgbm1" - - "sudo apt -y update && sudo apt -y install libgcc1" - - "sudo apt -y update && sudo apt -y install libglib2.0-0" - - "sudo apt -y update && sudo apt -y install libgtk-3-0" - - "sudo apt -y update && sudo apt -y install libnspr4" - - "sudo apt -y update && sudo apt -y install libnss3" - - "sudo apt -y update && sudo apt -y install libpango-1.0-0" - - "sudo apt -y update && sudo apt -y install libpangocairo-1.0-0" - - "sudo apt -y update && sudo apt -y install libstdc++6" - - "sudo apt -y update && sudo apt -y install libx11-6" - - "sudo apt -y update && sudo apt -y install libx11-xcb1" - - "sudo apt -y update && sudo apt -y install libxcb1" - - "sudo apt -y update && sudo apt -y install libxcomposite1" - - "sudo apt -y update && sudo apt -y install libxcursor1" - - "sudo apt -y update && sudo apt -y install libxdamage1" - - "sudo apt -y update && sudo apt -y install libxext6" - - "sudo apt -y update && sudo apt -y install libxfixes3" - - "sudo apt -y update && sudo apt -y install libxi6" - - "sudo apt -y update && sudo apt -y install libxrandr2" - - "sudo apt -y update && sudo apt -y install libxrender1" - - "sudo apt -y update && sudo apt -y install libxss1" - - "sudo apt -y update && sudo apt -y install libxtst6" + - "sudo apt -y install libdbus-glib-1-2" + - "sudo apt -y install libatk-bridge2.0-0" + - "sudo apt -y install libatk1.0-0" + - "sudo apt -y install libc6" + - "sudo apt -y install libcairo2" + - "sudo apt -y install libcups2" + - "sudo apt -y install libdbus-1-3" + - "sudo apt -y install libexpat1" + - "sudo apt -y install libfontconfig1" + - "sudo apt -y install libgbm1" + - "sudo apt -y install libgcc1" + - "sudo apt -y install libglib2.0-0" + - "sudo apt -y install libgtk-3-0" + - "sudo apt -y install libnspr4" + - "sudo apt -y install libnss3" + - "sudo apt -y install libpango-1.0-0" + - "sudo apt -y install libpangocairo-1.0-0" + - "sudo apt -y install libstdc++6" + - "sudo apt -y install libx11-6" + - "sudo apt -y install libx11-xcb1" + - "sudo apt -y install libxcb1" + - "sudo apt -y install libxcomposite1" + - "sudo apt -y install libxcursor1" + - "sudo apt -y install libxdamage1" + - "sudo apt -y install libxext6" + - "sudo apt -y install libxfixes3" + - "sudo apt -y install libxi6" + - "sudo apt -y install libxrandr2" + - "sudo apt -y install libxrender1" + - "sudo apt -y install libxss1" + - "sudo apt -y install libxtst6" test_flags: - "--test_tag_filters=-noci,-sauce" build_targets: [ "..." ] From 7107450dfaf38183a1e1acbae141a34d0dba52dc Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 6 May 2025 21:52:06 +0000 Subject: [PATCH 085/107] add timeout --- .bazelci/presubmit.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 9ecddeac..cdbd10d9 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -39,6 +39,7 @@ tasks: - "sudo apt install libgtk-3-0" test_flags: - "--test_tag_filters=-noci,-sauce" + - "--test_timeout=60" build_targets: ["..."] test_targets: ["..."] working_directory: web_testing_go @@ -82,6 +83,7 @@ tasks: - "brew install libxtst6" test_flags: - "--test_tag_filters=-noci,-sauce" + - "--test_timeout=60" build_targets: ["..." ] test_targets: [ "..." ] working_directory: web_testing_go @@ -90,6 +92,7 @@ tasks: platform: windows test_flags: - "--test_tag_filters=-noci,-sauce" + - "--test_timeout=60" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_go @@ -131,6 +134,7 @@ tasks: - "sudo apt -y install libxtst6" test_flags: - "--test_tag_filters=-noci,-sauce" + - "--test_timeout=60" build_targets: ["..."] test_targets: ["..."] working_directory: web_testing_scala @@ -139,6 +143,7 @@ tasks: platform: macos test_flags: - "--test_tag_filters=-noci,-sauce" + - "--test_timeout=60" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_scala @@ -147,6 +152,7 @@ tasks: platform: windows test_flags: - "--test_tag_filters=-noci,-sauce" + - "--test_timeout=60" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_scala @@ -157,6 +163,7 @@ tasks: - "sudo apt -y install libxcb1" test_flags: - "--test_tag_filters=-noci,-sauce" + - "--test_timeout=60" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_java @@ -165,6 +172,7 @@ tasks: platform: macos test_flags: - "--test_tag_filters=-noci,-sauce" + - "--test_timeout=60" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_java @@ -173,6 +181,7 @@ tasks: platform: windows test_flags: - "--test_tag_filters=-noci,-sauce" + - "--test_timeout=60" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_java @@ -214,6 +223,7 @@ tasks: - "sudo apt -y install libxtst6" test_flags: - "--test_tag_filters=-noci,-sauce" + - "--test_timeout=60" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_python @@ -222,6 +232,7 @@ tasks: platform: macos test_flags: - "--test_tag_filters=-noci,-sauce" + - "--test_timeout=60" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_python @@ -230,6 +241,7 @@ tasks: platform: windows test_flags: - "--test_tag_filters=-noci,-sauce" + - "--test_timeout=60" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_python \ No newline at end of file From 863df839493f6d59be6c7c618ecf8eb90300e101 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 6 May 2025 23:03:39 +0000 Subject: [PATCH 086/107] Upgrade firefox version to 129.0 --- web/versioned/browsers-0.3.4.bzl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/versioned/browsers-0.3.4.bzl b/web/versioned/browsers-0.3.4.bzl index cdd74490..eb4870ef 100644 --- a/web/versioned/browsers-0.3.4.bzl +++ b/web/versioned/browsers-0.3.4.bzl @@ -177,8 +177,8 @@ def org_mozilla_firefox(): sha256 = "3d0f74790fe6ff5e38324222ab0c47e10edb31970ed67c6dd7a1c84e7017d1a5", # Firefox v97.0 urls = [ - "https://ftp.mozilla.org/pub/firefox/releases/97.0/linux-x86_64/en-US/firefox-97.0.tar.bz2", - "https://storage.googleapis.com/dev-infra-mirror/firefox/97.0/linux_x64/browser-bin.tar.bz2", + "https://ftp.mozilla.org/pub/firefox/releases/129.0/linux-x86_64/en-US/firefox-129.0.tar.bz2", + "https://storage.googleapis.com/dev-infra-mirror/firefox/129.0/linux_x64/browser-bin.tar.bz2", ], named_files = { "FIREFOX": "firefox/firefox", @@ -191,8 +191,8 @@ def org_mozilla_firefox(): sha256 = "c06c4e58179acaf55d05c3be41d0d4cdd68f811a75322a39557d91121aa2ef74", # Firefox v97.0 urls = [ - "https://ftp.mozilla.org/pub/firefox/releases/97.0/mac/en-US/Firefox%2097.0.dmg", - "https://storage.googleapis.com/dev-infra-mirror/firefox/97.0/mac_x64/browser-bin.dmg", + "https://ftp.mozilla.org/pub/firefox/releases/129.0/mac/en-US/Firefox%20129.0.dmg" + "https://storage.googleapis.com/dev-infra-mirror/firefox/129.0/mac_x64/browser-bin.dmg", ], named_files = { "FIREFOX": "Firefox.app/Contents/MacOS/firefox", @@ -208,8 +208,8 @@ def org_mozilla_firefox(): sha256 = "c06c4e58179acaf55d05c3be41d0d4cdd68f811a75322a39557d91121aa2ef74", # Firefox v97.0 urls = [ - "https://ftp.mozilla.org/pub/firefox/releases/97.0/mac/en-US/Firefox%2097.0.dmg", - "https://storage.googleapis.com/dev-infra-mirror/firefox/97.0/mac_x64/browser-bin.dmg", + "https://ftp.mozilla.org/pub/firefox/releases/129.0/mac/en-US/Firefox%20129.0.dmg", + "https://storage.googleapis.com/dev-infra-mirror/firefox/129.0/mac_x64/browser-bin.dmg", ], named_files = { "FIREFOX": "Firefox.app/Contents/MacOS/firefox", From bc8f2bbc9b8038115db6fbaf8989ccf4f02ac034 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 6 May 2025 23:18:30 +0000 Subject: [PATCH 087/107] Modify additional comma --- web/versioned/browsers-0.3.4.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/versioned/browsers-0.3.4.bzl b/web/versioned/browsers-0.3.4.bzl index eb4870ef..430a5ee8 100644 --- a/web/versioned/browsers-0.3.4.bzl +++ b/web/versioned/browsers-0.3.4.bzl @@ -191,7 +191,7 @@ def org_mozilla_firefox(): sha256 = "c06c4e58179acaf55d05c3be41d0d4cdd68f811a75322a39557d91121aa2ef74", # Firefox v97.0 urls = [ - "https://ftp.mozilla.org/pub/firefox/releases/129.0/mac/en-US/Firefox%20129.0.dmg" + "https://ftp.mozilla.org/pub/firefox/releases/129.0/mac/en-US/Firefox%20129.0.dmg", "https://storage.googleapis.com/dev-infra-mirror/firefox/129.0/mac_x64/browser-bin.dmg", ], named_files = { From 328cf46d58af3c08417bc1cd5d15d11bcbc8d68a Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Tue, 6 May 2025 23:30:02 +0000 Subject: [PATCH 088/107] update shasum --- web/versioned/browsers-0.3.4.bzl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/web/versioned/browsers-0.3.4.bzl b/web/versioned/browsers-0.3.4.bzl index 430a5ee8..28606cf4 100644 --- a/web/versioned/browsers-0.3.4.bzl +++ b/web/versioned/browsers-0.3.4.bzl @@ -174,11 +174,10 @@ def org_mozilla_firefox(): platform_archive( name = "org_mozilla_firefox_linux_x64", licenses = ["reciprocal"], # MPL 2.0 - sha256 = "3d0f74790fe6ff5e38324222ab0c47e10edb31970ed67c6dd7a1c84e7017d1a5", + sha256 = "878a042f49ee34314bde9ca70a0f93c0941c247c72f17b87d904024bef2b27ad", # Firefox v97.0 urls = [ "https://ftp.mozilla.org/pub/firefox/releases/129.0/linux-x86_64/en-US/firefox-129.0.tar.bz2", - "https://storage.googleapis.com/dev-infra-mirror/firefox/129.0/linux_x64/browser-bin.tar.bz2", ], named_files = { "FIREFOX": "firefox/firefox", @@ -188,11 +187,10 @@ def org_mozilla_firefox(): platform_archive( name = "org_mozilla_firefox_macos_x64", licenses = ["reciprocal"], # MPL 2.0 - sha256 = "c06c4e58179acaf55d05c3be41d0d4cdd68f811a75322a39557d91121aa2ef74", + sha256 = "4b86e9de2b26339b30342a1ef3be1e3914d70921f81fd67bc9c63595823051f1", # Firefox v97.0 urls = [ "https://ftp.mozilla.org/pub/firefox/releases/129.0/mac/en-US/Firefox%20129.0.dmg", - "https://storage.googleapis.com/dev-infra-mirror/firefox/129.0/mac_x64/browser-bin.dmg", ], named_files = { "FIREFOX": "Firefox.app/Contents/MacOS/firefox", @@ -205,11 +203,10 @@ def org_mozilla_firefox(): # repositories to allow for dedicated ARM/x64 binaries if needed in the future. name = "org_mozilla_firefox_macos_arm64", licenses = ["reciprocal"], # MPL 2.0 - sha256 = "c06c4e58179acaf55d05c3be41d0d4cdd68f811a75322a39557d91121aa2ef74", + sha256 = "4b86e9de2b26339b30342a1ef3be1e3914d70921f81fd67bc9c63595823051f1", # Firefox v97.0 urls = [ "https://ftp.mozilla.org/pub/firefox/releases/129.0/mac/en-US/Firefox%20129.0.dmg", - "https://storage.googleapis.com/dev-infra-mirror/firefox/129.0/mac_x64/browser-bin.dmg", ], named_files = { "FIREFOX": "Firefox.app/Contents/MacOS/firefox", From 2ed56ba935dae47a3adaf987dc078851512b8af4 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 7 May 2025 01:53:57 +0000 Subject: [PATCH 089/107] Set home environment variable --- .bazelci/presubmit.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index cdbd10d9..f48c2d65 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -3,6 +3,8 @@ tasks: web_testing_go_ubuntu2004: name: "rules_web_testing_go in ubuntu" platform: ubuntu2004 + environment: + HOME: /root shell_commands: - "sudo apt -y update && sudo apt -y install libasound2" - "sudo apt -y install libdbus-glib-1-2" @@ -40,6 +42,7 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" + - "test_env HOME=/root" build_targets: ["..."] test_targets: ["..."] working_directory: web_testing_go @@ -84,6 +87,7 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" + - "test_env HOME=/root" build_targets: ["..." ] test_targets: [ "..." ] working_directory: web_testing_go @@ -93,6 +97,7 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" + - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_go @@ -135,6 +140,7 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" + - "test_env HOME=/root" build_targets: ["..."] test_targets: ["..."] working_directory: web_testing_scala @@ -144,6 +150,7 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" + - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_scala @@ -153,6 +160,7 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" + - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_scala @@ -164,6 +172,7 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" + - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_java @@ -173,6 +182,7 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" + - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_java @@ -182,6 +192,7 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" + - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_java @@ -224,6 +235,7 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" + - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_python @@ -233,6 +245,7 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" + - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_python @@ -242,6 +255,7 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" + - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_python \ No newline at end of file From 5fbaac986950f2aee82c142e9b806246bc364088 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 7 May 2025 03:32:25 +0000 Subject: [PATCH 090/107] set env in json file --- .bazelci/presubmit.yml | 14 -------------- browsers/firefox-local.json | 3 +++ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index f48c2d65..cdbd10d9 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -3,8 +3,6 @@ tasks: web_testing_go_ubuntu2004: name: "rules_web_testing_go in ubuntu" platform: ubuntu2004 - environment: - HOME: /root shell_commands: - "sudo apt -y update && sudo apt -y install libasound2" - "sudo apt -y install libdbus-glib-1-2" @@ -42,7 +40,6 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" - - "test_env HOME=/root" build_targets: ["..."] test_targets: ["..."] working_directory: web_testing_go @@ -87,7 +84,6 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" - - "test_env HOME=/root" build_targets: ["..." ] test_targets: [ "..." ] working_directory: web_testing_go @@ -97,7 +93,6 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" - - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_go @@ -140,7 +135,6 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" - - "test_env HOME=/root" build_targets: ["..."] test_targets: ["..."] working_directory: web_testing_scala @@ -150,7 +144,6 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" - - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_scala @@ -160,7 +153,6 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" - - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_scala @@ -172,7 +164,6 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" - - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_java @@ -182,7 +173,6 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" - - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_java @@ -192,7 +182,6 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" - - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_java @@ -235,7 +224,6 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" - - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_python @@ -245,7 +233,6 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" - - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_python @@ -255,7 +242,6 @@ tasks: test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" - - "test_env HOME=/root" build_targets: [ "..." ] test_targets: [ "..." ] working_directory: web_testing_python \ No newline at end of file diff --git a/browsers/firefox-local.json b/browsers/firefox-local.json index 8cbc5e94..93ad2664 100644 --- a/browsers/firefox-local.json +++ b/browsers/firefox-local.json @@ -15,6 +15,9 @@ "--marionette-port=%WSLPORT:MARIONETTE%", "-vv" ], + "env": { + "HOME": "%ENV:TEST_TMPDIR%" + }, "status": true, "shutdown": false } From f428d9a2269f74d712a0032e4672a00e4fa2c928 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 7 May 2025 03:52:29 +0000 Subject: [PATCH 091/107] modify yml for scala ubuntu --- .bazelci/presubmit.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index cdbd10d9..97fd65e2 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -100,7 +100,7 @@ tasks: name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 shell_commands: - - "sudo apt -y install libasound2" + - "sudo apt -y update && sudo apt -y install libasound2" - "sudo apt -y install libdbus-glib-1-2" - "sudo apt -y install libatk-bridge2.0-0" - "sudo apt -y install libatk1.0-0" @@ -132,6 +132,7 @@ tasks: - "sudo apt -y install libxrender1" - "sudo apt -y install libxss1" - "sudo apt -y install libxtst6" + - "sudo apt install libgtk-3-0" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -221,6 +222,7 @@ tasks: - "sudo apt -y install libxrender1" - "sudo apt -y install libxss1" - "sudo apt -y install libxtst6" + - "sudo apt install libgtk-3-0" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" From 2038fe5130854b5bb91ce2d23d80f6ed70aa102f Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 7 May 2025 18:59:42 +0000 Subject: [PATCH 092/107] Modify the yml to include setup.sh --- .bazelci/presubmit.yml | 35 ----------------------------------- setup.sh | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 35 deletions(-) create mode 100644 setup.sh diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 97fd65e2..6d6a728b 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -46,41 +46,6 @@ tasks: web_testing_go_macos: name: "rules_web_testing_go in macos" platform: macos - shell_commands: - - "mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew" - - "echo \"export PATH=homebrew/bin:$PATH\" >> ~/.bash_profile && source ~/.bash_profile" - - "brew update" - - "brew install libasound2" - - "brew install libatk-bridge2.0-0" - - "brew install libatk1.0-0" - - "brew install libc6" - - "brew install libcairo2" - - "brew install libcups2" - - "brew install libdbus-1-3" - - "brew install libexpat1" - - "brew install libfontconfig1" - - "brew install libgbm1" - - "brew install libgcc1" - - "brew install libglib2.0-0" - - "brew install libgtk-3-0" - - "brew install libnspr4" - - "brew install libnss3" - - "brew install libpango-1.0-0" - - "brew install libpangocairo-1.0-0" - - "brew install libstdc++6" - - "brew install libx11-6" - - "brew install libx11-xcb1" - - "brew install libxcb1" - - "brew install libxcomposite1" - - "brew install libxcursor1" - - "brew install libxdamage1" - - "brew install libxext6" - - "brew install libxfixes3" - - "brew install libxi6" - - "brew install libxrandr2" - - "brew install libxrender1" - - "brew install libxss1" - - "brew install libxtst6" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" diff --git a/setup.sh b/setup.sh new file mode 100644 index 00000000..9e1c67f9 --- /dev/null +++ b/setup.sh @@ -0,0 +1,35 @@ +set -ex + +sudo apt -y update && sudo apt -y install libasound2 +sudo apt -y install libdbus-glib-1-2 +sudo apt -y install libatk-bridge2.0-0 +sudo apt -y install libatk1.0-0 +sudo apt -y install libc6 +sudo apt -y install libcairo2 +sudo apt -y install libcups2 +sudo apt -y install libdbus-1-3 +sudo apt -y install libexpat1 +sudo apt -y install libfontconfig1 +sudo apt -y install libgbm1 +sudo apt -y install libgcc1 +sudo apt -y install libglib2.0-0 +sudo apt -y install libgtk-3-0 +sudo apt -y install libnspr4 +sudo apt -y install libnss3 +sudo apt -y install libpango-1.0-0 +sudo apt -y install libpangocairo-1.0-0 +sudo apt -y install libstdc++6 +sudo apt -y install libx11-6 +sudo apt -y install libx11-xcb1 +sudo apt -y install libxcb1 +sudo apt -y install libxcomposite1 +sudo apt -y install libxcursor1 +sudo apt -y install libxdamage1 +sudo apt -y install libxext6 +sudo apt -y install libxfixes3 +sudo apt -y install libxi6 +sudo apt -y install libxrandr2 +sudo apt -y install libxrender1 +sudo apt -y install libxss1 +sudo apt -y install libxtst6 +sudo apt install libgtk-3-0 \ No newline at end of file From bccbd41587f20c60325a27e10d08eea773503886 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 7 May 2025 21:12:38 +0000 Subject: [PATCH 093/107] include sh in yml --- .bazelci/presubmit.yml | 104 ++--------------------------------------- 1 file changed, 4 insertions(+), 100 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 6d6a728b..97b429fa 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -4,39 +4,7 @@ tasks: name: "rules_web_testing_go in ubuntu" platform: ubuntu2004 shell_commands: - - "sudo apt -y update && sudo apt -y install libasound2" - - "sudo apt -y install libdbus-glib-1-2" - - "sudo apt -y install libatk-bridge2.0-0" - - "sudo apt -y install libatk1.0-0" - - "sudo apt -y install libc6" - - "sudo apt -y install libcairo2" - - "sudo apt -y install libcups2" - - "sudo apt -y install libdbus-1-3" - - "sudo apt -y install libexpat1" - - "sudo apt -y install libfontconfig1" - - "sudo apt -y install libgbm1" - - "sudo apt -y install libgcc1" - - "sudo apt -y install libglib2.0-0" - - "sudo apt -y install libgtk-3-0" - - "sudo apt -y install libnspr4" - - "sudo apt -y install libnss3" - - "sudo apt -y install libpango-1.0-0" - - "sudo apt -y install libpangocairo-1.0-0" - - "sudo apt -y install libstdc++6" - - "sudo apt -y install libx11-6" - - "sudo apt -y install libx11-xcb1" - - "sudo apt -y install libxcb1" - - "sudo apt -y install libxcomposite1" - - "sudo apt -y install libxcursor1" - - "sudo apt -y install libxdamage1" - - "sudo apt -y install libxext6" - - "sudo apt -y install libxfixes3" - - "sudo apt -y install libxi6" - - "sudo apt -y install libxrandr2" - - "sudo apt -y install libxrender1" - - "sudo apt -y install libxss1" - - "sudo apt -y install libxtst6" - - "sudo apt install libgtk-3-0" + - "sh ./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -65,39 +33,7 @@ tasks: name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 shell_commands: - - "sudo apt -y update && sudo apt -y install libasound2" - - "sudo apt -y install libdbus-glib-1-2" - - "sudo apt -y install libatk-bridge2.0-0" - - "sudo apt -y install libatk1.0-0" - - "sudo apt -y install libc6" - - "sudo apt -y install libcairo2" - - "sudo apt -y install libcups2" - - "sudo apt -y install libdbus-1-3" - - "sudo apt -y install libexpat1" - - "sudo apt -y install libfontconfig1" - - "sudo apt -y install libgbm1" - - "sudo apt -y install libgcc1" - - "sudo apt -y install libglib2.0-0" - - "sudo apt -y install libgtk-3-0" - - "sudo apt -y install libnspr4" - - "sudo apt -y install libnss3" - - "sudo apt -y install libpango-1.0-0" - - "sudo apt -y install libpangocairo-1.0-0" - - "sudo apt -y install libstdc++6" - - "sudo apt -y install libx11-6" - - "sudo apt -y install libx11-xcb1" - - "sudo apt -y install libxcb1" - - "sudo apt -y install libxcomposite1" - - "sudo apt -y install libxcursor1" - - "sudo apt -y install libxdamage1" - - "sudo apt -y install libxext6" - - "sudo apt -y install libxfixes3" - - "sudo apt -y install libxi6" - - "sudo apt -y install libxrandr2" - - "sudo apt -y install libxrender1" - - "sudo apt -y install libxss1" - - "sudo apt -y install libxtst6" - - "sudo apt install libgtk-3-0" + - "sh ./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -126,7 +62,7 @@ tasks: name: "rules_web_testing_java in ubuntu" platform: ubuntu2004 shell_commands: - - "sudo apt -y install libxcb1" + - "sh ./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -155,39 +91,7 @@ tasks: name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 shell_commands: - - "sudo apt -y update && sudo apt -y install libasound2" - - "sudo apt -y install libdbus-glib-1-2" - - "sudo apt -y install libatk-bridge2.0-0" - - "sudo apt -y install libatk1.0-0" - - "sudo apt -y install libc6" - - "sudo apt -y install libcairo2" - - "sudo apt -y install libcups2" - - "sudo apt -y install libdbus-1-3" - - "sudo apt -y install libexpat1" - - "sudo apt -y install libfontconfig1" - - "sudo apt -y install libgbm1" - - "sudo apt -y install libgcc1" - - "sudo apt -y install libglib2.0-0" - - "sudo apt -y install libgtk-3-0" - - "sudo apt -y install libnspr4" - - "sudo apt -y install libnss3" - - "sudo apt -y install libpango-1.0-0" - - "sudo apt -y install libpangocairo-1.0-0" - - "sudo apt -y install libstdc++6" - - "sudo apt -y install libx11-6" - - "sudo apt -y install libx11-xcb1" - - "sudo apt -y install libxcb1" - - "sudo apt -y install libxcomposite1" - - "sudo apt -y install libxcursor1" - - "sudo apt -y install libxdamage1" - - "sudo apt -y install libxext6" - - "sudo apt -y install libxfixes3" - - "sudo apt -y install libxi6" - - "sudo apt -y install libxrandr2" - - "sudo apt -y install libxrender1" - - "sudo apt -y install libxss1" - - "sudo apt -y install libxtst6" - - "sudo apt install libgtk-3-0" + - "sh ./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" From 641624f02cfb44d284737614bcd3b5d2ac234de4 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 7 May 2025 22:01:53 +0000 Subject: [PATCH 094/107] Modify yml to include sh --- .bazelci/presubmit.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 97b429fa..48b1fb59 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -4,7 +4,7 @@ tasks: name: "rules_web_testing_go in ubuntu" platform: ubuntu2004 shell_commands: - - "sh ./setup.sh" + - sh setup.sh test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -33,7 +33,7 @@ tasks: name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 shell_commands: - - "sh ./setup.sh" + - sh setup.sh test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -62,7 +62,7 @@ tasks: name: "rules_web_testing_java in ubuntu" platform: ubuntu2004 shell_commands: - - "sh ./setup.sh" + - sh setup.sh test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -91,7 +91,7 @@ tasks: name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 shell_commands: - - "sh ./setup.sh" + - sh setup.sh test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" From 48d0351a8c57d0418c6f33851949e8e3d7bc9160 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 7 May 2025 22:07:54 +0000 Subject: [PATCH 095/107] Modify yml to include sh --- .bazelci/presubmit.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 48b1fb59..4f989787 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -4,7 +4,7 @@ tasks: name: "rules_web_testing_go in ubuntu" platform: ubuntu2004 shell_commands: - - sh setup.sh + - "sudo ./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -33,7 +33,7 @@ tasks: name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 shell_commands: - - sh setup.sh + - "sudo ./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -62,7 +62,7 @@ tasks: name: "rules_web_testing_java in ubuntu" platform: ubuntu2004 shell_commands: - - sh setup.sh + - "sudo ./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -91,7 +91,7 @@ tasks: name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 shell_commands: - - sh setup.sh + - "sudo ./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" From de7553f51131b4d07b06beafcb043f6fa5df0dda Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 7 May 2025 22:11:05 +0000 Subject: [PATCH 096/107] Modify yml to include sh --- .bazelci/presubmit.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 4f989787..2affe6c2 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -4,7 +4,7 @@ tasks: name: "rules_web_testing_go in ubuntu" platform: ubuntu2004 shell_commands: - - "sudo ./setup.sh" + - "./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -33,7 +33,7 @@ tasks: name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 shell_commands: - - "sudo ./setup.sh" + - "./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -62,7 +62,7 @@ tasks: name: "rules_web_testing_java in ubuntu" platform: ubuntu2004 shell_commands: - - "sudo ./setup.sh" + - "./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -91,7 +91,7 @@ tasks: name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 shell_commands: - - "sudo ./setup.sh" + - "./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" From 4c20b8a531d0d66f28912c06c2f1c53f952ce478 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 7 May 2025 22:16:13 +0000 Subject: [PATCH 097/107] Modify yml to include sh to include bin bash --- setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 9e1c67f9..f8a9c788 100644 --- a/setup.sh +++ b/setup.sh @@ -1,5 +1,6 @@ -set -ex +#!/bin/sh +set -ex sudo apt -y update && sudo apt -y install libasound2 sudo apt -y install libdbus-glib-1-2 sudo apt -y install libatk-bridge2.0-0 From 6799aae6b1f2828d6262ca578660f65898a8c11a Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 7 May 2025 23:50:45 +0000 Subject: [PATCH 098/107] Modify yml to include sh to include bin bash --- setup.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index f8a9c788..ec17453b 100644 --- a/setup.sh +++ b/setup.sh @@ -1,5 +1,19 @@ -#!/bin/sh +#!/bin/bash +# Copyright 2025 Google Inc. All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS-IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Script that can be used by CI server for testing j2cl builds. set -ex sudo apt -y update && sudo apt -y install libasound2 sudo apt -y install libdbus-glib-1-2 From 89662a295be7e772e4ab53d5da133ed5000bc511 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Wed, 7 May 2025 23:54:50 +0000 Subject: [PATCH 099/107] Modify yml to include sh to include bin bash --- setup.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.sh b/setup.sh index ec17453b..8e682f79 100644 --- a/setup.sh +++ b/setup.sh @@ -14,7 +14,6 @@ # limitations under the License. # Script that can be used by CI server for testing j2cl builds. -set -ex sudo apt -y update && sudo apt -y install libasound2 sudo apt -y install libdbus-glib-1-2 sudo apt -y install libatk-bridge2.0-0 From f0d474079af7723f84bd3c8dd29892961b6a5054 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 8 May 2025 00:01:09 +0000 Subject: [PATCH 100/107] Modify yml to include sh to include bin bash --- .bazelci/presubmit.yml | 2 +- setup.sh | 0 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 setup.sh diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 2affe6c2..b64b5bc4 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -4,7 +4,7 @@ tasks: name: "rules_web_testing_go in ubuntu" platform: ubuntu2004 shell_commands: - - "./setup.sh" + - "sh ./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" diff --git a/setup.sh b/setup.sh old mode 100644 new mode 100755 From aec295bbdcc08ce3e7acb456735b52ae38e5d158 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 8 May 2025 00:20:32 +0000 Subject: [PATCH 101/107] trigger buildkite again --- .bazelci/presubmit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index b64b5bc4..97b429fa 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -33,7 +33,7 @@ tasks: name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 shell_commands: - - "./setup.sh" + - "sh ./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -62,7 +62,7 @@ tasks: name: "rules_web_testing_java in ubuntu" platform: ubuntu2004 shell_commands: - - "./setup.sh" + - "sh ./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -91,7 +91,7 @@ tasks: name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 shell_commands: - - "./setup.sh" + - "sh ./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" From 9e3b057d595a915b720f290aeb77d2a0b2b6e0d0 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 8 May 2025 00:50:35 +0000 Subject: [PATCH 102/107] remove quotes --- .bazelci/presubmit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 97b429fa..eb377fb4 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -62,7 +62,7 @@ tasks: name: "rules_web_testing_java in ubuntu" platform: ubuntu2004 shell_commands: - - "sh ./setup.sh" + - sh ./setup.sh test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -91,7 +91,7 @@ tasks: name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 shell_commands: - - "sh ./setup.sh" + - sh ./setup.sh test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" From 80c22047cec6271f9f1e8848a1e3ba45a19258d3 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 8 May 2025 01:37:22 +0000 Subject: [PATCH 103/107] Testing --- .bazelci/presubmit.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index eb377fb4..659a8bbd 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -4,7 +4,7 @@ tasks: name: "rules_web_testing_go in ubuntu" platform: ubuntu2004 shell_commands: - - "sh ./setup.sh" + - "./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -33,7 +33,7 @@ tasks: name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 shell_commands: - - "sh ./setup.sh" + - "./setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -62,7 +62,7 @@ tasks: name: "rules_web_testing_java in ubuntu" platform: ubuntu2004 shell_commands: - - sh ./setup.sh + - ./setup.sh test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -91,7 +91,7 @@ tasks: name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 shell_commands: - - sh ./setup.sh + - ./setup.sh test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" From ff336f996367a630f8d1be32a6dfc844b737ccda Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 8 May 2025 01:52:13 +0000 Subject: [PATCH 104/107] test script --- setup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.sh b/setup.sh index 8e682f79..5b574b98 100755 --- a/setup.sh +++ b/setup.sh @@ -14,6 +14,11 @@ # limitations under the License. # Script that can be used by CI server for testing j2cl builds. +set -e + +echo "meow" +exit 0 + sudo apt -y update && sudo apt -y install libasound2 sudo apt -y install libdbus-glib-1-2 sudo apt -y install libatk-bridge2.0-0 From f7c61cd6a65536b2ec2c5b976dfaf887f0cc36e0 Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 8 May 2025 01:56:06 +0000 Subject: [PATCH 105/107] add sh setup --- .bazelci/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 659a8bbd..492837f2 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -4,7 +4,7 @@ tasks: name: "rules_web_testing_go in ubuntu" platform: ubuntu2004 shell_commands: - - "./setup.sh" + - "bash setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" From 9071f6792ff1a26532b7c6c7bf3b00df49a5c5fc Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 8 May 2025 02:02:54 +0000 Subject: [PATCH 106/107] change sh file path --- .bazelci/presubmit.yml | 8 ++++---- setup.sh | 6 +----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 492837f2..b7b6ce80 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -4,7 +4,7 @@ tasks: name: "rules_web_testing_go in ubuntu" platform: ubuntu2004 shell_commands: - - "bash setup.sh" + - "sh ../setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -33,7 +33,7 @@ tasks: name: "rules_web_testing_scala in ubuntu" platform: ubuntu2004 shell_commands: - - "./setup.sh" + - "sh ../setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -62,7 +62,7 @@ tasks: name: "rules_web_testing_java in ubuntu" platform: ubuntu2004 shell_commands: - - ./setup.sh + - "sh ../setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" @@ -91,7 +91,7 @@ tasks: name: "rules_web_testing_python in ubuntu" platform: ubuntu2004 shell_commands: - - ./setup.sh + - "sh ../setup.sh" test_flags: - "--test_tag_filters=-noci,-sauce" - "--test_timeout=60" diff --git a/setup.sh b/setup.sh index 5b574b98..ec17453b 100755 --- a/setup.sh +++ b/setup.sh @@ -14,11 +14,7 @@ # limitations under the License. # Script that can be used by CI server for testing j2cl builds. -set -e - -echo "meow" -exit 0 - +set -ex sudo apt -y update && sudo apt -y install libasound2 sudo apt -y install libdbus-glib-1-2 sudo apt -y install libatk-bridge2.0-0 From 521e55b3aa8f1fe4cf48e73f21329dbbbb5a546b Mon Sep 17 00:00:00 2001 From: Yuan Tian Date: Thu, 8 May 2025 03:59:22 +0000 Subject: [PATCH 107/107] Add flags to show more logs --- browsers/chromium-local.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/browsers/chromium-local.json b/browsers/chromium-local.json index 7d4e666f..f63148d4 100644 --- a/browsers/chromium-local.json +++ b/browsers/chromium-local.json @@ -7,13 +7,15 @@ "args" : [ "--headless", "--no-sandbox", - "--use-gl=swiftshader-webgl" + "--use-gl=swiftshader-webgl", + "--enable-logging=stderr", + "--v=1" ] }, "google:wslConfig": { "binary": "%FILE:CHROMEDRIVER%", "port":"%WSLPORT:WSL%", - "args": ["--port=%WSLPORT:WSL%"], + "args": ["--port=%WSLPORT:WSL%","--verbose"], "status": true, "shutdown": true }