mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
📎 Add WebSocket mock
This commit is contained in:
8
frontend/playwright/helpers/MockRPC.js
Normal file
8
frontend/playwright/helpers/MockRPC.js
Normal file
@@ -0,0 +1,8 @@
|
||||
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}`,
|
||||
})
|
||||
);
|
||||
Reference in New Issue
Block a user