From 7a3fb39f26d1067765b051c0d17ddff9929781ad Mon Sep 17 00:00:00 2001 From: Dan Gowans Date: Thu, 26 Jan 2023 10:00:37 -0500 Subject: [PATCH] add tags for cypress cloud dashboard --- test/1_serverCypress.js | 4 ++-- test/1_serverCypress.ts | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/test/1_serverCypress.js b/test/1_serverCypress.js index fe779e7b..1e6a6aa4 100644 --- a/test/1_serverCypress.js +++ b/test/1_serverCypress.js @@ -4,8 +4,8 @@ import { exec } from 'node:child_process'; import * as http from 'node:http'; import { app } from '../app.js'; function runCypress(browser, done) { - let cypressCommand = 'cypress run --config-file cypress.config.js --browser ' + browser; - if (process.env.CYPRESS_RECORD_KEY && process.env.CYPRESS_RECORD_KEY !== '') { + let cypressCommand = `cypress run --config-file cypress.config.js --browser ${browser} --tag "${browser},${process.version}"`; + if ((process.env.CYPRESS_RECORD_KEY ?? '') !== '') { cypressCommand += ' --record'; } const childProcess = exec(cypressCommand); diff --git a/test/1_serverCypress.ts b/test/1_serverCypress.ts index 1fea5965..7200b329 100644 --- a/test/1_serverCypress.ts +++ b/test/1_serverCypress.ts @@ -9,11 +9,10 @@ import { exec } from 'node:child_process' import * as http from 'node:http' import { app } from '../app.js' -function runCypress(browser: 'chrome' | 'firefox', done: () => void) { - let cypressCommand = - 'cypress run --config-file cypress.config.js --browser ' + browser +function runCypress(browser: 'chrome' | 'firefox', done: () => void): void { + let cypressCommand = `cypress run --config-file cypress.config.js --browser ${browser} --tag "${browser},${process.version}"` - if (process.env.CYPRESS_RECORD_KEY && process.env.CYPRESS_RECORD_KEY !== '') { + if ((process.env.CYPRESS_RECORD_KEY ?? '') !== '') { cypressCommand += ' --record' }