add tags for cypress cloud dashboard

deepsource-autofix-76c6eb20
Dan Gowans 2023-01-26 10:00:37 -05:00
parent 707c3113b5
commit 7a3fb39f26
2 changed files with 5 additions and 6 deletions

View File

@ -4,8 +4,8 @@ import { exec } from 'node:child_process';
import * as http from 'node:http'; import * as http from 'node:http';
import { app } from '../app.js'; import { app } from '../app.js';
function runCypress(browser, done) { function runCypress(browser, done) {
let cypressCommand = 'cypress run --config-file cypress.config.js --browser ' + browser; 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'; cypressCommand += ' --record';
} }
const childProcess = exec(cypressCommand); const childProcess = exec(cypressCommand);

View File

@ -9,11 +9,10 @@ import { exec } from 'node:child_process'
import * as http from 'node:http' import * as http from 'node:http'
import { app } from '../app.js' import { app } from '../app.js'
function runCypress(browser: 'chrome' | 'firefox', done: () => void) { function runCypress(browser: 'chrome' | 'firefox', done: () => void): void {
let cypressCommand = let cypressCommand = `cypress run --config-file cypress.config.js --browser ${browser} --tag "${browser},${process.version}"`
'cypress run --config-file cypress.config.js --browser ' + browser
if (process.env.CYPRESS_RECORD_KEY && process.env.CYPRESS_RECORD_KEY !== '') { if ((process.env.CYPRESS_RECORD_KEY ?? '') !== '') {
cypressCommand += ' --record' cypressCommand += ' --record'
} }