docbrown/spec/system
Dmitry Maksyoma f63c7f9289
Fix Runkit tags not being activated when comment is added (#6767)
* Fix Runkit tags not being activated when comment is added

* Runkit tag activation was ran once, on page load. I've changed it to
  run on on comment preview and submit.
* It was necessary to add a check to skip already activated Runkit
  tags. The code didn't take into account that a tag could be already
  processed, and would just crash.

* Fix Runkit tags and add tests

* Add test for previewing article with Runkit tag

* "Fix CodeClimate not finding waitForRunkitAndActivateTags()

* Refactor a test for readability

* Make Rubocop happy

* Improve test for previewing article with Runkit tag

* Use one method for determining active Runkit tags

* Defer loading of JS from embed.runkit.com

* Add utility function dynamicallyLoadScript(url)

* Switch to dynamic loading of Runkit

* parsed content code block is also hidden now to avoid displaying <code /> block before runkit iframe loads.

* Fix Runkit test

* Remove Runkit script caching in v2 form

* Use <%== instead of .html_safe in v2 form

* Update app/assets/javascripts/utilities/dynamicallyLoadScript.js

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-05-15 14:27:46 +02:00
..
admin Use build_stubbed where possible in tests (#7827) 2020-05-14 10:56:29 +02:00
articles Fix Runkit tags not being activated when comment is added (#6767) 2020-05-15 14:27:46 +02:00
authentication [deploy] Authentication refactoring: cleanups (#7576) 2020-04-29 10:33:30 -04:00
comments Fix Runkit tags not being activated when comment is added (#6767) 2020-05-15 14:27:46 +02:00
dashboards [deploy] Use bulk_show Endpoint for Follow Buttons on Followers Dashboard (#7849) 2020-05-14 11:25:29 -05:00
homepage [deploy] Home Page Feed redesign + top comments (#7579) 2020-05-12 07:57:57 -05:00
internal [deploy] Add org credit management to org mod page (#7761) 2020-05-11 16:49:05 +02:00
notifications Create notification page spec (#7702) 2020-05-11 12:15:07 -04:00
organization [deploy] Home Page Feed redesign + top comments (#7579) 2020-05-12 07:57:57 -05:00
podcasts Routine rubocop fixes (#7743) 2020-05-08 19:38:06 +02:00
pro_memberships Pro: memberships (#3461) 2019-09-24 10:38:54 -07:00
search [deploy] Home Page Feed redesign + top comments (#7579) 2020-05-12 07:57:57 -05:00
user Fix profile page rendering when a username contains spaces (#7787) 2020-05-13 08:37:50 +02:00
videos Routine rubocop fixes (#7743) 2020-05-08 19:38:06 +02:00
banned_user_interactions_spec.rb Replace ban/banned with suspend/suspended in user facing text (#5816) [deploy] 2020-02-10 10:12:53 -05:00
link_for_tags_in_posts_in_notifications_spec.rb Migrate feature test to system test (#2301) 2019-04-04 12:15:10 -04:00
user_leaves_top_level_comment_spec.rb Migrate feature test to system test (#2301) 2019-04-04 12:15:10 -04:00
user_selects_looking_for_work_spec.rb Settings style updates: Crayons! (#7393) 2020-04-22 19:18:19 +02:00
user_uses_the_editor_spec.rb Unskip all skipped specs (#2941) 2019-05-25 11:04:38 -04:00
user_views_a_reading_list_spec.rb Routine rubocop fixes (#7743) 2020-05-08 19:38:06 +02:00
user_visits_a_comments_page_spec.rb Routine rubocop fixes (#7743) 2020-05-08 19:38:06 +02:00