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: update learner credit plan cards to use subsidies #419

Merged
merged 4 commits into from
Sep 25, 2024

Conversation

katrinan029
Copy link
Contributor

@katrinan029 katrinan029 commented Sep 13, 2024

Description

  1. Updates Learner Credit Plan cards to link to subsidies instead of policies.
  2. Updates license manager django url

Test plan

  1. checkout branch knguyen2/ent-9476
  2. at the root directory, add file webpack.dev.config.js with the following content:
const { createConfig } = require('@openedx/frontend-build');

module.exports = createConfig('webpack-dev', {
  devServer: {
    allowedHosts: 'all',
    https: true,
  },
});
  1. replace the content in .env.development with this info:
NODE_ENV='development'
PORT=18450
FEATURE_CUSTOMER_SUPPORT_VIEW='true'
ADMIN_PORTAL_BASE_URL='https://portal.stage.edx.org'
ACCESS_TOKEN_COOKIE_NAME='stage-edx-jwt-cookie-header-payload'
BASE_URL='https://localhost.stage.edx.org:18450'
FEATURE_CONFIGURATION_MANAGEMENT='true'
FEATURE_CONFIGURATION_ENTERPRISE_PROVISION='true'
FEATURE_CONFIGURATION_EDIT_ENTERPRISE_PROVISION='true'
CREDENTIALS_BASE_URL='https://credentials.stage.edx.org'
CSRF_TOKEN_API_PATH='/csrf/api/v1/token'
ECOMMERCE_BASE_URL='https://ecommerce.stage.edx.org'
ENTERPRISE_ACCESS_BASE_URL='https://enterprise-access.stage.edx.org'
LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference'
LMS_BASE_URL='https://courses.stage.edx.org'
LICENSE_MANAGER_URL='https://license-manager.stage.edx.org'
LICENSE_MANAGER_DJANGO_URL='https://license-manager-internal.stage.edx.org'
SUPPORT_CONFLUENCE='https://support-tools.edx.org'
SUPPORT_CUSTOMER_REQUEST='https://support-tools.edx.org'
DISCOVERY_API_BASE_URL='https://discovery.stage.edx.org'
LOGIN_URL='https://courses.stage.edx.org/login'
LOGOUT_URL='https://courses.stage.edx.org/logout'
LOGO_URL=https://edx-cdn.org/v3/default/logo.svg
LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/default/logo-trademark.svg
LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg/
FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico
MARKETING_SITE_BASE_URL='https://stage.edx.org'
ORDER_HISTORY_URL='https://orders.stage.edx.org/orders'
REFRESH_ACCESS_TOKEN_ENDPOINT='https://courses.stage.edx.org/login_refresh'
SEGMENT_KEY=null
SITE_NAME='edX'
SUBSIDY_BASE_URL='https://enterprise-subsidy.stage.edx.org'
SUBSIDY_BASE_DJANGO_URL='https://enterprise-subsidy-internal.stage.edx.org'
USER_INFO_COOKIE_NAME='edx-user-info'
PUBLISHER_BASE_URL='https://publisher.stage.edx.org/'
APP_ID='support-tools'
MFE_CONFIG_API_URL='https://courses.stage.edx.org/api/mfe_config/v1'
  1. run npm run start
  2. go to link https://localhost.stage.edx.org:18450/enterprise-configuration/customers/66b5922b-a22b-4a7b-b587-d4af0378bd6f/view and verify that the Learner Credit Plan card is a subsidy. Click on the "Open in Django" button on the card and verify that you are linked to the subsidy page for that subsidy by cross referencing the uuid of the network request url with the uuid of the django page. Check that clicking on the "View budgets" button will link you to the Learner Credit Management screen in the admin portal.
  3. go to link https://localhost.stage.edx.org:18450/enterprise-configuration/customers/02982884-1f1f-4103-b6d7-3a602c1afcbd/view and verify that clicking on the "Open in Django" button on the card will link you to the django admin page for that subscription. You can do so by cross referecing the uuid of the network request url with the uuid of the django page.

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

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

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

Project coverage is 84.38%. Comparing base (046a4b1) to head (21bf852).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
...n/Customers/data/hooks/useActiveAssociatedPlans.js 0.00% 1 Missing and 1 partial ⚠️
...tion/Customers/data/hooks/useAllAssociatedPlans.js 50.00% 2 Missing ⚠️
src/index.jsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #419      +/-   ##
==========================================
- Coverage   84.40%   84.38%   -0.02%     
==========================================
  Files         185      185              
  Lines        3840     3848       +8     
  Branches      943      937       -6     
==========================================
+ Hits         3241     3247       +6     
- Misses        576      578       +2     
  Partials       23       23              

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

@katrinan029 katrinan029 marked this pull request as ready for review September 16, 2024 15:02
Comment on lines 17 to +18
LICENSE_MANAGER_URL='http://localhost:18170'
LICENSE_MANAGER_DJANGO_URL='http://localhost:18170'

Choose a reason for hiding this comment

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

Is there a need for a new LICENSE_MANAGER_DJANGO_URL variable if the value is the same as the existing LICENSE_MANAGER_URL?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, the LICENSE_MANAGER_URL variable is use for fetching subscriptions data and the LICENSE_MANAGER_DJANGO_URL is used as the django admin url. we ran into an issue with fetching the data when we used the same url. the fetching one should be license-manager.edx.org and the admin django screen is license-manager-internal.edx.org.

@katrinan029 katrinan029 merged commit 28257fe into master Sep 25, 2024
5 of 7 checks passed
@katrinan029 katrinan029 deleted the knguyen2/ent-9476 branch September 25, 2024 20:46
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