From cee3d6558f8b1ba9b4f4b4eef82fbaa180a32459 Mon Sep 17 00:00:00 2001 From: Rodrigo Silva Ferreira Date: Tue, 2 Dec 2025 18:10:15 -0500 Subject: [PATCH 1/4] e2e test - clear current url --- test/e2e/tests/apps/python-apps.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/e2e/tests/apps/python-apps.test.ts b/test/e2e/tests/apps/python-apps.test.ts index ef0a2990eea..42e0d33dd88 100644 --- a/test/e2e/tests/apps/python-apps.test.ts +++ b/test/e2e/tests/apps/python-apps.test.ts @@ -46,6 +46,18 @@ test.describe('Python Applications', { : editorFrameLocator.getByText('Hello World') ).toBeVisible({ timeout: 30000 }); }); + + await test.step('Verify Clear Current URL clears Viewer', async () => { + await app.workbench.quickaccess.runCommand('positron.preview.clear'); + + await expect(async () => { + const iframeLocator = app.web + ? viewer.viewerFrame.locator('iframe') + : viewer.getViewerFrame().locator('iframe'); + const count = await iframeLocator.count(); + expect(count).toBe(0); + }).toPass({ timeout: 30000 }); + }); }); test('Python - Verify Basic FastAPI App', { From 793ebade7346b0deb59fb4df4ed3d9f3ef60b231 Mon Sep 17 00:00:00 2001 From: Rodrigo Silva Ferreira <129895386+rodrigosf672@users.noreply.github.com> Date: Fri, 5 Dec 2025 16:07:24 -0500 Subject: [PATCH 2/4] Update clear command in Python app tests Signed-off-by: Rodrigo Silva Ferreira <129895386+rodrigosf672@users.noreply.github.com> --- test/e2e/tests/apps/python-apps.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/tests/apps/python-apps.test.ts b/test/e2e/tests/apps/python-apps.test.ts index 42e0d33dd88..3bf4ec8ecce 100644 --- a/test/e2e/tests/apps/python-apps.test.ts +++ b/test/e2e/tests/apps/python-apps.test.ts @@ -48,7 +48,7 @@ test.describe('Python Applications', { }); await test.step('Verify Clear Current URL clears Viewer', async () => { - await app.workbench.quickaccess.runCommand('positron.preview.clear'); + await app.workbench.locator('.codicon-clear-all').click(); await expect(async () => { const iframeLocator = app.web From 614bb4e8c79fc276b603ebc50d5dda08927ae8c9 Mon Sep 17 00:00:00 2001 From: Rodrigo Silva Ferreira <129895386+rodrigosf672@users.noreply.github.com> Date: Fri, 5 Dec 2025 16:32:17 -0500 Subject: [PATCH 3/4] Fix locator for clear current URL test Signed-off-by: Rodrigo Silva Ferreira <129895386+rodrigosf672@users.noreply.github.com> --- test/e2e/tests/apps/python-apps.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/tests/apps/python-apps.test.ts b/test/e2e/tests/apps/python-apps.test.ts index 3bf4ec8ecce..0cb2c39e529 100644 --- a/test/e2e/tests/apps/python-apps.test.ts +++ b/test/e2e/tests/apps/python-apps.test.ts @@ -48,7 +48,7 @@ test.describe('Python Applications', { }); await test.step('Verify Clear Current URL clears Viewer', async () => { - await app.workbench.locator('.codicon-clear-all').click(); + await app.page.locator('.codicon-clear-all').click(); await expect(async () => { const iframeLocator = app.web From 2e5f554c0c6f2e7bbbe8d0ae2927b3beb332d55c Mon Sep 17 00:00:00 2001 From: Rodrigo Silva Ferreira <129895386+rodrigosf672@users.noreply.github.com> Date: Fri, 5 Dec 2025 16:53:53 -0500 Subject: [PATCH 4/4] Add 'page' parameter to Dash app test Signed-off-by: Rodrigo Silva Ferreira <129895386+rodrigosf672@users.noreply.github.com> --- test/e2e/tests/apps/python-apps.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/tests/apps/python-apps.test.ts b/test/e2e/tests/apps/python-apps.test.ts index 0cb2c39e529..766fe647587 100644 --- a/test/e2e/tests/apps/python-apps.test.ts +++ b/test/e2e/tests/apps/python-apps.test.ts @@ -22,7 +22,7 @@ test.describe('Python Applications', { await app.workbench.viewer.clearViewer(); }); - test('Python - Verify Basic Dash App', { tag: [tags.WIN] }, async function ({ app, openFile, python }) { + test('Python - Verify Basic Dash App', { tag: [tags.WIN] }, async function ({ app, openFile, python, page }) { const viewer = app.workbench.viewer; await openFile(join('workspaces', 'python_apps', 'dash_example', 'dash_example.py'));