From 443ffd84b2e8e0433c49b055a077ede97063bc1d Mon Sep 17 00:00:00 2001 From: Chris Mead Date: Mon, 13 Jan 2025 12:52:02 -0700 Subject: [PATCH] e2e tests: enable some web viewer tests --- test/e2e/tests/viewer/viewer.test.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/test/e2e/tests/viewer/viewer.test.ts b/test/e2e/tests/viewer/viewer.test.ts index 747900eef4a..343e35dcbea 100644 --- a/test/e2e/tests/viewer/viewer.test.ts +++ b/test/e2e/tests/viewer/viewer.test.ts @@ -15,7 +15,7 @@ test.describe('Viewer', { tag: [tags.VIEWER] }, () => { await app.workbench.viewer.clearViewer(); }); - test('Python - Verify Viewer functionality with webbrowser [C784887]', async function ({ app, page, logger, python }) { + test('Python - Verify Viewer functionality with webbrowser [C784887]', { tag: [tags.WEB] }, async function ({ app, page, logger, python }) { logger.log('Sending code to console'); await app.workbench.console.pasteCodeToConsole(pythonScript); await app.workbench.console.sendEnterKey(); @@ -23,7 +23,7 @@ test.describe('Viewer', { tag: [tags.VIEWER] }, () => { await theDoc.waitFor({ state: 'attached' }); }); - test('Python - Verify Viewer functionality with great-tables [C784888]', async function ({ app, logger, python }) { + test('Python - Verify Viewer functionality with great-tables [C784888]', { tag: [tags.WEB] }, async function ({ app, logger, python }) { // extra clean up - https://github.com/posit-dev/positron/issues/4604 // without this, on ubuntu, the Enter key send to the console @@ -41,15 +41,22 @@ test.describe('Viewer', { tag: [tags.VIEWER] }, () => { }); - test('R - Verify Viewer functionality with modelsummary [C784889]', async function ({ app, logger, r }) { + test('R - Verify Viewer functionality with modelsummary [C784889]', { tag: [tags.WEB] }, async function ({ app, logger, r }) { logger.log('Sending code to console'); await app.workbench.console.executeCode('R', rModelSummaryScript, '>'); - const billDepthLocator = app.workbench.viewer.getViewerLocator('tr').filter({ hasText: 'bill_depth_mm' }); + let billDepthLocator; + if (!app.web) { + billDepthLocator = app.workbench.viewer.getViewerLocator('tr').filter({ hasText: 'bill_depth_mm' }); + } else { + billDepthLocator = app.workbench.viewer.viewerFrame.frameLocator('iframe').locator('tr').filter({ hasText: 'bill_depth_mm' }); + } await billDepthLocator.waitFor({ state: 'attached' }); }); - test('R - Verify Viewer functionality with reactable [C784930]', async function ({ app, logger, r }) { + test('R - Verify Viewer functionality with reactable [C784930]', { + annotation: [{ type: 'web issue', description: 'https://github.com/posit-dev/positron/issues/5972' }] + }, async function ({ app, logger, r }) { logger.log('Sending code to console'); await app.workbench.console.executeCode('R', rReactableScript, '>'); @@ -60,7 +67,9 @@ test.describe('Viewer', { tag: [tags.VIEWER] }, () => { }); - test('R - Verify Viewer functionality with reprex [C784931]', async function ({ app, logger, r }) { + test('R - Verify Viewer functionality with reprex [C784931]', { + annotation: [{ type: 'web issue', description: 'https://github.com/posit-dev/positron/issues/5975' }] + }, async function ({ app, logger, r }) { logger.log('Sending code to console'); await app.workbench.console.executeCode('R', rReprexScript, '>');