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 conflict with Content Security Policy headers #65

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pustomytnyk
Copy link

@pustomytnyk pustomytnyk commented Jul 11, 2022

Replaced <script> with javascript_tag to support nonce: true if required by Content Security Policy headers. Tested proper render in Rails 5.1 and 7.

@@ -44,7 +44,13 @@ With this we will:
Finally, because it’s hard for us to do automatically, you will need to add the following before any closing `</head>` tags in any of the files in `app/views/layouts`:

```ruby+erb
<%= render 'magic_test/support' if Rails.env.test? %>
Copy link
Author

Choose a reason for hiding this comment

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

The condition is already inside partial

@@ -21,8 +21,8 @@ def install
gsub_file "test/system/basics_test.rb", "visit basics_url", "visit root_url"
gsub_file "test/system/basics_test.rb", 'assert_selector "h1", text: "Basic"', "magic_test"

gsub_file "test/application_system_test_case.rb", "using: :headless_chrome", "using: (ENV['SHOW_TESTS'] ? :chrome : :headless_chrome)"
Copy link
Author

Choose a reason for hiding this comment

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

That seem to be outdated?

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