Added tests for the Templates flow - #97
Merged
Merged
Conversation
TemplatesContext is covered for registering and cleaning up the Dynamo callback, updating context from received template data, and normalizing template fields (date to DateModified, default Author/Description). PageRecent is covered for rendering templates from context, switching the Templates section to list view, and opening a template row through the shared openFile flow
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds missing unit test coverage for the Templates flow introduced in DYN-9702, validating that template data provided by the Dynamo host is exposed via TemplatesContext and correctly rendered/operated on in the Recent page Templates section.
Changes:
- Expanded
TemplatesContexttests to cover callback registration, data updates, normalization (date/Author/Description), and cleanup on unmount. - Extended
PageRecenttests to validate templates rendering from context, switching the Templates section to list view, and opening a template viaopenFile.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/unit/TemplatesContext.test.tsx | Adds unit tests for Templates callback lifecycle and normalization behavior. |
| tests/unit/Recent/PageRecent.test.tsx | Adds unit tests ensuring Templates are rendered, can switch to list view, and open on click. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jasonstratton
approved these changes
Jul 1, 2026
jasonstratton
left a comment
Contributor
There was a problem hiding this comment.
LGTM - Approved and I will merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR addresses DYN-9702.
After DYN-9702 was merged, additional tests were still needed for the Templates functionality added to PageRecent.tsx and for the new TemplatesContext.tsx file. This PR adds that missing tests coverage.
This update adds focused test coverage for the template support introduced in DYN-9702. The tests cover how template data is received from Dynamo, exposed through TemplatesContext, normalized for use by the existing grid/table components, and displayed/opened from PageRecent.
changes :
Added additional TemplatesContext unit tests for:
Extended PageRecent unit tests for:
Declarations
Check these if you believe they are true
Release Notes
Added unit test coverage for the Dynamo Home Templates flow introduced in DYN-9702.
Reviewers
@zeusongit
@DynamoDS/eidos
FYIs
@dnenov
@johnpierson
@jnealb
@jasonstratton