mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 07:06:10 +02:00
📎 Add WebSocket mock
This commit is contained in:
parent
38e35fb5ae
commit
30321e54f0
11 changed files with 589 additions and 24 deletions
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}`,
|
||||
})
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue