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

React #746

Closed
wants to merge 73 commits into from
Closed

React #746

wants to merge 73 commits into from

Conversation

zurbergram
Copy link
Contributor

@zurbergram zurbergram commented Oct 21, 2020

Description

department-of-veterans-affairs/va.gov-team#14964

Adding React by following instructions at https://github.com/reactjs/react-rails#rails-5x
Applied fix was rails/webpacker#522 (comment) which created bin/yarn
Set CODEOWNERS for React directories and files to @department-of-veterans-affairs/bah-gibct

Testing done

  • local testing

Screenshots

Acceptance criteria

  • The React library is included as part of the GIDS project.
  • Smoke testing passes

Definition of done

  • Events are logged appropriately
  • Documentation has been updated, if applicable
  • A link has been provided to the originating GitHub issue (or connected to it via ZenHub)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs

You need to allow webpack-dev-server host as allowed origin for connect-src.
This can be done in Rails 5.2+ for development environment in the CSP initializer
config/initializers/content_security_policy.rb with a snippet like this:
policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
  3) UploadsController behaves like an authenticating controller when being visited and submitting credentials outputs an error message if not successful
     Failure/Error: visit user_session_path

     Capybara::Poltergeist::JavascriptError:
       One or more errors were raised in the Javascript code on the page. If you don't care about these errors, you can ignore them by setting js_errors: false in your Poltergeist configuration (see documentation for details).

       ReferenceError: Can't find variable: Set
       ReferenceError: Can't find variable: Set
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:35163
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:35498 in ./node_modules/scheduler/cjs/scheduler-tracing.development.js
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:20 in __webpack_require__
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:36574 in ./node_modules/scheduler/tracing.js
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:20 in __webpack_require__
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:4581
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:32258 in ./node_modules/react-dom/cjs/react-dom.development.js
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:20 in __webpack_require__
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:32301 in ./node_modules/react-dom/index.js
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:20 in __webpack_require__
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:34627 in ./node_modules/react_ujs/react_ujs/index.js
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:20 in __webpack_require__
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:118 in ./app/javascript/packs/application.js
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:20 in __webpack_require__
           at http://127.0.0.1:58010/packs-test/js/application-8ab2d686105b554977a1.js:84
     Shared Example Group: "an authenticating controller" called from ./spec/controllers/uploads_controller_spec.rb:9
     # ./spec/controllers/shared_examples/shared_examples_for_authentication.rb:30:in `block (4 levels) in <top (required)>'
@zurbergram zurbergram closed this May 13, 2021
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.

1 participant