StanfordSpezi / SpeziOnboarding

Spezi Onboarding module to inform a user or retrieve consent for a study participation
https://swiftpackageindex.com/StanfordSpezi/SpeziOnboarding/documentation/
MIT License
11 stars 5 forks source link

UI Test for consent form export #36

Closed philippzagar closed 5 months ago

philippzagar commented 5 months ago

UI Test for consent form export

:recycle: Current situation & Problem

Currently, the consent form export is only tested by storing the PDF via the Standard to the app caches directory. The test only validates that the file actually exists, but doesn't check the content. Also, the functionality of the share sheet is not tested. Also, the package is only building and testing for Debug mode right now.

:gear: Release Notes

:books: Documentation

Proper documentation of the test behavior

:white_check_mark: Testing

This PR only contains a UI test ;)

:pencil: Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

philippzagar commented 5 months ago

@PSchmiedmayer Please adjust the merge checks to reflect the debug / release mode testing

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (3ee7135) 74.63% compared to head (79f17e6) 77.73%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/StanfordSpezi/SpeziOnboarding/pull/36/graphs/tree.svg?width=650&height=150&src=pr&token=tVwIFVPdJG&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi)](https://app.codecov.io/gh/StanfordSpezi/SpeziOnboarding/pull/36?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ```diff @@ Coverage Diff @@ ## main #36 +/- ## ========================================== + Coverage 74.63% 77.73% +3.10% ========================================== Files 21 21 Lines 1001 1001 ========================================== + Hits 747 778 +31 + Misses 254 223 -31 ``` [see 2 files with indirect coverage changes](https://app.codecov.io/gh/StanfordSpezi/SpeziOnboarding/pull/36/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/StanfordSpezi/SpeziOnboarding/pull/36?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/StanfordSpezi/SpeziOnboarding/pull/36?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Last update [3ee7135...79f17e6](https://app.codecov.io/gh/StanfordSpezi/SpeziOnboarding/pull/36?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi).
philippzagar commented 5 months ago

Thank you for improving the tests! Is there a specific reason why this was not put right in #35 as this seems to test the functionality there?

@PSchmiedmayer No, not really, just came to my mind after I finished the implementation of https://github.com/StanfordSpezi/SpeziOnboarding/pull/35. Sadly, I cannot really test the ink color of the signature (or at least it's quite hard), so the two things are not directly related (but obviously indirectly related!)

philippzagar commented 5 months ago

@PSchmiedmayer Please make sure to adjust the merge checks for the Debug / Release builds :) Or do I need to retrigger all actions?

PSchmiedmayer commented 5 months ago

Ok, let's try to keep these things combined PRs if related in the future, looks good for now. I will adjust the build checks 👍