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

[Building Sync-ups Tutorial] fixes in "Testing the sync-up detail" chapter #3579

Conversation

FredericRuaudel
Copy link
Contributor

Hi!

Following my last PR, I'm currently reviewing the "Building Sync-ups" tutorial and so far, there is a lot of changes so I've splitted up into one PR per chapter to ease the review of them, continuing with the "Testing the sync-up detail" chapter here…

Changes Made:

  • Clarified Tutorial Introduction: The introduction of the SyncUpDetail tutorial has been updated to take into account the change from delegate pattern to Shared pattern.
  • Refactored Test Code: The tutorial's test code has been modified to utilize the modify function for nested state updates, fixing errors explained in Getter for 'subscript(dynamicMember:)' is unavailable Xcode16 #3158. Additionally, the withLock function has been implemented to fix the associated compilation errors.
  • Restored Delete Flow Testing: The tutorial has been updated to include testing for the delete flow using the @Shared property, that was left for a future update I guess. Here again, I've tried my best to fit your tones and vocabulary in the explanation but feel free to update the copyrighting as you see fit 🙂

Modify tutorial introduction to accurately describe how the SyncUpDetail feature updates parent state using a shared property
Refactor test code to:
- Use `modify` for nested state updates
- Apply `withLock` for thread-safe state mutation when editing a sync-up
Since it is already tested in the navigation section, I finally remove it and update the tutorial text to inform of that with a link to it.
Let's start by testing the edit flow. We will exercise the full user flow of tapping the
Let's write a test for the edit flow. We will exercise the full user flow of tapping the
Copy link
Contributor Author

Choose a reason for hiding this comment

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

📓 I've slightly changed this intro which were implying this is the first section of several which is not the case anymore.

Comment on lines 71 to 73

As for the delete flow, since it involves its parent feature and some navigation with the dismiss
helper, we'll test it later in the <doc:TestingNavigation>.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

📓 I've mention and link to the delete flow testing being now in the navigation testing chapter

Copy link
Member

@stephencelis stephencelis left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

…ildingSyncUps/06-SyncUpDetail/TestingSyncUpDetail.tutorial
@stephencelis stephencelis merged commit 2e3e496 into pointfreeco:main Feb 17, 2025
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.

2 participants