From 3107696ad9cfe92a9d38a286afe94cf33c95280a Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Thu, 23 Jul 2026 22:07:51 +0200 Subject: [PATCH] Migrate Playwright privateApi helper to new client API --- frontend/tests/utils/privateApi.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/tests/utils/privateApi.ts b/frontend/tests/utils/privateApi.ts index b6fa0afe..fdbcacbd 100644 --- a/frontend/tests/utils/privateApi.ts +++ b/frontend/tests/utils/privateApi.ts @@ -1,8 +1,11 @@ // Note: the `PrivateService` is only available when generating the client // for local environments -import { OpenAPI, PrivateService } from "../../src/client" +import { PrivateService } from "../../src/client" +import { client } from "../../src/client/client.gen" -OpenAPI.BASE = `${process.env.VITE_API_URL}` +client.setConfig({ + baseURL: `${process.env.VITE_API_URL}`, +}) export const createUser = async ({ email, @@ -11,12 +14,13 @@ export const createUser = async ({ email: string password: string }) => { - return await PrivateService.createUser({ - requestBody: { + const response = await PrivateService.createUser({ + body: { email, password, is_verified: true, full_name: "Test User", }, }) + return response.data }