Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with .tint() modifier in Tests after updating Deployment Target to iOS 16 #287

Closed
anestisKons opened this issue Jan 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@anestisKons
Copy link

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:

  1. Set the deployment target to iOS 16.
  2. Write a test using the .tint() modifier with a color literal (e.g., .green).
  3. Observe successful test execution.
let sut = Group { Toggle("Title", isOn: .constant(true)).tint(.green) }
let toggleTint = try sut.inspect().group().toggle(0).tint()
  1. Write a similar test using a color variable (e.g., Color.green).
  2. 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.

@nalexn nalexn added the bug Something isn't working label Jan 20, 2024
nalexn pushed a commit that referenced this issue Jan 21, 2024
@nalexn nalexn added pending release A fixed issue that'll be released in an upcoming update and removed pending release A fixed issue that'll be released in an upcoming update labels Jan 21, 2024
@nalexn nalexn closed this as completed Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants