mozilla / fx-private-relay-add-on

Companion add-on for Firefox Relay. Keep your email safe from hackers and trackers. Make an email alias with one click, and keep your address to yourself.
https://addons.mozilla.org/en-US/firefox/addon/private-relay
Mozilla Public License 2.0
67 stars 14 forks source link

MPP-3551 Recurring every 90 days - show CSAT survey #534

Closed lloan closed 10 months ago

lloan commented 10 months ago

This PR fixes MPP-3551

New feature description

After the first month, then show the banner every 3 months

Screenshot (if applicable)

Not applicable.

How to test

You should be able to see the CSAT survey banner if you modify the appropriate key in your extension storage.

image

Depending on your profileID, yours will look different. I set the value to 1693440000000 which is the equivalent of August 31st, 2023.

You can test the dismissal of the banner, closing banner (with x) should not permanently remove it, but dismissing it intentionally should make it go away until the next cycle (90 days and every 90 days thereafter). To make it show up again, change your local time to 90 days in the future. You can dismiss it again and it shouldn't show up. Then change your date to 90 days in the future and it should work.

Checklist

rafeerahman commented 10 months ago

Verified the following:

  1. Banner shows up when setting the first_seen value 90 days behind the current first_seen value (Simulating 90 days has passed).
  2. Upon dismissing the banner, the ..._dismissed value is stored in local storage, and the banner shows up when changing my local system time to 90 days in the future (90 days after the _dismissed time).
  3. Verified that reasonToShow is 90 days.

Looks good!