mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
9 lines
282 B
JavaScript
9 lines
282 B
JavaScript
export const interceptRPC = async (page, path, jsonFilename) => {
|
|
await page.route(`**/api/rpc/command/${path}`, (route) => {
|
|
route.fulfill({
|
|
status: 200,
|
|
contentType: "application/transit+json",
|
|
path: `playwright/fixtures/${jsonFilename}`,
|
|
});
|
|
});
|
|
};
|