Metaculus / metaculus

BSD 2-Clause "Simplified" License
7 stars 2 forks source link

Testing Notifications #370

Open George3d6 opened 2 weeks ago

George3d6 commented 2 weeks ago
  1. Create a script to anonymize the db from beta (prod) -> dev (avoid mistakenly sending emails to users, among other things), can just reuse Elise's script to create a db sample here
  2. Add a "SEND_ALL_MAIL_TO" flag in order to redirect emails to the tester's account
  3. Add a "MAIL_FREQUENCY_MIN" env variable that will be set to 60 for prod (and by default) but can be set to e.g. 1 for speed of testing
  4. Add unit tests to the CP notifications

Test notifications for

SylvainChevalier commented 2 weeks ago

@George3d6

Missing:

George3d6 commented 2 weeks ago

Ok, will do those 2 as well :)

Curious how easy I'd be to automate all of these as part of the integration tests but my hunch if "pretty hard"

George3d6 commented 2 weeks ago

Comment notifications work

George3d6 commented 2 weeks ago

Open/Close/Resolve work CP change works New comments on followed questions don't send notifications. New questions in followed tournaments don't send notifications.

George3d6 commented 2 weeks ago

@hlibowski I don't see a very easy fix/solution for:

  1. Notifications being sent on posts you follow when a certain nr of unread comments appear
  2. Notifications being sent when a new post is opened in a tournament you follow

Could you look into these 2 + add unit tests for them ?

hlibowski commented 1 week ago

@George3d6 refactored posts approval and "new opened posts in the following tournament" began to work. I also find a small semi-related issue to N comments notification. It works on my end, so please revalidate to be sure