Skip to content

Conversation

@618coffee
Copy link
Contributor

Description of changes:

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

@618coffee 618coffee added the auth Issues related to the Auth category label Dec 3, 2020
@618coffee 618coffee self-assigned this Dec 3, 2020
@codecov
Copy link

codecov bot commented Dec 3, 2020

Codecov Report

Merging #935 (8c64b69) into main (22e0ab2) will decrease coverage by 0.37%.
The diff coverage is 76.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #935      +/-   ##
==========================================
- Coverage   69.75%   69.37%   -0.38%     
==========================================
  Files         811      894      +83     
  Lines       34258    37165    +2907     
==========================================
+ Hits        23895    25785    +1890     
- Misses      10363    11380    +1017     
Flag Coverage Δ
API_plugin_unit_test 62.49% <ø> (?)
Analytics_plugin_unit_test 72.38% <ø> (ø)
Auth_plugin_unit_test 68.09% <76.00%> (+1.33%) ⬆️
DataStore_plugin_unit_test 83.66% <ø> (ø)
Predictions_plugin_unit_test 49.69% <ø> (ø)
Storage_plugin_unit_test 74.74% <ø> (ø)
build_test_amplify 63.07% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../AuthenticationProviderResendSignupCodeTests.swift 75.90% <75.90%> (ø)
...itoAuthPluginTests/Mocks/MockAWSMobileClient.swift 39.72% <100.00%> (+2.73%) ⬆️
...goryPluginTests/AWSAPICategoryPluginTestBase.swift 93.93% <0.00%> (ø)
...lugin/URLSessionBehavior/OperationTaskMapper.swift 45.23% <0.00%> (ø)
...ugin/SubscriptionFactory/AWSOIDCAuthProvider.swift 0.00% <0.00%> (ø)
...essionBehavior/URLSession+URLSessionBehavior.swift 75.00% <0.00%> (ø)
...Utils/GraphQLResponseDecoderDecodeErrorTests.swift 85.00% <0.00%> (ø)
...ugin/Support/Utils/RESTOperationRequestUtils.swift 44.11% <0.00%> (ø)
...questInterceptor/APIKeyURLRequestInterceptor.swift 47.61% <0.00%> (ø)
...ts/AWSAPICategoryPlugin+GraphQLBehaviorTests.swift 88.23% <0.00%> (ø)
... and 80 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 22e0ab2...482c03c. Read the comment docs.

Copy link
Contributor

@royjit royjit left a comment

Choose a reason for hiding this comment

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

LGTM - with minor comments

switch result {
case .success(let authCodeDeliveryDetails):
guard case .email = authCodeDeliveryDetails.destination else {
XCTFail("Result should be .done for next step")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
XCTFail("Result should be .done for next step")
XCTFail("Result should be . email for next step")

/// - When:
/// - I invoke resendSignUpCode with username
/// - Then:
/// - I should get a successful result with .email as the destination of AuthCodeDeliveryDetails
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// - I should get a successful result with .email as the destination of AuthCodeDeliveryDetails
/// - I should get a failure with validation error

XCTFail("Received failure with error \(error)")
}
}
wait(for: [resultExpectation], timeout: 2)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use the timeout value from the base class

@618coffee 618coffee merged commit 870a30a into main Dec 3, 2020
@618coffee 618coffee deleted the test/resendsignupcodetests branch December 3, 2020 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth Issues related to the Auth category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants