File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,8 @@ desc 'Runs tests in Debug config'
125
125
lane :test_ui do |options |
126
126
next unless is_check_required ( sources : sources_matrix [ :ui ] , force_check : @force_check )
127
127
128
- remove_snapshots unless options [ :record ] . to_s . empty?
128
+ record_mode = !options [ :record ] . to_s . empty?
129
+ remove_snapshots if record_mode
129
130
130
131
update_testplan_on_ci ( path : 'StreamChatSwiftUITests/Tests/StreamChatSwiftUI.xctestplan' )
131
132
@@ -143,10 +144,10 @@ lane :test_ui do |options|
143
144
skip_build : options [ :skip_build ] ,
144
145
number_of_retries : options [ :record ] . to_s . empty? ? 1 : nil ,
145
146
xcargs : buildcache_xcargs ,
146
- fail_build : options [ :record ] . to_s . empty?
147
+ fail_build : ! record_mode
147
148
)
148
149
149
- if options [ :record ] && is_ci
150
+ if record_mode && is_ci
150
151
png_files = git_status ( ext : '.png' ) . map { |_ , png | png } . flatten
151
152
next if png_files . empty?
152
153
You can’t perform that action at this time.
0 commit comments