docbrown/spec/models
rhymes 99ddd31058
Pin posts to feed (#13807)
* Add SiteConfig.feed_pinned_article and validation

* Display pinned article at the top of feed

* Add (basic) functionality to pin/unpin post

* Admins can pin other users posts as well

* Hide the button if looking at the non pinned post

* Add pinned/unpinned snackbar message

* Rename SiteConfig usage to Settings::General

* Add pinned article to the Admin articles index

* Show the pin post button when there's no pinned article

* Move pinning to a separate controller

* Fix SiteConfig reference

* Hide PinController actions to unauthorized users

* PinnedArticlesController#show action and refactor some of the code

* Add Modal interaction

* Fix modal-pinned checkbox interaction

* Fixed pin/unpin post

* Add ArticleDecorator#pinned? specs

* Add PinnedArticlePolicy and PinnedArticlesController specs

* Add ability to actually pin an article from the admin after submit

* Add partial Cypress pin/unpin spec

* Fix pinned article and add basic Cypress interaction tests

* Add Crayons styling to modal

* Only render the pinned article on the default Feed page

* Use persisted?

* Add some comments

* Update app/javascript/articles/Article.jsx

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/javascript/packs/homePageFeed.jsx

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Fix Cypress tests

* Update app/javascript/admin/controllers/article_controller.js

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Fix pinning in article show page

* Used PinnedArticle domain model

* Fix spec

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/articleFlows/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/articleFlows/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/articles/index.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Fix merge woes

* Add missing article pin post flows

* Add missing admin article flows

* Add Unpin to Admin as well

* Add Audit::Log entries for pin/unpin actions

* Update app/controllers/stories/feeds_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Do not rate limit in E2E tests

* Use .find instead of .filter

* Rename ArticleIdValidator to ExistingArticleIdValidator

* Treat draft and deleted articles the same

* Make sure posts can be pinned after the pinned article is unpublished or deleted

* Use .get directly

* Fix spec and fix PinnedArticlesController#show

* Strengthen pinArticle Cypress tests

* Add Cypress test heading guard

* Add another Cypress test heading guard

* Remove duplicate validator

* Try using the Tools: header instead of the article title

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-06-04 10:54:53 +02:00
..
ahoy [deploy] Rubocop: fix Rails/HasManyOrHasOneDependent for Ahoy::Visit and Badge (#9565) 2020-07-31 11:43:50 -04:00
concerns Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
settings Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
shared_examples Fix Ruby 2.7 kwargs' warnings & misc spec warnings (#13256) 2021-04-06 16:57:59 -04:00
users UsersSettings RFC: Code to Sync User Settings updates to new tables (#13719) 2021-05-27 09:52:54 -04:00
webhook Add missing presence validators to models (#10495) 2020-10-01 16:15:32 +02:00
api_secret_spec.rb Limit the Number of API Keys a User Can Have (#7870) 2020-05-15 11:33:02 +02:00
application_record_spec.rb Switch decorators to Rails builtin decorations - take 2 (#6125) [deploy] 2020-02-19 15:30:53 -05:00
article_destroy_spec.rb [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
article_spec.rb Add :detect_animated_images feature flag to guard animated images detection (#13906) 2021-06-03 17:21:43 -04:00
audit_log_spec.rb Add missing presence validators to models (#10495) 2020-10-01 16:15:32 +02:00
badge_achievement_spec.rb Configure badge credits by admins (#13145) 2021-03-30 10:58:48 +03:00
badge_spec.rb Refactor cache purging (#12811) 2021-03-02 10:09:05 -05:00
banished_user_spec.rb Introduce BanishedUser table (#5589) [deploy] 2020-01-21 17:15:58 -05:00
broadcast_spec.rb Fix Rails/HasManyOrHasOneDependent for Broadcast and Collection (#9662) 2020-08-07 14:27:24 -04:00
chat_channel_membership_spec.rb Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
chat_channel_spec.rb [deploy] Encode domain name in pusher channels (#11136) 2020-10-28 14:52:38 -04:00
collection_spec.rb Fix Rails/HasManyOrHasOneDependent for Broadcast and Collection (#9662) 2020-08-07 14:27:24 -04:00
comment_spec.rb add user friendly error message when a comment is made on a deleted post (#13721) 2021-06-03 10:17:26 +07:00
consumer_app_spec.rb Have specs run without Redis and refactor ConsumerApp and Device (#13647) 2021-05-07 08:03:16 +02:00
credit_spec.rb Flaky Spec Fix:Remove let_it_be Test Prof Helper (#9556) 2020-07-29 11:31:01 +02:00
custom_profile_field_spec.rb Add custom profile fields (#10202) 2020-09-09 14:37:15 +00: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 Have specs run without Redis and refactor ConsumerApp and Device (#13647) 2021-05-07 08:03:16 +02:00
display_ad_event_spec.rb Flaky Spec Fix:Remove let_it_be Test Prof Helper (#9556) 2020-07-29 11:31:01 +02:00
display_ad_spec.rb [deploy] Remove orphaned DisplayAdEvent rows (#9765) 2020-08-14 09:29:08 -04:00
email_authorization_spec.rb Add missing presence validators to models (#10495) 2020-10-01 16:15:32 +02:00
email_message_spec.rb [deploy] Add missing foreign keys to ahoy_messages and articles (#10321) 2020-09-16 19:47:03 +02:00
event_spec.rb Move Events::BustCacheJob to Sidekiq and rename (#5379) 2020-01-06 15:51:46 -05:00
feedback_message_spec.rb [15-min-fix] Better feedback messaging (#13254) 2021-04-12 09:05:45 -04:00
follow_spec.rb Add implicit points to follows to improve feed relevancy (in all algorithms) (#11513) 2020-11-25 16:09:51 -05:00
forem_instance_spec.rb Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
github_issue_spec.rb ✂️ Remove the approvals gem ✂️ (#12978) 2021-03-19 13:28:06 -07:00
github_repo_spec.rb Fix Ruby 2.7 kwargs' warnings & misc spec warnings (#13256) 2021-04-06 16:57:59 -04:00
html_variant_spec.rb [15 min fix] Fallback to the image URL if Cloudinary/Imgproxy are not configured (#13767) 2021-05-19 15:03:20 +02:00
html_variant_success_spec.rb
html_variant_trial_spec.rb
identity_spec.rb Add Sign in with Apple (#11934) 2020-12-18 10:22:33 -06:00
listing_category_spec.rb Rubocop: Fix ListingCategory has_many relation to Listing (#9853) 2020-08-19 19:23:49 +02:00
listing_spec.rb Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
mention_spec.rb Add Mentions::CreateAllWorker for Sidekiq (#5463) 2020-01-13 13:23:30 -06:00
message_spec.rb [15 min fix] Fallback to the image URL if Cloudinary/Imgproxy are not configured (#13767) 2021-05-19 15:03:20 +02:00
navigation_link_spec.rb Update NavigationLink handling (#12316) 2021-01-20 13:57:59 -05:00
note_spec.rb [deploy] Add missing dependent clauses to User and cleanup relations (#10011) 2020-08-28 20:19:24 +02:00
notification_spec.rb UsersSettings RFC: Code to Sync User Settings updates to new tables (#13719) 2021-05-27 09:52:54 -04:00
notification_subscription_spec.rb Add missing presence validators to models (#10495) 2020-10-01 16:15:32 +02:00
organization_membership_spec.rb [deploy] Create private group chat channel for orgs (#7270) 2020-04-16 17:02:06 -04:00
organization_spec.rb Organizations delete optimizations and refactoring (#13610) 2021-05-11 12:14:55 +03:00
page_spec.rb Add json template to Pages (#8357) 2020-06-10 09:42:15 -05:00
page_view_spec.rb Remove UserHistory Feature and PageViews from Algolia (#6127) [deploy] 2020-02-18 10:06:30 -05:00
pinned_article_spec.rb Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
podcast_episode_appearance_spec.rb Add podcast_appearances joined table (forem#82) (#11354) 2020-11-30 17:12:52 +01:00
podcast_episode_spec.rb [15 min fix] Fallback to the image URL if Cloudinary/Imgproxy are not configured (#13767) 2021-05-19 15:03:20 +02:00
podcast_ownership_spec.rb Podcast ownership join table (MLH Fellowship #81) (#11410) 2020-11-19 12:41:17 +01:00
podcast_spec.rb Podcast ownership join table (MLH Fellowship #81) (#11410) 2020-11-19 12:41:17 +01:00
poll_option_spec.rb Add missing presence validators to models (#10495) 2020-10-01 16:15:32 +02:00
poll_skip_spec.rb Flaky Spec Fix:Remove let_it_be Test Prof Helper (#9556) 2020-07-29 11:31:01 +02:00
poll_spec.rb Add missing presence validators to models (#10495) 2020-10-01 16:15:32 +02:00
poll_vote_spec.rb
profile_field_group_spec.rb Replace calls to Flipper with FeatureFlag (#11386) 2020-11-12 14:15:33 +01:00
profile_field_spec.rb Remove boolean checks for validate_inclusion_of in specs (#11474) 2020-11-19 12:19:36 +01:00
profile_pin_spec.rb Flaky Spec Fix:Remove let_it_be Test Prof Helper (#9556) 2020-07-29 11:31:01 +02:00
profile_spec.rb Drop profile columns from user (#10707) 2020-12-03 08:14:38 +07:00
rating_vote_spec.rb [deploy] Add missing foreign keys to models related to users (#10018) 2020-08-31 15:39:57 +02:00
reaction_spec.rb Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
response_template_spec.rb [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
role_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
sponsorship_spec.rb Add missing presence validators to models (#10495) 2020-10-01 16:15:32 +02:00
tag_adjustment_spec.rb [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
tag_spec.rb Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
timeframe_spec.rb Remove timeframer from app/labor (#11782) 2020-12-08 12:52:33 +07:00
tweet_spec.rb [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
user_block_spec.rb Fix and refactor hide user content (#12307) 2021-01-18 11:08:23 -05:00
user_role_spec.rb [Search 2.0] Users (#13453) 2021-04-24 19:06:06 +02:00
user_spec.rb Bump rubocop from 1.15.0 to 1.16.0 (#13894) 2021-06-02 09:11:38 -04:00
user_subscription_spec.rb Improve error message of User Subscriptions (#11689) 2020-12-01 08:41:49 -08:00