Create a reusable cypress_test() macro

I want to write a couple of tests for some plotting web pages. I keep
asking other folks to validate that I didn't break anything. It's time
to automate this.

This patch creates a new macro that will make it easier for everyone
to write such tests. We're also converting the one existing Cypress
test to use the new macro.

Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I8ec82dc8ebdcc22a394f3b66fbc5c39e937adc6e
diff --git a/scouting/BUILD b/scouting/BUILD
index 1d6ac5d..a8072d3 100644
--- a/scouting/BUILD
+++ b/scouting/BUILD
@@ -1,5 +1,5 @@
-load("@aspect_rules_cypress//cypress:defs.bzl", "cypress_module_test")
 load("//tools/build_rules:apache.bzl", "apache_wrapper")
+load("//tools/build_rules:js.bzl", "cypress_test")
 
 sh_binary(
     name = "scouting",
@@ -16,21 +16,11 @@
     ],
 )
 
-cypress_module_test(
+cypress_test(
     name = "scouting_test",
-    args = [
-        "run",
-        "--config-file=cypress.config.js",
-        "--browser=../../chrome_linux/chrome",
-    ],
-    browsers = ["@chrome_linux//:all"],
-    copy_data_to_bin = False,
-    cypress = "//:node_modules/cypress",
     data = [
-        "cypress.config.js",
         "scouting_test.cy.js",
         "//scouting/testing:scouting_test_servers",
-        "@xvfb_amd64//:wrapped_bin/Xvfb",
     ],
     runner = "cypress_runner.js",
 )