ci: Increase Playwright test parallelism (#18484)

This commit is contained in:
shortstacked
2025-08-19 09:13:05 +01:00
committed by GitHub
parent 3386047321
commit e87395304d
15 changed files with 251 additions and 96 deletions

View File

@@ -16,7 +16,7 @@ export class WorkflowApiHelper {
}
async setActive(workflowId: string, active: boolean) {
const response = await this.api.request.patch(`/rest/workflows/${workflowId}`, {
const response = await this.api.request.patch(`/rest/workflows/${workflowId}?forceSave=true`, {
data: { active },
});
@@ -89,36 +89,4 @@ export class WorkflowApiHelper {
throw new TestError(`Execution did not complete within ${timeoutMs}ms`);
}
async triggerWebhook(
path: string,
options: { method?: 'GET' | 'POST'; data?: object; params?: Record<string, string> } = {},
) {
const { method = 'POST', data, params } = options;
let url = `/webhook/${path}`;
if (params && Object.keys(params).length > 0) {
const searchParams = new URLSearchParams(params);
url += `?${searchParams.toString()}`;
}
const requestOptions: Record<string, unknown> = {
headers: { 'Content-Type': 'application/json' },
};
if (data && method === 'POST') {
requestOptions.data = data;
}
const response =
method === 'GET'
? await this.api.request.get(url)
: await this.api.request.post(url, requestOptions);
if (!response.ok()) {
throw new TestError(`Webhook trigger failed: ${await response.text()}`);
}
return response;
}
}