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

feat: introduce queryEnterpriseCustomerContainsContent #1014

Merged
merged 7 commits into from
Mar 26, 2024

Conversation

adamstankiewicz
Copy link
Member

@adamstankiewicz adamstankiewicz commented Mar 26, 2024

https://2u-internal.atlassian.net/browse/ENT-8688

Splits out queryEnterpriseCustomerContainsContent related things (the API call to contains_content_items in enterprise-catalog) as a standalone PR so that it may be used on both course and program related page routes.

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)
  • Ensure English strings are marked for translation. See documentation for more details.

Only if submitting a visual change

  • Ensure to attach screenshots
  • Ensure to have UX team confirm screenshots

@adamstankiewicz adamstankiewicz marked this pull request as ready for review March 26, 2024 19:09
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 81.27%. Comparing base (cda8c4e) to head (1d4c7a7).

Files Patch % Lines
...data/hooks/useEnterpriseCustomerContainsContent.js 0.00% 3 Missing ⚠️
src/components/app/routes/CourseRoute.jsx 0.00% 2 Missing ⚠️
src/components/app/data/queries/queryKeyFactory.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                         @@
##           feat/react-query-route-loaders    #1014      +/-   ##
==================================================================
- Coverage                           81.28%   81.27%   -0.02%     
==================================================================
  Files                                 382      384       +2     
  Lines                                7941     7968      +27     
  Branches                             1943     1948       +5     
==================================================================
+ Hits                                 6455     6476      +21     
- Misses                               1427     1433       +6     
  Partials                               59       59              

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

useUserEntitlements,
} from '../data';
import NotFoundPage from '../../NotFoundPage';

const CourseRoute = () => {
const { courseKey } = useParams();
Copy link
Member Author

Choose a reason for hiding this comment

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

[inform] This file will soon be removed in Course migration. Coverage not important.

*/
export default function useEnterpriseCustomerContainsContent(contentIdentifers, queryOptions = {}) {
const { data: enterpriseCustomer } = useEnterpriseCustomer();
return useQuery({
Copy link
Member Author

Choose a reason for hiding this comment

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

Coverage will be added when we tackle more currently uncovered hooks like this in bulk. Prioritizing functionality first.

@adamstankiewicz adamstankiewicz merged commit 2f46eb4 into feat/react-query-route-loaders Mar 26, 2024
5 of 7 checks passed
@adamstankiewicz adamstankiewicz deleted the ags/ent-8688-take2 branch March 26, 2024 21:01
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