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

fix(build, routerTypes): issues/34 dynamic routing baseName #68

Merged
merged 1 commit into from
Aug 2, 2019

Conversation

cdcabrera
Copy link
Member

@cdcabrera cdcabrera commented Aug 2, 2019

What's included

  • fix(build, routerTypes): issues/34 dynamic routing baseName
    • build, dotenv path prefix
    • build, html template add in lang attribute from dotenv
    • routerTypes, create a dynamic routing baseName

Notes

  • it looks like we were missing the "dynamic baseName" implementation that shifts the routing. it was causing the GUI/app to redirect towards the original baseName

How to test

Coverage and basic unit test check

  1. update the NPM packages with $ yarn
  2. $ yarn test

Interactive unit test check

  1. update the NPM packages with $ yarn
  2. $ yarn test:dev

Local run

  1. update the NPM packages with $ yarn
  2. $ yarn start
  3. confirm the route is coming through and being redirected towards a rhel route
  4. to check the dynamic functionality add additional path names and confirm they're still being directed to a final rhel path
    • http://localhost:3000/lorem/ipsum/dolor/sit should end up being -> http://localhost:3000/lorem/ipsum/rhel
    • http://localhost:3000/lorem/ipsum/rhel/rhel/rhel should end up being -> http://localhost:3000/lorem/ipsum/rhel
  5. to check the beta path part of the check, first stop the previous local run server, then run $ export UI_DEPLOY_PATH_PREFIX=/beta; yarn start; unset UI_DEPLOY_PATH_PREFIX
  6. to check the dynamic functionality add additional path names and confirm they're still being directed to a final rhel path
    • http://localhost:3000/beta/lorem/ipsum/dolor/sit should end up being -> http://localhost:3000/beta/lorem/ipsum/rhel
    • http://localhost:3000/beta/lorem/ipsum/rhel/rhel/rhel should end up being -> http://localhost:3000/beta/lorem/ipsum/rhel

Example

...

Updates issue/story

Updates #34

@codecov-io
Copy link

codecov-io commented Aug 2, 2019

Codecov Report

Merging #68 into master will increase coverage by 0.57%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
+ Coverage   88.09%   88.66%   +0.57%     
==========================================
  Files          23       23              
  Lines         294      300       +6     
  Branches       62       64       +2     
==========================================
+ Hits          259      266       +7     
+ Misses         28       27       -1     
  Partials        7        7
Impacted Files Coverage Δ
src/components/router/routerTypes.js 100% <100%> (ø) ⬆️
src/common/helpers.js 100% <100%> (ø) ⬆️
src/components/router/router.js 91.66% <0%> (+8.33%) ⬆️

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 bd9239c...8c95cd0. Read the comment docs.

cdcabrera referenced this pull request in cdcabrera/curiosity-frontend Aug 2, 2019
* build, dotenv path prefix
* build, html template add in lang attribute from dotenv
* routerTypes, create a dynamic routing baseName
* build, dotenv path prefix
* build, html template add in lang attribute from dotenv
* routerTypes, create a dynamic routing baseName
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="%REACT_APP_CONFIG_SERVICE_LOCALES_DEFAULT_LNG%">
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

Copy link
Member Author

Choose a reason for hiding this comment

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

INDEED! =)

Copy link
Contributor

@priley86 priley86 left a comment

Choose a reason for hiding this comment

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

LGTM

@priley86 priley86 merged commit fdd3b06 into RedHatInsights:master Aug 2, 2019
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.

3 participants