Description:
After updating the deployment target from iOS 15 to iOS 16, specific tests involving the .tint() modifier have failed. Upon investigation, it was found that tests using a color literal (e.g., .green) succeed, but when the color is passed as a variable (e.g., Color.green), the test crashes with the error: "Toggle does not have 'tint' modifier."
Steps to Reproduce:
Set the deployment target to iOS 16.
Write a test using the .tint() modifier with a color literal (e.g., .green).
Observe successful test execution.
let sut = Group { Toggle("Title", isOn: .constant(true)).tint(.green) }
let toggleTint = try sut.inspect().group().toggle(0).tint()
Write a similar test using a color variable (e.g., Color.green).
Observe test failure with the error message: "Toggle does not have 'tint' modifier."
let cl = Color.green
let sut2 = Group { Toggle("Title", isOn: .constant(true)).tint(cl) }
let toggleTint2 = try sut2.inspect().group().toggle(0).tint()
Expected Result:
Tests using the .tint() modifier should pass consistently, regardless of whether the color is directly specified or passed through a variable.
Actual Result:
Tests fail with the error message "Toggle does not have 'tint' modifier" when the color is passed through a variable.
Description: After updating the deployment target from iOS 15 to iOS 16, specific tests involving the does not have 'tint' modifier."
.tint()
modifier have failed. Upon investigation, it was found that tests using a color literal (e.g.,.green
) succeed, but when the color is passed as a variable (e.g.,Color.green
), the test crashes with the error: "ToggleSteps to Reproduce:
.tint()
modifier with a color literal (e.g.,.green
).Color.green
).Expected Result: Tests using the
.tint()
modifier should pass consistently, regardless of whether the color is directly specified or passed through a variable.Actual Result: Tests fail with the error message "Toggle does not have 'tint' modifier" when the color is passed through a variable.