Skip to content

Commit de25134

Browse files
committed
fix: use default context for both tags if not specified
1 parent 55f6412 commit de25134

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ By default this plugin tests static site _after build_. But maybe you want to ru
150150
wait-on-timeout = '30' # seconds
151151
```
152152

153-
Parameters you can place into `preBuild` inputs: `start`, `wait-on`, `wait-on-timeout`, `spec`, `record`, `group`, and `tag`.
153+
Parameters you can place into `preBuild` inputs: `start`, `wait-on`, `wait-on-timeout`, `spec`, `record`, `group`, and `tag`. If there is `preBuild` and `postBuild` testing with different tags, the first one wins :)
154154

155155
## Debugging
156156

src/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ module.exports = function cypressPlugin (pluginConfig) {
177177
let tag
178178
if (record) {
179179
group = preBuildInputs.group || 'preBuild'
180+
180181
if (preBuildInputs.tag) {
181182
tag = preBuildInputs.tag
182183
} else {
@@ -213,8 +214,11 @@ module.exports = function cypressPlugin (pluginConfig) {
213214
let tag
214215
if (record) {
215216
group = pluginConfig.group || 'postBuild'
217+
216218
if (pluginConfig.tag) {
217219
tag = pluginConfig.tag
220+
} else {
221+
tag = process.env.CONTEXT
218222
}
219223
}
220224

0 commit comments

Comments
 (0)