@@ -180,19 +180,31 @@ final class OUDSCheckboxUITests: XCTestCase {
180
180
CheckboxIndeterminateTest . Layout. default ( labelText: " Takoyaki " , helperText: nil , icon: nil , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
181
181
CheckboxIndeterminateTest . Layout. default ( labelText: " Patatas " , helperText: " Bravas " , icon: nil , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
182
182
CheckboxIndeterminateTest . Layout. default ( labelText: " Patatas " , helperText: " Bravas " , icon: nil , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
183
- CheckboxIndeterminateTest . Layout. default ( labelText: " Kammthaar " , helperText: nil , icon: Image ( systemName: " heart.fill " ) , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
184
- CheckboxIndeterminateTest . Layout. default ( labelText: " Kammthaar " , helperText: nil , icon: Image ( systemName: " heart.fill " ) , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
185
- CheckboxIndeterminateTest . Layout. default ( labelText: " Patatas " , helperText: " Bravas " , icon: Image ( systemName: " heart.fill " ) , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
186
- CheckboxIndeterminateTest . Layout. default ( labelText: " Patatas " , helperText: " Bravas " , icon: Image ( systemName: " heart.fill " ) , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
183
+
184
+ CheckboxIndeterminateTest . Layout. default ( labelText: " Kammthaar " , helperText: nil , icon: Image ( systemName: " figure.handball " ) , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
185
+ CheckboxIndeterminateTest . Layout. default ( labelText: " Kammthaar " , helperText: nil , icon: Image ( systemName: " figure.handball " ) , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
186
+ CheckboxIndeterminateTest . Layout. default ( labelText: " Patatas " , helperText: " Bravas " , icon: Image ( systemName: " figure.handball " ) , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
187
+ CheckboxIndeterminateTest . Layout. default ( labelText: " Patatas " , helperText: " Bravas " , icon: Image ( systemName: " figure.handball " ) , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
188
+
189
+ CheckboxIndeterminateTest . Layout. default ( labelText: " Kammthaar " , helperText: nil , icon: Image ( systemName: " figure.handball " ) , flipIcon: true , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
190
+ CheckboxIndeterminateTest . Layout. default ( labelText: " Kammthaar " , helperText: nil , icon: Image ( systemName: " figure.handball " ) , flipIcon: true , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
191
+ CheckboxIndeterminateTest . Layout. default ( labelText: " Patatas " , helperText: " Bravas " , icon: Image ( systemName: " figure.handball " ) , flipIcon: true , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
192
+ CheckboxIndeterminateTest . Layout. default ( labelText: " Patatas " , helperText: " Bravas " , icon: Image ( systemName: " figure.handball " ) , flipIcon: true , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
187
193
188
194
CheckboxIndeterminateTest . Layout. reversed ( labelText: " Takoyaki " , helperText: nil , icon: nil , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
189
195
CheckboxIndeterminateTest . Layout. reversed ( labelText: " Takoyaki " , helperText: nil , icon: nil , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
190
196
CheckboxIndeterminateTest . Layout. reversed ( labelText: " Patatas " , helperText: " Bravas " , icon: nil , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
191
197
CheckboxIndeterminateTest . Layout. reversed ( labelText: " Patatas " , helperText: " Bravas " , icon: nil , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
192
- CheckboxIndeterminateTest . Layout. reversed ( labelText: " Kammthaar " , helperText: nil , icon: Image ( systemName: " heart.fill " ) , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
193
- CheckboxIndeterminateTest . Layout. reversed ( labelText: " Kammthaar " , helperText: nil , icon: Image ( systemName: " heart.fill " ) , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
194
- CheckboxIndeterminateTest . Layout. reversed ( labelText: " Patatas " , helperText: " Bravas " , icon: Image ( systemName: " heart.fill " ) , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
195
- CheckboxIndeterminateTest . Layout. reversed ( labelText: " Patatas " , helperText: " Bravas " , icon: Image ( systemName: " heart.fill " ) , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
198
+
199
+ CheckboxIndeterminateTest . Layout. reversed ( labelText: " Kammthaar " , helperText: nil , icon: Image ( systemName: " figure.handball " ) , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
200
+ CheckboxIndeterminateTest . Layout. reversed ( labelText: " Kammthaar " , helperText: nil , icon: Image ( systemName: " figure.handball " ) , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
201
+ CheckboxIndeterminateTest . Layout. reversed ( labelText: " Patatas " , helperText: " Bravas " , icon: Image ( systemName: " figure.handball " ) , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
202
+ CheckboxIndeterminateTest . Layout. reversed ( labelText: " Patatas " , helperText: " Bravas " , icon: Image ( systemName: " figure.handball " ) , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
203
+
204
+ CheckboxIndeterminateTest . Layout. reversed ( labelText: " Kammthaar " , helperText: nil , icon: Image ( systemName: " figure.handball " ) , flipIcon: true , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
205
+ CheckboxIndeterminateTest . Layout. reversed ( labelText: " Kammthaar " , helperText: nil , icon: Image ( systemName: " figure.handball " ) , flipIcon: true , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
206
+ CheckboxIndeterminateTest . Layout. reversed ( labelText: " Patatas " , helperText: " Bravas " , icon: Image ( systemName: " figure.handball " ) , flipIcon: true , isError: isError, hasDivider: false , isReadOnly: isReadOnly) ,
207
+ CheckboxIndeterminateTest . Layout. reversed ( labelText: " Patatas " , helperText: " Bravas " , icon: Image ( systemName: " figure.handball " ) , flipIcon: true , isError: isError, hasDivider: true , isReadOnly: isReadOnly) ,
196
208
]
197
209
}
198
210
// swiftlint:enable line_length
@@ -210,12 +222,14 @@ private struct CheckboxIndeterminateTest: View {
210
222
case `default`( labelText: String ,
211
223
helperText: String ? ,
212
224
icon: Image ? ,
225
+ flipIcon: Bool = false ,
213
226
isError: Bool ,
214
227
hasDivider: Bool ,
215
228
isReadOnly: Bool )
216
229
case reversed( labelText: String ,
217
230
helperText: String ? ,
218
231
icon: Image ? ,
232
+ flipIcon: Bool = false ,
219
233
isError: Bool ,
220
234
hasDivider: Bool ,
221
235
isReadOnly: Bool )
@@ -225,10 +239,10 @@ private struct CheckboxIndeterminateTest: View {
225
239
switch self {
226
240
case let . indicatorOnly( isError) :
227
241
" layout-indicatorOnly- \( isError ? " error " : " " ) "
228
- case let . default( _, helperText, icon, isError, hasDivider, isReadOnly) :
229
- " layout-default-label- \( helperText != nil ? " withHelper " : " " ) - \( icon != nil ? " withIcon " : " " ) - \( isError ? " error " : " " ) - \( isReadOnly ? " readOnly " : " " ) - \( hasDivider ? " divider " : " " ) "
230
- case let . reversed( _, helperText, icon, isError, hasDivider, isReadOnly) :
231
- " layout-inverse-label- \( helperText != nil ? " withHelper " : " " ) - \( icon != nil ? " withIcon " : " " ) - \( isError ? " error " : " " ) - \( isReadOnly ? " readOnly " : " " ) - \( hasDivider ? " divider " : " " ) "
242
+ case let . default( _, helperText, icon, flipIcon , isError, hasDivider, isReadOnly) :
243
+ " layout-default-label- \( helperText != nil ? " withHelper " : " " ) - \( icon != nil ? " withIcon " : " " ) - \( flipIcon ? " flipIcon " : " " ) - \( isError ? " error " : " " ) - \( isReadOnly ? " readOnly " : " " ) - \( hasDivider ? " divider " : " " ) "
244
+ case let . reversed( _, helperText, icon, flipIcon , isError, hasDivider, isReadOnly) :
245
+ " layout-inverse-label- \( helperText != nil ? " withHelper " : " " ) - \( icon != nil ? " withIcon " : " " ) - \( flipIcon ? " flipIcon " : " " ) - \( isError ? " error " : " " ) - \( isReadOnly ? " readOnly " : " " ) - \( hasDivider ? " divider " : " " ) "
232
246
}
233
247
}
234
248
// swiftlint:enable line_length
@@ -250,21 +264,23 @@ private struct CheckboxIndeterminateTest: View {
250
264
accessibilityLabel: " Bazinga! " ,
251
265
isError: isError)
252
266
. disabled ( isDisabled)
253
- case let . default( labelText, helperText, icon, isError, hasDivider, isReadOnly) :
267
+ case let . default( labelText, helperText, icon, flipIcon , isError, hasDivider, isReadOnly) :
254
268
OUDSCheckboxItemIndeterminate ( selection: . constant( indicatorState) ,
255
269
label: labelText,
256
270
helper: helperText,
257
271
icon: icon,
272
+ flipIcon: flipIcon,
258
273
isReversed: false ,
259
274
isError: isError,
260
275
isReadOnly: isReadOnly,
261
276
hasDivider: hasDivider)
262
277
. disabled ( isDisabled)
263
- case let . reversed( labelText, helperText, icon, isError, hasDivider, isReadOnly) :
278
+ case let . reversed( labelText, helperText, icon, flipIcon , isError, hasDivider, isReadOnly) :
264
279
OUDSCheckboxItemIndeterminate ( selection: . constant( indicatorState) ,
265
280
label: labelText,
266
281
helper: helperText,
267
282
icon: icon,
283
+ flipIcon: flipIcon,
268
284
isReversed: true ,
269
285
isError: isError,
270
286
isReadOnly: isReadOnly,
0 commit comments