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

add Modal tests #357

Merged
merged 7 commits into from
Jan 29, 2025
Merged

add Modal tests #357

merged 7 commits into from
Jan 29, 2025

Conversation

kawasemi081
Copy link
Contributor

@twostraws I added Modal tests.
AsModal.Size and Modal.Position have Sendable protocol issues(does not conform to the 'Sendable' protocol), I did't use arguments option for checkModalSizes() and checkModalPosition().
Is it OK?

I found the option sample contains misspelling [.backdrop(dismissable: false)]. Please check it.

@twostraws
Copy link
Owner

Thank you! I have added the conformances for you – does that help? Also, please make sure you run SwiftLint on your code before committing.

@twostraws
Copy link
Owner

Regarding the misspelling: Could you please open an issue for that? It would let us track it more easily. Thank you!

@kawasemi081
Copy link
Contributor Author

@twostraws Thank you for fixing! I will modify my test codes and run swiftLint.

@kawasemi081
Copy link
Contributor Author

@twostraws I fixed test cases. Please check it.

}

@Test("Modal Size Test",
arguments: [Modal.Size.small, Modal.Size.medium, Modal.Size.large, Modal.Size.xLarge, Modal.Size.fullscreen])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added CaseIterable conformance to Modal.Size for you. Could you update this to Modal.Size.allCases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JPToroDev Thank you for your help.

}
}

@Test("Modal Position Test", arguments: [Modal.Position.top, Modal.Position.center])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use allCases here too if you'd like, but this isn't as verbose as above.

Copy link
Contributor Author

@kawasemi081 kawasemi081 Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JPToroDev It doesn't seem to need allCases only for testing, yet I modified.

@JPToroDev
Copy link
Collaborator

Is this good to merge?

@kawasemi081
Copy link
Contributor Author

@JPToroDev Yes, please! Sorry for my replying late.

@twostraws
Copy link
Owner

Thank you – this is great work!

@twostraws twostraws merged commit f1dd376 into twostraws:main Jan 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants