Skip to content

Commit 1e76959

Browse files
authored
fix: restore @cypress/grep v6 spec filtering
Pass grep-related env vars into config.expose so @cypress/grep v6 can read them. CI/Docker still provide options via CYPRESS_*/--env, so this forwards grepTags, grepFilterSpecs and grepOmitFiltered (while preserving existing expose values) before initializing the plugin. Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
1 parent 39f5fdf commit 1e76959

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

e2e-tests/cypress.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ module.exports = defineConfig({
6767
config.env.grepFilterSpecs = config.env.grepFilterSpecs.toLowerCase() === 'true';
6868
}
6969

70+
// @cypress/grep v6 reads its options from `config.expose`, not `config.env`.
71+
// CI/Docker still pass them via CYPRESS_grepTags/--env, so forward them here.
72+
config.expose = {
73+
...config.expose,
74+
grepTags: config.env.grepTags,
75+
grepFilterSpecs: config.env.grepFilterSpecs,
76+
grepOmitFiltered: config.env.grepOmitFiltered,
77+
};
78+
7079
require('@cypress/grep/plugin').plugin(config);
7180
require('cypress-mochawesome-reporter/plugin')(on);
7281
on('task', verifyDownloadTasks);

0 commit comments

Comments
 (0)