Improve playwright helper

This commit is contained in:
Matthias 2024-04-07 19:53:26 +02:00
parent 1a120cfe30
commit 2937aac847

View File

@ -30,6 +30,12 @@ export async function defaultMocks(page: Page) {
await page.route('**/api/v1/ping', (route) => {
return route.fulfill({ path: './cypress/fixtures/ping.json' });
});
await page.route('**/api/v1/show_config', (route) => {
return route.fulfill({ path: './cypress/fixtures/show_config.json' });
});
await page.route('**/api/v1/pair_candles?*', (route) => {
return route.fulfill({ path: './cypress/fixtures/pair_candles_btc_1m.json' });
});
}
export function getWaitForResponse(page: Page, url: string) {