Skip to content

Commit

Permalink
Adjust cypress config
Browse files Browse the repository at this point in the history
  • Loading branch information
tianfeng92 committed Jun 21, 2022
1 parent c81a57c commit c0bc27e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
5 changes: 2 additions & 3 deletions src/cypress-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const report = async (results = {}, statusCode, browserName, runCfg, suiteName,
};

// Configure reporters
const configureReporters = function (cypressCfg, runCfg, opts) {
const configureReporters = function (runCfg, opts) {
// Enable cypress-multi-reporters plugin
opts.config.reporter = path.join(__dirname, '../node_modules/cypress-multi-reporters/lib/MultiReporters.js');
opts.config.reporterOptions = {
Expand Down Expand Up @@ -153,8 +153,7 @@ const getCypressOpts = function (runCfg, suiteName) {
opts.config.videoUploadOnPasses = true;
}

const cypressCfg = require(cypressCfgFile);
opts = configureReporters(cypressCfg, runCfg, opts);
opts = configureReporters(runCfg, opts);

_.defaultsDeep(opts.config, suite.config);
return opts;
Expand Down
7 changes: 0 additions & 7 deletions tests/config-tests/cypress.config.js

This file was deleted.

8 changes: 8 additions & 0 deletions tests/config-tests/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from 'cypress'

export default defineConfig({
e2e: {
supportFile: false,
// e2e options here
}
})
2 changes: 1 addition & 1 deletion tests/config-tests/sauce-runner.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"cypress": {
"configFile": "cypress.config.js"
"configFile": "cypress.config.ts"
},
"rootDir": "./",
"suites": [
Expand Down

0 comments on commit c0bc27e

Please sign in to comment.