mirror of
https://github.com/penpot/penpot.git
synced 2025-05-17 21:16:11 +02:00
✨ Add more login integration tests
This commit is contained in:
parent
6fbdc4ff07
commit
106fe05657
4 changed files with 38 additions and 3 deletions
|
@ -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}`,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue