fix(templates): use defaults for zero pagination values

This commit is contained in:
ephraimduncan
2026-08-25 03:40:58 +00:00
parent 98c5db7d0d
commit a1e7ca0ce3
2 changed files with 18 additions and 4 deletions
@@ -149,6 +149,18 @@ test.describe('Organisation Templates - Listing', () => {
await expect(page.getByText(orgTemplate.title)).toBeVisible();
});
test('should use default pagination when URL values are zero', async ({ page }) => {
const { memberB, teamB, orgTemplate } = await seedOrgTemplateScenario();
await apiSignin({
page,
email: memberB.email,
redirectPath: `/t/${teamB.url}/templates?view=organisation&page=0&perPage=0`,
});
await expect(page.getByText(orgTemplate.title)).toBeVisible();
});
test('should not show private templates from other teams under the organisation view', async ({ page }) => {
const { ownerA, teamA, memberB, teamB } = await seedOrgTemplateScenario();