File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 11// ***********************************************************
2- // This example support/e2e.ts is processed and
2+ // This example support/e2e.js is processed and
33// loaded automatically before your test files.
44//
55// This is a great place to put global configuration and
Original file line number Diff line number Diff line change 11module CypressRails
22 class Init
3- DEFAULT_CONFIG = <<~CYPRESS_CONFIG
3+ DEFAULT_CONFIG = <<~JS
44 const { defineConfig } = require('cypress')
55
66 module.exports = defineConfig({
@@ -17,16 +17,16 @@ class Init
1717 videosFolder: "tmp/cypress_videos",
1818 trashAssetsBeforeRuns: false
1919 })
20- CYPRESS_CONFIG
20+ JS
2121
2222 def call ( dir = Dir . pwd )
2323 config_path = File . join ( dir , "cypress.config.js" )
24- if File . exist? ( config_path )
25- warn ( 'Cypress config is already exist!' )
26- return
24+ if !File . exist? ( config_path )
25+ File . write ( config_path , DEFAULT_CONFIG )
26+ puts "Cypress config initialized in `#{ config_path } '"
27+ else
28+ warn "Cypress config already exists in `#{ config_path } '. Skipping."
2729 end
28- File . write ( config_path , DEFAULT_CONFIG )
29- puts "Cypress config initialized in #{ config_path } "
3030 end
3131 end
3232end
You can’t perform that action at this time.
0 commit comments