-
Notifications
You must be signed in to change notification settings - Fork 216
test(data): Gen2 data customize data model doc example testing #3699
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
Conversation
on Swift codegen, this doesn't compile
hasOne |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3699 +/- ##
==========================================
+ Coverage 68.37% 70.06% +1.68%
==========================================
Files 1096 637 -459
Lines 38089 24773 -13316
==========================================
- Hits 26044 17356 -8688
+ Misses 12045 7417 -4628
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor comments
let createdPost = try await Amplify.API.mutate(request: .create(post)).get() | ||
print("\(createdPost)") | ||
|
||
XCTAssertEqual(createdPost.location?.lat, 48.837006) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a note: since we are comparing floating point, hopefully XCTAssertEqual uses
https://developer.apple.com/documentation/swift/double/isequal(to:)
in case this test becomes flaky
}), | ||
|
||
// Gen2_41 -Model multiple relationships between two models | ||
// http://localhost:3000/swift/build-a-backend/data/data-modeling/relationships/#model-multiple-relationships-between-two-models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: change the local url to docs url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, i'll merge this PR in first and update this line in the other one #3705 to avoid rebasing since that one and is merging into this branch and also has some minor changes to do
Issue #
Description
This PR uses the schemas from the Gen2 docs and runs integration tests against them to verify code snippet compiles and functions as expected at runtime. The code snippets are then moved over to the docs PR #3699
Found an issue with one-to-one, tracking in #3735
General Checklist
Given When Then
inline code documentation and are named accordinglytestThing_condition_expectation()
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.