Fix workflow gitea action pour e2e (tests automatisés via playwright) + correction d'une incohérence dans l'API coté java. Ajout d'autres tests utilisateur
Some checks failed
E2E Tests / e2e (push) Failing after 2m31s
Some checks failed
E2E Tests / e2e (push) Failing after 2m31s
This commit is contained in:
@@ -36,6 +36,42 @@ export async function deleteLore(request: APIRequestContext, loreId: string): Pr
|
||||
await request.delete(`/api/lores/${loreId}`).catch(() => undefined);
|
||||
}
|
||||
|
||||
export async function getLoreById(
|
||||
request: APIRequestContext,
|
||||
loreId: string,
|
||||
): Promise<{ id: string; name: string; description: string }> {
|
||||
const res = await request.get(`/api/lores/${loreId}`);
|
||||
expect(res.ok(), `GET /api/lores/${loreId} -> ${res.status()}`).toBeTruthy();
|
||||
return res.json();
|
||||
}
|
||||
|
||||
export async function getArcsForCampaign(
|
||||
request: APIRequestContext,
|
||||
campaignId: string,
|
||||
): Promise<Array<{ id: string; name: string; campaignId: string }>> {
|
||||
const res = await request.get(`/api/arcs?campaignId=${campaignId}`);
|
||||
expect(res.ok(), `GET /api/arcs -> ${res.status()}`).toBeTruthy();
|
||||
return res.json();
|
||||
}
|
||||
|
||||
export async function getChaptersForArc(
|
||||
request: APIRequestContext,
|
||||
arcId: string,
|
||||
): Promise<Array<{ id: string; name: string; arcId: string }>> {
|
||||
const res = await request.get(`/api/chapters?arcId=${arcId}`);
|
||||
expect(res.ok(), `GET /api/chapters -> ${res.status()}`).toBeTruthy();
|
||||
return res.json();
|
||||
}
|
||||
|
||||
export async function getScenesForChapter(
|
||||
request: APIRequestContext,
|
||||
chapterId: string,
|
||||
): Promise<Array<{ id: string; name: string; chapterId: string }>> {
|
||||
const res = await request.get(`/api/scenes?chapterId=${chapterId}`);
|
||||
expect(res.ok(), `GET /api/scenes -> ${res.status()}`).toBeTruthy();
|
||||
return res.json();
|
||||
}
|
||||
|
||||
export async function getTemplatesForLore(
|
||||
request: APIRequestContext,
|
||||
loreId: string,
|
||||
|
||||
Reference in New Issue
Block a user