refactor(tender-details): enhance translation page tests and layout
- Updated Cypress tests for the tender translation page to improve visibility checks and streamline assertions. - Refactored test structure to utilize a dedicated function for fetching the visible title heading. - Adjusted test cases to ensure accurate language switching and URL handling for tender details. - Improved layout consistency in the translation page by refining element visibility checks and ensuring proper section rendering.
This commit is contained in:
@@ -92,6 +92,17 @@ export const useCompanyFullList = (options?: { enabled?: boolean }) => {
|
||||
enabled,
|
||||
});
|
||||
};
|
||||
export const useCompaniesQuery = (params?: Record<string, any>) => {
|
||||
const queryKey = useMemo(
|
||||
() => [API_ENDPOINTS.COMPANIES.READ_ALL, params],
|
||||
[params],
|
||||
);
|
||||
return useQuery({
|
||||
queryKey,
|
||||
queryFn: () => companiesService.getCompanies({ ...params }),
|
||||
});
|
||||
};
|
||||
|
||||
export const useCompaniesInfiniteQuery = (params?: Record<string, any>) => {
|
||||
const queryKey = useMemo(
|
||||
() => [API_ENDPOINTS.COMPANIES.READ_ALL, params],
|
||||
|
||||
@@ -48,3 +48,13 @@ export const useTranslateTenderMutation = () => {
|
||||
},
|
||||
});
|
||||
};
|
||||
export const useGetTenderDocumentsQuery = (id: string) => {
|
||||
const queryKey = useMemo(
|
||||
() => [API_ENDPOINTS.TENDERS.DOCUMENTS(id)],
|
||||
[id],
|
||||
);
|
||||
return useQuery({
|
||||
queryKey,
|
||||
queryFn: () => tendersService.getDocuments(id),
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user