Add more login integration tests

This commit is contained in:
Eva Marco 2024-04-23 11:22:40 +02:00
parent 6fbdc4ff07
commit 106fe05657
4 changed files with 38 additions and 3 deletions

View file

@ -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}`,
});