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'
125125lane :test_ui do |options |
126126 next unless is_check_required ( sources : sources_matrix [ :ui ] , force_check : @force_check )
127127
128- remove_snapshots unless options [ :record ] . to_s . empty?
128+ record_mode = !options [ :record ] . to_s . empty?
129+ remove_snapshots if record_mode
129130
130131 update_testplan_on_ci ( path : 'StreamChatSwiftUITests/Tests/StreamChatSwiftUI.xctestplan' )
131132
@@ -143,10 +144,10 @@ lane :test_ui do |options|
143144 skip_build : options [ :skip_build ] ,
144145 number_of_retries : options [ :record ] . to_s . empty? ? 1 : nil ,
145146 xcargs : buildcache_xcargs ,
146- fail_build : options [ :record ] . to_s . empty?
147+ fail_build : ! record_mode
147148 )
148149
149- if options [ :record ] && is_ci
150+ if record_mode && is_ci
150151 png_files = git_status ( ext : '.png' ) . map { |_ , png | png } . flatten
151152 next if png_files . empty?
152153
You can’t perform that action at this time.
0 commit comments