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