Skip to main content

Test In-App Notifications

There is a rake task that can create all student in-app notifications that are currently supported. Before running this task, you'll want to make sure that the Notifications Service is running.

Creating In-App Notifications

Note: This uses the user_id of student@amaranta.edu (#125). Feel free to change to any user_id

# start the Notifications Service
# run the following from the notifications repo
./scripts/start-all.sh

# [optional] delete all data from nds
# run the following from the notifications repo
./scripts/data-redis-cli.sh
> flushall

# start Handshake
# the monolith is used for preference checking
bin/comp db up -d
foreman run web

# create notifications
# run the following from the handshake repo
# make sure the db is running: bin/comp db up -d
bundle exec rails "dev:notifications:create_in_app_notifications[125]"

Viewing In-App Notifications

Via rails console

user = User.find(125)
s = Next::Student::NotificationsService.new(
user: user,
page_size: 100,
page_offset: 0,
start_date: 30.days.ago,
platform_name: 'web'
)
s.fetch_templated_notifications

Via the UI

  • Log in as the user
  • Visit /notifications?ref=navbar