Request uncompressed imports response in running import e2e test

This commit is contained in:
Gregor Vostrak
2026-11-26 18:04:59 +01:00
committed by Constantin Graf
parent 2395265845
commit c2814baf13

View File

@@ -238,7 +238,10 @@ test('test that a running import opens its step and does not block the navigatio
created_at: new Date().toISOString(),
};
await page.route(/\/api\/v1\/organizations\/[^/]+\/imports(\?.*)?$/, async (route) => {
const response = await route.fetch();
// Firefox accepts zstd, which the server uses but Playwright can not decode
const response = await route.fetch({
headers: { ...route.request().headers(), 'accept-encoding': 'identity' },
});
const json = await response.json();
json.data = [runningImport, ...json.data];
await route.fulfill({ response, json });