🐛(front) disable retries in useQuery and useInfiniteQuery

The default options in TanStack Query don't make sense for these purposes
and were inducing a need for long timeouts in Playwright tests. (Personal
aside: I consider timeouts in Playwright as a testing smell.)
This commit is contained in:
Laurent Bossavit
2025-03-19 20:37:57 +01:00
committed by Laurent Bossavit
parent 6b2ca88ff2
commit e63c31f960
6 changed files with 10 additions and 9 deletions

View File

@@ -13,6 +13,11 @@ and this project adheres to
- ✨(oidc) add simple introspection backend #832
- 🧑‍💻(tasks) run management commands #814
### Fixed
- 🐛(oauth2) force JWT signed for /userinfo #804
- 🐛(front) disable retries in useQuery and useInfiniteQuery #818
## [1.14.1] - 2025-03-17
## [1.14.0] - 2025-03-17

View File

@@ -66,6 +66,7 @@ export function useMailDomains(
getNextPageParam(lastPage, allPages) {
return lastPage.next ? allPages.length + 1 : undefined;
},
retry: 0,
...queryConfig,
});
}

View File

@@ -34,5 +34,6 @@ export function useTeams(params: TeamsParams) {
return useQuery({
queryKey: [KEY_LIST_TEAM, params],
queryFn: () => getTeams(params),
retry: 0,
});
}

View File

@@ -136,9 +136,7 @@ test.describe('Mail domain', () => {
page.getByText(
'It seems that the page you are looking for does not exist or cannot be displayed correctly.',
),
).toBeVisible({
timeout: 15000,
});
).toBeVisible();
});
test.describe('user is administrator or owner', () => {

View File

@@ -154,8 +154,6 @@ test.describe('Add Mail Domains', () => {
page.getByText(
'It seems that the page you are looking for does not exist or cannot be displayed correctly.',
),
).toBeVisible({
timeout: 15000,
});
).toBeVisible();
});
});

View File

@@ -99,8 +99,6 @@ test.describe('Teams Create', () => {
page.getByText(
'It seems that the page you are looking for does not exist or cannot be displayed correctly.',
),
).toBeVisible({
timeout: 15000,
});
).toBeVisible();
});
});