Skip to content

Commit

Permalink
use new player limit based billing
Browse files Browse the repository at this point in the history
  • Loading branch information
tudddorrr committed Jan 26, 2025
1 parent 24e4fd4 commit 8c0df05
Show file tree
Hide file tree
Showing 16 changed files with 139 additions and 275 deletions.
3 changes: 1 addition & 2 deletions cypress/e2e/pages/Billing.spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ describe('Billing', () => {
stubBillingCalls()

cy.login('owner', '/billing')
cy.findByTestId('User seats-usage').should('contain.text', '0/2')
cy.findByTestId('Data exports-usage').should('contain.text', '1/3')
cy.findByTestId('players-usage').should('contain.text', '0 / 2')
})

it('should open the billing portal', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/responses/billing/free-plan.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id": 1,
"hidden": false,
"default": true,
"actions": []
"playerLimit": 10000
},
"status": "active",
"endDate": null,
Expand Down
51 changes: 6 additions & 45 deletions cypress/fixtures/responses/billing/plans.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@
"default": true,
"createdAt": "2022-06-14T17:13:12.000Z",
"updatedAt": "2022-06-14T17:13:12.000Z",
"actions": [
{
"id": 1,
"type": 0,
"limit": 2,
"trackedMonthly": false
},
{
"id": 2,
"type": 1,
"limit": 2,
"trackedMonthly": true
}
],
"name": "Indie Plan",
"prices": [
{
Expand All @@ -35,7 +21,8 @@
"interval": "year",
"current": false
}
]
],
"playerLimit": 10000
},
{
"id": 2,
Expand All @@ -44,20 +31,6 @@
"default": false,
"createdAt": "2022-06-14T17:13:34.000Z",
"updatedAt": "2022-06-14T17:13:34.000Z",
"actions": [
{
"id": 3,
"type": 0,
"limit": 10,
"trackedMonthly": false
},
{
"id": 4,
"type": 1,
"limit": 4,
"trackedMonthly": true
}
],
"name": "Team Plan",
"prices": [
{
Expand All @@ -72,7 +45,8 @@
"interval": "year",
"current": false
}
]
],
"playerLimit": 100000
},
{
"id": 3,
Expand All @@ -81,20 +55,6 @@
"default": false,
"createdAt": "2022-06-14T17:13:55.000Z",
"updatedAt": "2022-06-14T17:13:55.000Z",
"actions": [
{
"id": 5,
"type": 0,
"limit": 50,
"trackedMonthly": false
},
{
"id": 6,
"type": 1,
"limit": 10,
"trackedMonthly": true
}
],
"name": "Studio Plan",
"prices": [
{
Expand All @@ -109,7 +69,8 @@
"interval": "year",
"current": false
}
]
],
"playerLimit": 1000000
}
]
}
10 changes: 2 additions & 8 deletions cypress/fixtures/responses/billing/usage.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"usage": {
"0": {
"limit": 2,
"used": 0
},
"1": {
"limit": 3,
"used": 1
}
"limit": 2,
"used": 0
}
}
Loading

0 comments on commit 8c0df05

Please sign in to comment.