mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
✨ Add more login integration tests
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
export const interceptRPC = async (page, path, jsonFilename) => {
|
||||
export const interceptRPC = async (page, path, jsonFilename, options = {}) => {
|
||||
const interceptConfig = {
|
||||
status: 200,
|
||||
...options
|
||||
};
|
||||
|
||||
await page.route(`**/api/rpc/command/${path}`, (route) => {
|
||||
route.fulfill({
|
||||
status: 200,
|
||||
...interceptConfig,
|
||||
contentType: "application/transit+json",
|
||||
path: `playwright/fixtures/${jsonFilename}`,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user