You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/test/workers
RobertJoonas 3d2f356ba7
Refactor enterprise plan upgrade and change-plan actions (#3397)
* rename enterprise?/1 function

* change link text to Upgrade when subscription deleted

* extract paddle_button and paddle_script components

* create a new upgrade-to-enterprise-plan page

* extract upgrade_link component

* rename function

* link to enterprise plan upgrade page from settings

...if the user has an enterprise plan configured

* fetch enterprise plan price on the new page

* add change_enterprise_plan functionality on the new page

* render existing change_enterprise_plan_contact_us.html

...when subscribed to latest configured enterprise plan

* rename vars and extract resumable? fn

* remove dead billing route

* small test refactor: extract convenience fn

* add tests for...

...restricting paused and past_due subscription access to the new
enterprise plan page.

1. redirect to /settings from the controller action
2. hiding the change-plan link from the user settings

* implement redirect to /settings

* hide the enterprise upgrade/change-plan link

* add tests for a deleted enterprise subscription

* plug in the new controller action and delete dead code

* optimize for dark mode

* fix compile warning

* credo fix

* display N/A instead of crash when price nil

* change subscription.status type to Ecto.Enum

Also, create a new `Subscription.Status` module that exposes macros to
return the used atom values (prevent typos at compiletime).

* fix bug (@conn not available anymore)

* use Routes.billing_path where applicable

* add a status() type

* silence credo

* refactor suggestion from review

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>

* Remove the __using__ macro from Subscription.Status

... instead be explicit about requires and aliases and also order
the use, import, require, and alias clauses according to
https://github.com/christopheradams/elixir_style_guide#module-attribute-ordering

* drop the virtual Enteprise 'price_per_interval' field

* apply review suggestion to make the code more DRY

* use dot syntax to fetch current user in new controller actions

* fix formatting

---------

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
3 years ago
..
check_usage_test.exs Suggest enterprise plan when usage is greater than 10M pageviews (#2345) 4 years ago
clean_email_verification_codes_test.exs Upgrades Oban to v2.6.1 (#967) 6 years ago
clean_invitations_test.exs Invitations (#1122) 6 years ago
expire_domain_change_transitions_test.exs Fix flaky log assertion (#3199) 3 years ago
import_google_analytics_test.exs Add eventually/1 call to flaky test (#3054) 3 years ago
lock_sites_test.exs Refactor enterprise plan upgrade and change-plan actions (#3397) 3 years ago
notify_annual_renewal_test.exs Refactor enterprise plan upgrade and change-plan actions (#3397) 3 years ago
schedule_email_reports_test.exs Do not send email reports for locked sites 5 years ago
send_check_stats_emails_test.exs Conditionally support switching between v1 and v2 clickhouse schemas (#2780) 4 years ago
send_email_report_test.exs Fix weekly/monthly report e-mails (MJML) (#3150) 3 years ago
send_site_setup_emails_test.exs Conditionally support switching between v1 and v2 clickhouse schemas (#2780) 4 years ago
send_trial_notifications_test.exs Refactor enterprise plan upgrade and change-plan actions (#3397) 3 years ago
spike_notifier_test.exs Apply unified capitalization to buttons and titles (#3321) 3 years ago