@@ -41,8 +41,6 @@ def _cypress_plugin_impl(ctx):
4141 template = ctx .file ._plugin_template ,
4242 substitutions = {
4343 "TEMPLATED_@cypress/browserify-preprocessor" : "${cwd}/../cypress_deps/node_modules/@cypress/browserify-preprocessor/index" ,
44- "TEMPLATED_includeScreenshots" : "true" if ctx .attr .include_screenshots else "false" ,
45- "TEMPLATED_includeVideos" : "true" if ctx .attr .include_video else "false" ,
4644 "TEMPLATED_integrationFileShortPaths" : "[\n {files}\n ]" .format (files = ",\n " .join (integration_files_short_paths )),
4745 "TEMPLATED_pluginsFile" : plugins_file .short_path ,
4846 },
@@ -52,13 +50,6 @@ def _cypress_plugin_impl(ctx):
5250 files = depset ([ctx .outputs .plugin ]),
5351 )]
5452
55- # Avoid using non-normalized paths (workspace/../other_workspace/path)
56- def _to_manifest_path (ctx , file ):
57- if file .short_path .startswith ("../" ):
58- return file .short_path [3 :]
59- else :
60- return ctx .workspace_name + "/" + file .short_path
61-
6253_cypress_plugin = rule (
6354 implementation = _cypress_plugin_impl ,
6455 outputs = {"plugin" : "%{name}_cypress_plugin.js" },
@@ -67,8 +58,6 @@ _cypress_plugin = rule(
6758 allow_single_file = [".json" ],
6859 mandatory = True ,
6960 ),
70- "include_screenshots" : attr .bool (default = False ),
71- "include_video" : attr .bool (default = False ),
7261 "plugins_file" : attr .label (
7362 default = Label ("@build_bazel_rules_nodejs//packages/cypress:internal/plugins/base.js" ),
7463 allow_single_file = True ,
@@ -89,8 +78,6 @@ def cypress_web_test(
8978 name ,
9079 config_file ,
9180 srcs = [],
92- include_screenshots = False ,
93- include_video = False ,
9481 plugins_file = Label ("@build_bazel_rules_nodejs//packages/cypress:internal/plugins/base.js" ),
9582 cypress = Label ("TEMPLATED_node_modules_workspace_name//cypress:cypress" ),
9683 cypress_browserify_preprocessor = Label ("TEMPLATED_node_modules_workspace_name//@cypress/browserify-preprocessor" ),
@@ -106,8 +93,6 @@ def cypress_web_test(
10693 name = cypress_plugin ,
10794 srcs = srcs ,
10895 tags = tags ,
109- include_screenshots = include_screenshots ,
110- include_video = include_video ,
11196 plugins_file = plugins_file ,
11297 config_file = config_file ,
11398 testonly = True ,
@@ -123,14 +108,14 @@ def cypress_web_test(
123108 cypress_browserify_preprocessor ,
124109 cypress_cache ,
125110 cypress_executable ,
126- ": {cypress_plugin}" .format (cypress_plugin = cypress_plugin ),
127- ": {config_file}" .format (config_file = config_file ),
111+ "{cypress_plugin}" .format (cypress_plugin = cypress_plugin ),
112+ "{config_file}" .format (config_file = config_file ),
128113 ] + srcs ,
129114 entry_point = "@build_bazel_rules_nodejs//packages/cypress:internal/run-cypress.js" ,
130115 templated_args = [
131116 "--nobazel_patch_module_resolver" ,
132- "$(rootpath : {config_file})" .format (config_file = config_file ),
133- "$(rootpath : {cypress_plugin})" .format (cypress_plugin = cypress_plugin ),
117+ "$(rootpath {config_file})" .format (config_file = config_file ),
118+ "$(rootpath {cypress_plugin})" .format (cypress_plugin = cypress_plugin ),
134119 "$(rootpath {cypress_executable})" .format (cypress_executable = cypress_executable ),
135120 ] + templated_args ,
136121 ** kwargs
@@ -140,8 +125,6 @@ def cypress_web_test_global_cache(
140125 name ,
141126 config_file ,
142127 srcs = [],
143- include_screenshots = False ,
144- include_video = False ,
145128 plugins_file = Label ("@build_bazel_rules_nodejs//packages/cypress:plugins/base.js" ),
146129 cypress = Label ("TEMPLATED_node_modules_workspace_name//cypress:cypress" ),
147130 cypress_browserify_preprocessor = Label ("TEMPLATED_node_modules_workspace_name//@cypress/browserify-preprocessor" ),
@@ -155,8 +138,6 @@ def cypress_web_test_global_cache(
155138 name = cypress_plugin ,
156139 srcs = srcs ,
157140 tags = tags ,
158- include_screenshots = include_screenshots ,
159- include_video = include_video ,
160141 plugins_file = plugins_file ,
161142 config_file = config_file ,
162143 testonly = True ,
@@ -170,14 +151,14 @@ def cypress_web_test_global_cache(
170151 plugins_file ,
171152 cypress ,
172153 cypress_browserify_preprocessor ,
173- ": {cypress_plugin}" .format (cypress_plugin = cypress_plugin ),
174- ": {config_file}" .format (config_file = config_file ),
154+ "{cypress_plugin}" .format (cypress_plugin = cypress_plugin ),
155+ "{config_file}" .format (config_file = config_file ),
175156 ] + srcs ,
176157 entry_point = "@build_bazel_rules_nodejs//packages/cypress:internal/run-cypress.js" ,
177158 templated_args = [
178159 "--nobazel_patch_module_resolver" ,
179- "$(rootpath : {config_file})" .format (config_file = config_file ),
180- "$(rootpath : {cypress_plugin})" .format (cypress_plugin = cypress_plugin ),
160+ "$(rootpath {config_file})" .format (config_file = config_file ),
161+ "$(rootpath {cypress_plugin})" .format (cypress_plugin = cypress_plugin ),
181162 ] + templated_args ,
182163 ** kwargs
183164 )
0 commit comments