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/support
RobertJoonas 57188a402a
Define a better monthly pageview usage (#3564)
* refactor asking for the monthly pageview usage

* add tests for usage and limits section in account settings

* display pageview usage per billing cycle for active subscribers

* disable cycle tabs if no usage

* make current billing cycle whole

...instead of capping it at today's date

* run queries for different cycles concurrently

* fix linebreak bug

* add calculate usage action into CRM

* change some names of assigns

* block subscribing to a plan by pageview usage

Depending on whether the customer has already subscribed or not, checking
their pageview usage is different:

* If they're not subscribed yet, we allow them to subscribe to a plan If
  it their last 30 days usage does not exceed the plan pageview limit by
  more than 15% (30% for when subscribing to a 10k plan)

* For existing subscribers, we'll use the exact same mechanism that we're
  using for locking sites - the last two billing cycles usage. If both
  cycles exceed the plan limit by more than 10% - we don't allow them to
  subscribe to the plan

* apply credo suggestion

* prevent highlight bar overflow

* move disabled classes to button element

* optimize for darkmode

* unify link and text styling on the same horizontal line

'Upgrade' & 'Update billing details' links + billing interval text were
positioned on the same line. The font size was similar, but not the same

* improve exceeded_limits function readability

* Refactor some tests and remove code duplication

* override allow upgrade when limits exceeded

In cases where limits are exceeded, we can set the boolean flag
`allow_next_upgrade_override` to `true` in the CRM. This will allow
the user to upgrade to any plan they want. After they've upgraded or
changed their plan - the flag will automatically reset to `false`.

* only apply upgrade override for exceeded pageview limit

* fix tests on the CI

* make current_cycle usage always displayed by default

* make pageview allowance margin more clear

* add comment
3 years ago
..
conn_case.ex Remove custom domains support + update build options (#3559) 3 years ago
data_case.ex Google APIs integration improvements (#2358) 4 years ago
exchange_rate_mock.ex Revenue tracking: Add currency field to goal creation (#2948) 4 years ago
factory.ex Remove custom domains support + update build options (#3559) 3 years ago
google_api_mock.ex Referrer drilldown (#252) 6 years ago
html.ex Add small build option (#3536) 3 years ago
http_mocker.ex Upgrade Erlang/Elixir stack (#3454) 3 years ago
paddle_api_mock.ex Fix upgrade page for legacy trials + bug fixes (#3486) 3 years ago
plugins_api_case.ex Plugins API: 2nd pass with Goals resource + SharedLinks schema changes (#3396) 3 years ago
test_utils.ex Define a better monthly pageview usage (#3564) 3 years ago