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

chore(test): add integration test cases of CPK for API lazy loading #2769

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

5d
Copy link
Member

@5d 5d commented Feb 15, 2023

Issue #

Description

  • Add integration test cases for CPK(Composite Primary Key) LazyLoading cases of subscription API.

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@5d 5d requested a review from a team as a code owner February 15, 2023 02:29
@5d 5d force-pushed the 5d/ll12-subscription-integration-test-more branch from a0d2288 to 301268b Compare February 16, 2023 02:17
@5d 5d changed the base branch from main to 5d/ll12-subscription-integration-test February 16, 2023 02:17
@5d 5d force-pushed the 5d/ll12-subscription-integration-test-more branch from 301268b to de53bfc Compare February 16, 2023 18:47
Base automatically changed from 5d/ll12-subscription-integration-test to main February 17, 2023 22:11
@5d 5d force-pushed the 5d/ll12-subscription-integration-test-more branch from de53bfc to dd09f50 Compare February 17, 2023 22:42
@@ -17,82 +17,82 @@ final class GraphQLLazyLoadHasOneTests: GraphQLLazyLoadBaseTest {
func testConfigure() async throws {
await setup(withModels: HasOneParentChildModels())
}

Copy link
Member

Choose a reason for hiding this comment

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

this file can be reverted if only whitespace changes.

@@ -17,86 +17,86 @@ final class GraphQLLazyLoadDefaultPKTests: GraphQLLazyLoadBaseTest {
func testConfigure() async throws {
await setup(withModels: DefaultPKModels())
}

Copy link
Member

Choose a reason for hiding this comment

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

this file can be reverted if only whitespace changes.


try await mutate(.create(parent))
try await mutate(.create(child))
try await mutate(.update(child))
Copy link
Member

Choose a reason for hiding this comment

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

will this call the update mutation event even if there are no changes to child model?


try await mutate(.create(parent))
try await mutate(.create(child))
await waitForExpectations([onCreate], timeout: 10)
Copy link
Member

Choose a reason for hiding this comment

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

It'd be great if we can we use a constant for timeout value

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.

None yet

2 participants