Skip to content

SITES-28169: Resolves the unit test issue with higher graphql client … #1024

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

Merged
merged 8 commits into from
Jan 20, 2025

Conversation

alwinjoseph02
Copy link
Collaborator

…version

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.04%. Comparing base (0df8c8e) to head (5a066b1).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1024      +/-   ##
============================================
- Coverage     89.14%   88.04%   -1.10%     
  Complexity     2247     2247              
============================================
  Files           355      329      -26     
  Lines         10097     8617    -1480     
  Branches       1461     1461              
============================================
- Hits           9001     7587    -1414     
+ Misses          790      724      -66     
  Partials        306      306              
Flag Coverage Δ
integration 51.59% <ø> (ø)
jest 86.68% <ø> (ø)
karma ?
unittests 87.44% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alwinjoseph02 alwinjoseph02 force-pushed the bugfix/SITES-28169-unit-test-graphql-client branch from 2a9f079 to 0c57924 Compare January 15, 2025 07:20
@LSantha
Copy link
Collaborator

LSantha commented Jan 16, 2025

@alwinjoseph02 , good job on fixing this! It just occurred to me on seeing the many places we needed changes for this simple fix on the graphql. client config, I wonder if we could reduce a bit the boilerplate on these tests? Utility methods or a base test class may be places to pull out code duplicates and other boilerplate. WDYT? We could have quick call on this.

@alwinjoseph02
Copy link
Collaborator Author

alwinjoseph02 commented Jan 17, 2025

@LSantha That would be a good idea . Lets discuss on it whenever you are free.

* @param context The AEM context.
* @param graphqlClient The GraphqlClient service.
*/
public static void activateGraphqlClient(AemContext context, GraphqlClient graphqlClient, Map<String, Object> additionalConfig) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

registerGraphqlClient() would be a better name here.

@alwinjoseph02 alwinjoseph02 marked this pull request as ready for review January 20, 2025 11:20
@alwinjoseph02 alwinjoseph02 merged commit 6127503 into master Jan 20, 2025
19 checks passed
@alwinjoseph02 alwinjoseph02 deleted the bugfix/SITES-28169-unit-test-graphql-client branch January 20, 2025 11:22
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