docbrown/spec/models
Lawrence 0c93bde6c2
Subscribe to Comment Functionality (#19555)
* Move save over and add button labels

* comment notification design and functionality

* controller error handling

* add ternery operator for background class

* minor cleanup

* add proper styling toggles

* tests and mobile spec

* add for all buttons

* add article as a param

* comment is not required on article preview

* update policy spec

* add test for coverage

* add proper button titles

* use the last user comment as comment id

* add better error handling and remove multiple fetch calls in js

* copy change to threads

* update copy, fix multiple fetch calls, add observer for loading more notifications

* update spec

* add rspecs

* more test specs

* fix test specs

* subscribe button text tests

* add export

* optimistically update ui function tests

* button initialize test

* check for comment ancestry

* add feature flag block

* some cleanup

* update logic and specs

* oops

* rubocop issues

* change config names

* change config names

* fix spec

* add one more conditional

* check for comments

* service-object the toggler

* separate routes

* continual refactoring

* refine spec tests

* clean up policy

* Adjust js and view files to match be params

* some service object refactoring

* separate endpoints on client-side

* broken spec

* service specs

* policy spec fixes

* remove action param

* remove action param from spec

* minor updates

* trigger build

* update to post

* Services don't need permitted params

* Notifications continue to be a mess, decorator specs to follow

* Not toggling now

* This doesn't really belong here

* Fix tests after moving

* Streamline front-end

* There could be errors?

* polymorphic_name is a class thing

* ☠️ json_data in notification views

* Use feature_flag helper to get current_user

* Cannot derive current subscription status from notification, only from subscription

* Default is subscribe to all article comments

* Sync up matching unsubscribe, make subscribe idempotent-ish

* Temporarily comment-out button jest tests to see if I can unstick CI

* Stop trying to detect potential subscribe-to-comment

* Stop trying to detect potential subscribe-to-comment

* Minor spec refactoring

* Add specs for article notification decoration

* NotificationDecorator specs are rather long

* Rubocop likes it?

* Minor spec refactoring

* Doesn't need to stay pending

* Add spec for subscription finder

* Expand Subscribe service specs

* YAGNI, but I don't like hard-coded config

* Refactor Unsubscribe service specs

* nobody expects the infinite scroll

* This *might* work, except for feature flag

* Ancestry can be quite deep actually

* Rubocop

* Update subscribe button for subscribe-to-thread

* Jest tests are just tests

* hasAttribute != getAttribute

* Test knows **nothing** about window size

* Tests have been lying about mobileLabel this whole time

* Make payload/endpoint testable

* Is Jest actually happy???

* Still cleaning up jest/eslint

* Temporarily comment-out cypress tests pending feature flag

* Thanks, Rubocop, what would we do without you

* Preserve round-trip for 'top-level' and 'only-author' subscriptions

* Update specs

* Move save button icon

* Update test with better config param

* Try feature flag specific to cypress env

* Tell cypress to wait for (un)subscribing to work

---------

Co-authored-by: Lawrence S <lawrence@forem.com>
Co-authored-by: Joshua Wehner <joshua@forem.com>
2023-07-10 17:11:46 +02:00
..
ab_experiment Timecop freeze ab_experiment spec (#18655) 2022-11-01 11:35:37 -04:00
ahoy Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
articles Quick fix to pagination in /stories/feed (#19423) 2023-05-09 09:52:03 -03:00
concerns Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
settings Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
shared_examples Display Ads: Target by Tag on Posts with matching Tag(s) on the user facing side (#18664) 2022-11-03 15:51:51 +02:00
users Update experience_level's validation (#19487) 2023-05-23 14:10:32 -04:00
ab_experiment_spec.rb Exposing past feed experiments in /admin/abtests (#17818) 2022-06-02 20:41:31 -04:00
admin_menu_spec.rb Routine Rubopcop lint fixes (#17844) 2022-06-07 10:17:16 -04:00
api_secret_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
application_record_spec.rb Sort organization members and tag moderators by badge count (#19582) 2023-06-09 15:30:46 +01:00
article_destroy_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
article_spec.rb Admin comments page with flag and quality reaction details. (#19647) 2023-07-05 22:05:35 +05:30
async_info_spec.rb Moving from user.trusted tests to policy tests (#17619) 2022-05-11 08:18:13 -04:00
audience_segment_spec.rb Allow DisplayAd to target users via audience segmentation (#19284) 2023-04-25 08:41:10 -04:00
audit_log_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
badge_achievement_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
badge_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
banished_user_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
broadcast_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
collection_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
comment_spec.rb Prevent comments by the staff account from being hidden (#19698) 2023-07-10 11:46:46 +01:00
consumer_app_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
context_notification_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
credit_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
data_update_script_spec.rb Save Data Update Script errors to database and show them on http://localhost:3000/admin/data_update_scripts (#12348) 2021-01-21 14:48:34 +01:00
device_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
discussion_lock_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
display_ad_event_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
display_ad_spec.rb Allow LOW_IMPRESSION_COUNT and related values set by ENV (#19678) 2023-07-05 08:45:14 -04:00
email_authorization_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
email_message_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
feedback_message_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
follow_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
forem_instance_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
github_issue_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
github_repo_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
hair_trigger_spec.rb [ruby] Upgrade hairtrigger: 0.2.25 → 1.0.0 (major) (#19095) 2023-02-10 11:49:33 -05:00
html_variant_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
identity_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
listing_category_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
listing_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
mention_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
navigation_link_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
note_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
notification_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
notification_subscription_spec.rb Subscribe to Comment Functionality (#19555) 2023-07-10 17:11:46 +02:00
organization_membership_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
organization_spec.rb Add ability to assign arbitrary segment ID to /display_ads API (#19529) 2023-05-31 18:11:35 +02:00
page_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
page_view_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
pinned_article_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
podcast_episode_appearance_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
podcast_episode_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
podcast_ownership_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
podcast_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
poll_option_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
poll_skip_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
poll_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
poll_vote_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
profile_field_group_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
profile_field_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
profile_pin_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
profile_spec.rb Skips newline when validating character count (#19646) 2023-07-07 14:35:29 -04:00
rating_vote_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
reaction_category_spec.rb Reaction emoji with consistent underscores (#19116) 2023-02-15 08:32:19 +01:00
reaction_spec.rb Skip reaction notifications for bookmarks (#19426) 2023-05-30 19:12:09 -04:00
response_template_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
role_spec.rb allows super_admin user to remove super_admin role (#19590) 2023-06-21 11:22:25 -04:00
segmented_user_spec.rb Allow DisplayAd to target users via audience segmentation (#19284) 2023-04-25 08:41:10 -04:00
space_spec.rb Busting tag cache when space changes (#17384) 2022-04-20 16:37:34 -04:00
tag_adjustment_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
tag_spec.rb Add organizations to onboarding follow suggestions (#19564) 2023-06-09 10:32:03 +02:00
timeframe_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
tweet_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
user_block_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
user_role_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
user_spec.rb Follow-ups for suggested organizations follows during onboarding (#19619) 2023-06-29 11:49:01 +02:00
user_subscription_spec.rb Update shoulda-matchers to 5.3 (#18905) 2023-01-05 13:21:38 -05:00