From c8c42a6e7dbb97eb464c62e6316cc1683f94fbfd Mon Sep 17 00:00:00 2001 From: rldhont Date: Sat, 1 Feb 2025 16:42:47 +0100 Subject: [PATCH] Docstring to save response to file for mocking --- .../playwright/print_in_project_projection.spec.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/end2end/playwright/print_in_project_projection.spec.js b/tests/end2end/playwright/print_in_project_projection.spec.js index 8435a8349c..c69f31bdbc 100644 --- a/tests/end2end/playwright/print_in_project_projection.spec.js +++ b/tests/end2end/playwright/print_in_project_projection.spec.js @@ -3,6 +3,14 @@ import * as path from 'path'; import { test, expect } from '@playwright/test'; import { gotoMap, expectParametersToContain } from './globals'; +/** + * To save request response in a file for mocking + * + * const downloadPromise = page.waitForEvent('download'); + * const download = await downloadPromise; + * await download.saveAs(path.join(__dirname, 'mock/print_in_project_projection/baselayer/Paysage_A4.pdf')); + */ + test.describe('Print in project projection', () => { test.beforeEach(async ({ page }) => {