Remove browsing selection ceilings
This commit is contained in:
1 parent
c028637556
commit
bc42c55555
14 files changed
+81
-53
No files matched your search
@@ -262,16 +262,16 @@ describe('growth route', () => {
|
||||
it('enables simulation within the conservative hard limits', async () => {
|
||||
const { status, json } = await call(app, 'PATCH', `/api/growth/${ENCODED}/browsing`, {
|
||||
enabled: true,
|
||||
dailyTargetMin: 4,
|
||||
dailyTargetMax: 8,
|
||||
dailyTargetMin: 14,
|
||||
dailyTargetMax: 28,
|
||||
minimumGapMs: 3_600_000,
|
||||
selectionsPerSession: 4,
|
||||
selectionsPerSession: 18,
|
||||
});
|
||||
|
||||
expect(status).toBe(200);
|
||||
const parsed = GrowthAccountResponseSchema.parse(json);
|
||||
expect(parsed.account.browsing).toMatchObject({
|
||||
settings: { enabled: true, dailyTargetMin: 4, dailyTargetMax: 8, selectionsPerSession: 4 },
|
||||
settings: { enabled: true, dailyTargetMin: 14, dailyTargetMax: 28, selectionsPerSession: 18 },
|
||||
noVotesSubmitted: true,
|
||||
});
|
||||
expect(pushed).toContainEqual({
|
||||
@@ -280,9 +280,9 @@ describe('growth route', () => {
|
||||
});
|
||||
|
||||
it.each([
|
||||
{ dailyTargetMax: 13 },
|
||||
{ minimumGapMs: 44 * 60_000 },
|
||||
{ selectionsPerSession: 13 },
|
||||
{ dailyTargetMin: 0 },
|
||||
{ dailyTargetMax: 2 },
|
||||
{ selectionsPerSession: 0 },
|
||||
{ postWeight: 0, commentWeight: 0 },
|
||||
{ nextDueAt: 123 },
|
||||
])('rejects unsafe or non-operator settings %o', async (body) => {
|
||||
|
||||
Reference in new issue
Block a user