Commit graph

5 commits

Author SHA1 Message Date
Fernando Valverde
6e6c32e92a
Fixes a name conflict in Rpush models (#15978)
* Fixes a name conflict in Rpush models

* Removes unnecessary operator

* Review feedback
2022-01-07 09:38:16 -06:00
Fernando Valverde
e45b6c5ab2
Adds validations to avoid creating unnecessary PNs (#14621)
* Adds validations to avoid creating unnecessary PNs

* Fix conditional + add tests

* Trigger CI

* Trigger CI

* Add missing rpush mock in spec

* Mock before testing d'oh

* Extend ability to mock rpush in helpers

* Remove unnecessary user3 from spec
2021-08-31 15:00:30 -06:00
Fernando Valverde
f34b2203d3
Make Consumer Apps dictate aasa results (#14015)
* Makes Consumer Apps dictate aasa results

* progress with ConsumerApp query

* Adds Team ID migration + Stimulus consumer_app_controller.js

* Adds cypress tests

* Adds Backfill data_update_script + more specs & tweaks

* Remove file added by mistake

* Comment typo

* Small tweaks + improved specs

* Update lib/data_update_scripts/20210622145212_backfill_forem_consumer_app_team_id.rb

Co-authored-by: Jamie Gaskins <jamie@forem.com>

* Update spec/lib/data_update_scripts/backfill_forem_consumer_app_team_id_spec.rb

Co-authored-by: rhymes <github@rhymes.dev>

* Make use of create! and log errors to ForemStatsClient

* Fix specs

* Add mock_rpush call as suggested in review

* Add Review suggestions

* Fix tests

* Remove redundant assert in spec

Co-authored-by: Jamie Gaskins <jamie@forem.com>
Co-authored-by: rhymes <github@rhymes.dev>
2021-06-24 08:36:11 -06:00
rhymes
cf9f6094cd
Have specs run without Redis and refactor ConsumerApp and Device (#13647)
* Add fakeredis gem

* Mock Pusher::PushNotifications in specs

* Remove Redis from Travis

* Add Android tests to ConsumerApp specs

* Use mock for push notification tests and refactor ConsumerApp and Device code

* Fix remaining broken specs

* Use symbols

* Cleanup rpush helpers

* Pusher::PushNotifications is no more

* Use human friendly platform in Admin::ConsumerApps index page
2021-05-07 08:03:16 +02:00
Fernando Valverde
e602d50d32
Push Notification multi app support (#13304)
* PushNotificationTarget model + /admin/push_notifications (index)

* Admin panel CRUD + request tests

* Migrate Redis backed Rpush model responsibilities into PushNotificationTarget

* Fix failing specs

* Fix conflicts + clean up test by using constant reference

* Removed unused policy

* policy + services + misc feedback

* PushNotificationTarget refactored to AppIntegration

* Review feedback

* Some small cleanup

* Refactor AppIntegration -> ConsumerApp

* Fixing specs

* Trigger Travis

* More naming refactor changes

* Refactor services into queries

* Revert to where(...).first, fix typo and tests

* Apply suggestions from code review

Co-authored-by: rhymes <rhymes@hey.com>

* PR review feedback - create_or_find_by, validations, renaming + more tests

* Fix aria-label text

* Remove unnecessary individual index - composite index will do

Co-authored-by: rhymes <rhymes@hey.com>
2021-04-21 17:13:01 -06:00