File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
lib/generators/cypress_on_rails Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 3
3
### Changed
4
4
* Removed the update generator and reduced options for install generator [ PR 149] ( https://github.com/shakacode/cypress-on-rails/pull/149 )
5
5
6
+ ### Fixed
7
+ * fix update index.js in install generatpr [ PR 147] ( https://github.com/shakacode/cypress-on-rails/pull/147 ) by [ Judahmeek]
8
+
6
9
## [ 1.16.0]
7
10
[ Compare ] : https://github.com/shakacode/cypress-on-rails/compare/v1.15.1...v1.16.0
8
11
Original file line number Diff line number Diff line change @@ -55,12 +55,16 @@ def add_initial_files
55
55
end
56
56
57
57
def update_files
58
- append_to_file "#{ options . cypress_folder } /support/index.js" ,
59
- "\n import './on-rails'" ,
60
- after : 'import \'./commands\''
61
- append_to_file "#{ options . playwright_folder } /support/index.js" ,
62
- "\n import './on-rails'" ,
63
- after : '// Import commands.js using ES2015 syntax:'
58
+ if options . framework == 'cypress'
59
+ append_to_file "#{ options . install_folder } /cypress/support/index.js" ,
60
+ "\n import './on-rails'" ,
61
+ after : 'import \'./commands\''
62
+ end
63
+ if options . framework == 'playwright'
64
+ append_to_file "#{ options . install_folder } /playwright/support/index.js" ,
65
+ "\n import './on-rails'" ,
66
+ after : '// Import commands.js using ES2015 syntax:'
67
+ end
64
68
end
65
69
end
66
70
end
You can’t perform that action at this time.
0 commit comments