1
0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-05-21 06:26:11 +02:00
penpot/frontend/playwright/helpers/MockRPC.js
2024-05-07 11:59:33 +02:00

8 lines
261 B
JavaScript

export const interceptRPC = (page, path, jsonFilename) =>
page.route(`**/api/rpc/command/${path}`, (route) =>
route.fulfill({
status: 200,
contentType: "application/transit+json",
path: `playwright/fixtures/${jsonFilename}`,
})
);