From 1c8741c8d5fda5ad6fd22ae140892805e9ef4f10 Mon Sep 17 00:00:00 2001 From: Christopher Mead Date: Thu, 12 Dec 2024 15:34:10 -0700 Subject: [PATCH 1/3] E2E Tests: Various new data explorer adjacent tests (#5721) Various new data explorer adjacent tests: * Python version of "make sure same instance of data explorer opens on reuse" * Python and R - check spaces in data frames in data explorer * getting variable details for large data frame shouldn't cause issues Also, skip a test where we are awaiting a bug fix Also, add some missing test tags @:data-explorer @:variables ### QA Notes All smoke tests should pass --- .../automation/src/positron/positronPopups.ts | 32 ++++++++-- .../src/positron/positronVariables.ts | 4 +- .../data-explorer-python-pandas.test.ts | 59 +++++++++++++++++++ .../data-explorer/data-explorer-r.test.ts | 25 +++++++- .../variables/variables-expanded.test.ts | 33 +++++++++-- 5 files changed, 142 insertions(+), 11 deletions(-) diff --git a/test/automation/src/positron/positronPopups.ts b/test/automation/src/positron/positronPopups.ts index 06cbf0af93e..fe5e32864a4 100644 --- a/test/automation/src/positron/positronPopups.ts +++ b/test/automation/src/positron/positronPopups.ts @@ -19,6 +19,8 @@ const NOTIFICATION_TOAST = '.notification-toast'; */ export class PositronPopups { + toastLocator = this.code.driver.getLocator(NOTIFICATION_TOAST); + constructor(private code: Code) { } async popupCurrentlyOpen() { @@ -78,14 +80,36 @@ export class PositronPopups { } async waitForToastToDisappear() { this.code.logger.log('Waiting for toast to be detacted'); - const toastLocator = this.code.driver.getLocator(NOTIFICATION_TOAST); - await toastLocator.waitFor({ state: 'detached', timeout: 20000 }); + await this.toastLocator.waitFor({ state: 'detached', timeout: 20000 }); } async waitForToastToAppear() { this.code.logger.log('Waiting for toast to be attached'); - const toastLocator = this.code.driver.getLocator(NOTIFICATION_TOAST); - await toastLocator.waitFor({ state: 'attached', timeout: 20000 }); + await this.toastLocator.waitFor({ state: 'attached', timeout: 20000 }); + } + + async verifyToastDoesNotAppear(timeoutMs: number = 3000): Promise { + const startTime = Date.now(); + + while (Date.now() - startTime < timeoutMs) { + const count = await this.toastLocator.count(); + if (count > 0) { + throw new Error('Toast appeared unexpectedly'); + } + + this.code.wait(1000); + } + + this.code.logger.log('Verified: Toast did not appear'); + } + + async closeAllToasts() { + const count = await this.toastLocator.count(); + this.code.logger.log(`Closing ${count} toasts`); + for (let i = 0; i < count; i++) { + await this.toastLocator.nth(i).hover(); + await this.code.driver.page.locator(`${NOTIFICATION_TOAST} .codicon-notifications-clear`).click(); + } } async waitForModalDialogBox() { diff --git a/test/automation/src/positron/positronVariables.ts b/test/automation/src/positron/positronVariables.ts index 96ca4dcc164..4be2f64134e 100644 --- a/test/automation/src/positron/positronVariables.ts +++ b/test/automation/src/positron/positronVariables.ts @@ -140,9 +140,9 @@ export class PositronVariables { async selectVariablesGroup(name: string) { await this.code.driver.page.locator(VARIABLES_GROUP_SELECTOR).click(); - await this.code.driver.page.locator('a.action-menu-item', { hasText: name }).isVisible(); + await this.code.driver.page.locator('a.action-menu-item', { hasText: name }).first().isVisible(); await this.code.wait(500); - await this.code.driver.page.locator('a.action-menu-item', { hasText: name }).click(); + await this.code.driver.page.locator('a.action-menu-item', { hasText: name }).first().click(); } async clickDatabaseIconForVariableRow(rowName: string) { diff --git a/test/e2e/features/data-explorer/data-explorer-python-pandas.test.ts b/test/e2e/features/data-explorer/data-explorer-python-pandas.test.ts index 837b5faabaa..f4e21183f8d 100644 --- a/test/e2e/features/data-explorer/data-explorer-python-pandas.test.ts +++ b/test/e2e/features/data-explorer/data-explorer-python-pandas.test.ts @@ -179,5 +179,64 @@ df2 = pd.DataFrame(data)`; }).toPass({ timeout: 60000 }); await app.workbench.positronLayouts.enterLayout('stacked'); + await app.workbench.positronDataExplorer.closeDataExplorer(); + }); + + test('Python - Open Data Explorer for the second time brings focus back [C1078833]', async function ({ app, python }) { + + const script = `import pandas as pd +from pydataset import data +Data_Frame = data('mtcars')`; + await app.workbench.positronConsole.executeCode('Python', script, '>>>'); + await app.workbench.quickaccess.runCommand('workbench.panel.positronVariables.focus'); + + if (app.web) { + await app.workbench.positronVariables.selectVariablesGroup(`${process.env.POSITRON_PY_VER_SEL!}`); + } + + await expect(async () => { + await app.workbench.positronVariables.doubleClickVariableRow('Data_Frame'); + await app.code.driver.getLocator('.label-name:has-text("Data: Data_Frame")').innerText(); + }).toPass(); + + // Now move focus out of the the data explorer pane + await app.workbench.editors.newUntitledFile(); + await app.workbench.quickaccess.runCommand('workbench.panel.positronVariables.focus'); + await app.workbench.positronVariables.doubleClickVariableRow('Data_Frame'); + + await expect(async () => { + await app.code.driver.getLocator('.label-name:has-text("Data: Data_Frame")').innerText(); + }).toPass(); + + await app.workbench.positronDataExplorer.closeDataExplorer(); + await app.workbench.quickaccess.runCommand('workbench.panel.positronVariables.focus'); + }); + + test('Python - Check blank spaces in data explorer [C1078835]', async function ({ app, python }) { + + const script = `import pandas as pd +df = pd.DataFrame({'x': ["a ", "a", " ", ""]})`; + await app.workbench.positronConsole.executeCode('Python', script, '>>>'); + + if (app.web) { + await app.workbench.positronVariables.selectVariablesGroup(`${process.env.POSITRON_PY_VER_SEL!}`); + } + + await expect(async () => { + await app.workbench.positronVariables.doubleClickVariableRow('df'); + await app.code.driver.getLocator('.label-name:has-text("Data: df")').innerText(); + }).toPass(); + + await expect(async () => { + const tableData = await app.workbench.positronDataExplorer.getDataExplorerTableData(); + + expect(tableData[0]).toStrictEqual({ 'x': 'a·' }); + expect(tableData[1]).toStrictEqual({ 'x': 'a' }); + expect(tableData[2]).toStrictEqual({ 'x': '···' }); + expect(tableData[3]).toStrictEqual({ 'x': '' }); + expect(tableData.length).toBe(4); + }).toPass({ timeout: 60000 }); + + await app.workbench.positronDataExplorer.closeDataExplorer(); }); }); diff --git a/test/e2e/features/data-explorer/data-explorer-r.test.ts b/test/e2e/features/data-explorer/data-explorer-r.test.ts index 0772ceafc49..1c6665738bd 100644 --- a/test/e2e/features/data-explorer/data-explorer-r.test.ts +++ b/test/e2e/features/data-explorer/data-explorer-r.test.ts @@ -76,8 +76,11 @@ test.describe('Data Explorer - R ', { }); - test('R - Open Data Explorer for the second time brings focus back [C701143]', async function ({ app, r }) { + test.skip('R - Open Data Explorer for the second time brings focus back [C701143]', { + annotation: [{ type: 'issue', description: 'https://github.com/posit-dev/positron/issues/5714' }] + }, async function ({ app, r }) { // Regression test for https://github.com/posit-dev/positron/issues/4197 + // and https://github.com/posit-dev/positron/issues/5714 const script = `Data_Frame <- mtcars`; await app.workbench.positronConsole.executeCode('R', script, '>'); await app.workbench.quickaccess.runCommand('workbench.panel.positronVariables.focus'); @@ -99,4 +102,24 @@ test.describe('Data Explorer - R ', { await app.workbench.positronDataExplorer.closeDataExplorer(); await app.workbench.quickaccess.runCommand('workbench.panel.positronVariables.focus'); }); + + test('R - Check blank spaces in data explorer [C1078834]', async function ({ app, r }) { + const script = `df = data.frame(x = c("a ", "a", " ", ""))`; + await app.workbench.positronConsole.executeCode('R', script, '>'); + + await expect(async () => { + await app.workbench.positronVariables.doubleClickVariableRow('df'); + await app.code.driver.getLocator('.label-name:has-text("Data: df")').innerText(); + }).toPass(); + + await expect(async () => { + const tableData = await app.workbench.positronDataExplorer.getDataExplorerTableData(); + + expect(tableData[0]).toStrictEqual({ 'x': 'a·' }); + expect(tableData[1]).toStrictEqual({ 'x': 'a' }); + expect(tableData[2]).toStrictEqual({ 'x': '···' }); + expect(tableData[3]).toStrictEqual({ 'x': '' }); + expect(tableData.length).toBe(4); + }).toPass({ timeout: 60000 }); + }); }); diff --git a/test/e2e/features/variables/variables-expanded.test.ts b/test/e2e/features/variables/variables-expanded.test.ts index 0bccaeae186..f860d5e8ada 100644 --- a/test/e2e/features/variables/variables-expanded.test.ts +++ b/test/e2e/features/variables/variables-expanded.test.ts @@ -10,20 +10,45 @@ test.use({ }); test.describe('Variables - Expanded View', { tag: [tags.WEB, tags.VARIABLES] }, () => { - test.beforeEach(async function ({ app, python }) { - await app.workbench.positronConsole.executeCode('Python', script, '>>>'); - await app.workbench.positronLayouts.enterLayout('fullSizedAuxBar'); + + test.afterEach(async function ({ app }) { + await app.workbench.positronLayouts.enterLayout('stacked'); + await app.workbench.positronConsole.barRestartButton.click(); }); - test('Python - should display children values and types when variable is expanded', async function ({ app }) { + test('Python - should display children values and types when variable is expanded [C1078836]', async function ({ app, python }) { const variables = app.workbench.positronVariables; + await app.workbench.positronConsole.executeCode('Python', script, '>>>'); + await app.workbench.positronLayouts.enterLayout('fullSizedAuxBar'); + await variables.expandVariable('df'); for (const variable of Object.keys(expectedData)) { const actualData = await variables.getVariableChildren(variable); expect(actualData).toEqual(expectedData[variable]); } }); + + test('R - getting large dataframe children should not cause problems [C1078837]', async function ({ app, r }) { + const variables = app.workbench.positronVariables; + + // workaround for https://github.com/posit-dev/positron/issues/5718 + await app.workbench.positronPopups.closeAllToasts(); + + await app.workbench.positronConsole.executeCode('R', 'df2 <- data.frame(b=rep(1:1000000))', '>'); + await app.workbench.positronLayouts.enterLayout('fullSizedAuxBar'); + + await variables.expandVariable('df2'); + const children = await variables.getVariableChildren('b', false); + + await app.workbench.positronPopups.verifyToastDoesNotAppear(); + + const childrenArray = Object.values(children); + + for (let i = 0; i < 10; i++) { + expect(childrenArray[i]).toEqual({ type: '', value: (i + 1).toString() }); + } + }); }); const script = ` From cff3f123e772839f0667143da278307c1f3482d4 Mon Sep 17 00:00:00 2001 From: Jon Vanausdeln Date: Thu, 12 Dec 2024 16:01:13 -0800 Subject: [PATCH 2/3] Added more windows tests(#5719) ### Intent Turns on more test in windows CI ### QA Notes Passes in CI --- test/e2e/features/apps/shiny.test.ts | 2 +- .../e2e/features/console/console-ansi.test.ts | 2 +- .../console/console-clipboard.test.ts | 2 +- .../data-explorer-headless.test.ts | 2 +- .../features/editor/fast-execution.test.ts | 2 +- test/e2e/features/help/help.test.ts | 6 +++--- test/e2e/features/layouts/layouts.test.ts | 2 +- .../new-project-python.test.ts | 20 ++++++++----------- .../new-project-r-jupyter.test.ts | 8 ++++---- .../notebook/notebook-large-python.test.ts | 2 +- 10 files changed, 22 insertions(+), 26 deletions(-) diff --git a/test/e2e/features/apps/shiny.test.ts b/test/e2e/features/apps/shiny.test.ts index 921817d6b5d..2cfd864aa38 100644 --- a/test/e2e/features/apps/shiny.test.ts +++ b/test/e2e/features/apps/shiny.test.ts @@ -10,7 +10,7 @@ test.use({ suiteId: __filename }); -test.describe('Shiny Application', { tag: [tags.APPS, tags.VIEWER] }, () => { +test.describe('Shiny Application', { tag: [tags.APPS, tags.VIEWER, tags.WIN] }, () => { test.beforeAll(async function ({ app }) { try { await app.workbench.extensions.installExtension('posit.shiny', true); diff --git a/test/e2e/features/console/console-ansi.test.ts b/test/e2e/features/console/console-ansi.test.ts index b1759185538..dbdf8fd440b 100644 --- a/test/e2e/features/console/console-ansi.test.ts +++ b/test/e2e/features/console/console-ansi.test.ts @@ -10,7 +10,7 @@ test.use({ suiteId: __filename }); -test.describe('Console ANSI styling', { tag: [tags.CRITICAL, tags.CONSOLE] }, () => { +test.describe('Console ANSI styling', { tag: [tags.CRITICAL, tags.CONSOLE, tags.WIN] }, () => { test.beforeEach(async function ({ app }) { await app.workbench.positronLayouts.enterLayout('fullSizedPanel'); }); diff --git a/test/e2e/features/console/console-clipboard.test.ts b/test/e2e/features/console/console-clipboard.test.ts index ed96ecbfc47..a985d36c5c4 100644 --- a/test/e2e/features/console/console-clipboard.test.ts +++ b/test/e2e/features/console/console-clipboard.test.ts @@ -11,7 +11,7 @@ test.use({ suiteId: __filename }); -test.describe('Console - Clipboard', { tag: [tags.CONSOLE] }, () => { +test.describe('Console - Clipboard', { tag: [tags.CONSOLE, tags.WIN] }, () => { test('Python - Copy from console & paste to console [C608100]', async function ({ app, python }) { await testBody(app); }); diff --git a/test/e2e/features/data-explorer/data-explorer-headless.test.ts b/test/e2e/features/data-explorer/data-explorer-headless.test.ts index f9a6eac1cf2..6b98716e42f 100644 --- a/test/e2e/features/data-explorer/data-explorer-headless.test.ts +++ b/test/e2e/features/data-explorer/data-explorer-headless.test.ts @@ -12,7 +12,7 @@ test.use({ }); test.describe('Headless Data Explorer - Large Data Frame', { - tag: [tags.WEB, tags.DATA_EXPLORER, tags.DUCK_DB] + tag: [tags.WEB, tags.DATA_EXPLORER, tags.DUCK_DB, tags.WIN] }, () => { // python fixture not actually needed but serves as a long wait so that we can be sure // headless/duckdb open will work diff --git a/test/e2e/features/editor/fast-execution.test.ts b/test/e2e/features/editor/fast-execution.test.ts index 82265472278..54f62ade047 100644 --- a/test/e2e/features/editor/fast-execution.test.ts +++ b/test/e2e/features/editor/fast-execution.test.ts @@ -12,7 +12,7 @@ test.use({ const FILENAME = 'fast-execution.r'; -test.describe('R Fast Execution', { tag: [tags.WEB, tags.EDITOR] }, () => { +test.describe('R Fast Execution', { tag: [tags.WEB, tags.EDITOR, tags.WIN] }, () => { test('Verify fast execution is not out of order [C712539]', async function ({ app, r }) { await app.workbench.quickaccess.openFile(join(app.workspacePathOrFolder, 'workspaces', 'fast-statement-execution', FILENAME)); diff --git a/test/e2e/features/help/help.test.ts b/test/e2e/features/help/help.test.ts index e7d710b6928..a86d2469fc6 100644 --- a/test/e2e/features/help/help.test.ts +++ b/test/e2e/features/help/help.test.ts @@ -11,7 +11,7 @@ test.use({ test.describe('Help', { tag: [tags.HELP] }, () => { - test('Python - Verifies basic help functionality [C633814]', async function ({ app, python }) { + test('Python - Verifies basic help functionality [C633814]', { tag: [tags.WIN] }, async function ({ app, python }) { await app.workbench.positronConsole.executeCode('Python', `?load`, '>>>'); await expect(async () => { @@ -21,7 +21,7 @@ test.describe('Help', { tag: [tags.HELP] }, () => { }); - test('R - Verifies basic help functionality [C633813]', async function ({ app, r }) { + test('R - Verifies basic help functionality [C633813]', { tag: [tags.WIN] }, async function ({ app, r }) { await app.workbench.positronConsole.executeCode('R', `?load()`, '>'); await expect(async () => { @@ -32,7 +32,7 @@ test.describe('Help', { tag: [tags.HELP] }, () => { }); test('Verifies help panel can be opened when empty and also can be resized smaller and remember resize height [C640934]', async function ({ app, logger }) { - + // Not running on windows as the size calculation is off for the resolution in CI const positronHelp = app.workbench.positronHelp; const helpContainerLocator = positronHelp.getHelpContainer(); const helpPanelHeaderLocator = positronHelp.getHelpHeader(); diff --git a/test/e2e/features/layouts/layouts.test.ts b/test/e2e/features/layouts/layouts.test.ts index 8d08990e1be..9cb25bb6fc0 100644 --- a/test/e2e/features/layouts/layouts.test.ts +++ b/test/e2e/features/layouts/layouts.test.ts @@ -9,7 +9,7 @@ test.use({ suiteId: __filename }); -test.describe('Layouts', { tag: [tags.WEB, tags.LAYOUTS] }, () => { +test.describe('Layouts', { tag: [tags.WEB, tags.LAYOUTS, tags.WIN] }, () => { test.describe('Stacked Layout', () => { diff --git a/test/e2e/features/new-project-wizard/new-project-python.test.ts b/test/e2e/features/new-project-wizard/new-project-python.test.ts index 42e61411100..09f08132708 100644 --- a/test/e2e/features/new-project-wizard/new-project-python.test.ts +++ b/test/e2e/features/new-project-wizard/new-project-python.test.ts @@ -14,6 +14,7 @@ test.beforeEach(async function ({ app }) { await app.workbench.positronConsole.waitForReadyOrNoInterpreter(); }); +// Not running conda test on windows becuase conda reeks havoc on selecting the correct python interpreter test.describe('Python - New Project Wizard', { tag: [tags.NEW_PROJECT_WIZARD] }, () => { const defaultProjectName = 'my-python-project'; @@ -43,7 +44,7 @@ test.describe('Python - New Project Wizard', { tag: [tags.NEW_PROJECT_WIZARD] }, await app.workbench.quickaccess.runCommand('workbench.action.toggleAuxiliaryBar'); }); - test('Create a new Venv environment [C627912]', { tag: [tags.CRITICAL] }, async function ({ app, page }) { + test('Create a new Venv environment [C627912]', { tag: [tags.CRITICAL, tags.WIN] }, async function ({ app, page }) { // This is the default behavior for a new Python Project in the Project Wizard const projSuffix = addRandomNumSuffix('_new_venv'); const pw = app.workbench.positronNewProjectWizard; @@ -54,15 +55,13 @@ test.describe('Python - New Project Wizard', { tag: [tags.NEW_PROJECT_WIZARD] }, await pw.navigate(ProjectWizardNavigateAction.CREATE); await pw.currentOrNewWindowSelectionModal.currentWindowButton.click(); await expect(page.getByRole('button', { name: `Explorer Section: ${defaultProjectName + projSuffix}` })).toBeVisible({ timeout: 20000 }); - await expect(app.workbench.positronConsole.activeConsole.getByText('>>>')).toBeVisible({ timeout: 45000 }); + await expect(app.workbench.positronConsole.activeConsole.getByText('>>>')).toBeVisible({ timeout: 100000 }); await app.workbench.quickaccess.runCommand('workbench.action.toggleAuxiliaryBar'); await app.workbench.positronConsole.barClearButton.click(); await app.workbench.quickaccess.runCommand('workbench.action.toggleAuxiliaryBar'); }); - test.skip('With ipykernel already installed [C609619]', { - annotation: [{ type: 'issue', description: 'https://github.com/posit-dev/positron/issues/5286' }] - }, async function ({ app, page, python }) { + test('With ipykernel already installed [C609619]', { tag: [tags.WIN] }, async function ({ app, page, python }) { const projSuffix = addRandomNumSuffix('_ipykernelInstalled'); const pw = app.workbench.positronNewProjectWizard; const pythonFixtures = new PositronPythonFixtures(app); @@ -94,12 +93,10 @@ test.describe('Python - New Project Wizard', { tag: [tags.NEW_PROJECT_WIZARD] }, await pw.navigate(ProjectWizardNavigateAction.CREATE); await pw.currentOrNewWindowSelectionModal.currentWindowButton.click(); await expect(page.getByRole('button', { name: `Explorer Section: ${defaultProjectName + projSuffix}` })).toBeVisible({ timeout: 20000 }); - await expect(app.workbench.positronConsole.activeConsole.getByText('>>>')).toBeVisible({ timeout: 45000 }); + await expect(app.workbench.positronConsole.activeConsole.getByText('>>>')).toBeVisible({ timeout: 90000 }); }); - test.skip('With ipykernel not already installed [C609617]', { - annotation: [{ type: 'issue', description: 'https://github.com/posit-dev/positron/issues/5286' }] - }, async function ({ app, page }) { + test('With ipykernel not already installed [C609617]', { tag: [tags.WIN] }, async function ({ app, page }) { const projSuffix = addRandomNumSuffix('_noIpykernel'); const pw = app.workbench.positronNewProjectWizard; const pythonFixtures = new PositronPythonFixtures(app); @@ -143,7 +140,7 @@ test.describe('Python - New Project Wizard', { tag: [tags.NEW_PROJECT_WIZARD] }, // If ipykernel was successfully installed during the new project initialization, // the console should be ready without any prompts to install ipykernel - await expect(app.workbench.positronConsole.activeConsole.getByText('>>>')).toBeVisible({ timeout: 45000 }); + await expect(app.workbench.positronConsole.activeConsole.getByText('>>>')).toBeVisible({ timeout: 90000 }); await app.workbench.quickaccess.runCommand('workbench.action.toggleAuxiliaryBar'); await app.workbench.positronConsole.barClearButton.click(); await app.workbench.quickaccess.runCommand('workbench.action.toggleAuxiliaryBar'); @@ -165,7 +162,7 @@ test.describe('Python - New Project Wizard', { tag: [tags.NEW_PROJECT_WIZARD] }, // Open the new project in the current window and wait for the console to be ready await pw.currentOrNewWindowSelectionModal.currentWindowButton.click(); await expect(page.getByRole('button', { name: `Explorer Section: ${defaultProjectName + projSuffix}` })).toBeVisible({ timeout: 20000 }); - await expect(app.workbench.positronConsole.activeConsole.getByText('>>>')).toBeVisible({ timeout: 45000 }); + await expect(app.workbench.positronConsole.activeConsole.getByText('>>>')).toBeVisible({ timeout: 90000 }); // Verify git-related files are present await expect(async () => { @@ -186,4 +183,3 @@ test.describe('Python - New Project Wizard', { tag: [tags.NEW_PROJECT_WIZARD] }, function addRandomNumSuffix(name: string): string { return `${name}_${Math.floor(Math.random() * 1000000)}`; } - diff --git a/test/e2e/features/new-project-wizard/new-project-r-jupyter.test.ts b/test/e2e/features/new-project-wizard/new-project-r-jupyter.test.ts index c96cba1f260..b06f013a14f 100644 --- a/test/e2e/features/new-project-wizard/new-project-r-jupyter.test.ts +++ b/test/e2e/features/new-project-wizard/new-project-r-jupyter.test.ts @@ -35,7 +35,7 @@ test.describe('R - New Project Wizard', { tag: [tags.NEW_PROJECT_WIZARD] }, () = // here, but it's timing out in CI, so it is not included for now. }); - test('R - Accept Renv install [C633084]', async function ({ app, r }) { + test('R - Accept Renv install [C633084]', { tag: [tags.WIN] }, async function ({ app, r }) { const projSuffix = addRandomNumSuffix('_installRenv'); const pw = app.workbench.positronNewProjectWizard; // Create a new R project - select Renv and install @@ -78,7 +78,7 @@ test.describe('R - New Project Wizard', { tag: [tags.NEW_PROJECT_WIZARD] }, () = ); }); - test('R - Renv already installed [C656251]', async function ({ app }) { + test('R - Renv already installed [C656251]', { tag: [tags.WIN] }, async function ({ app }) { // Renv will already be installed from the previous test - which is why tests are marked as "serial" const projSuffix = addRandomNumSuffix('_renvAlreadyInstalled'); const pw = app.workbench.positronNewProjectWizard; @@ -104,7 +104,7 @@ test.describe('R - New Project Wizard', { tag: [tags.NEW_PROJECT_WIZARD] }, () = ); }); - test('R - Cancel Renv install [C656252]', async function ({ app }) { + test('R - Cancel Renv install [C656252]', { tag: [tags.WIN] }, async function ({ app }) { const projSuffix = addRandomNumSuffix('_cancelRenvInstall'); const pw = app.workbench.positronNewProjectWizard; // Remove renv package so we are prompted to install it again @@ -138,7 +138,7 @@ test.describe('R - New Project Wizard', { tag: [tags.NEW_PROJECT_WIZARD] }, () = test.describe('Jupyter - New Project Wizard', () => { const defaultProjectName = 'my-jupyter-notebook'; - test('Jupyter Project Defaults [C629352]', { tag: [tags.CRITICAL] }, async function ({ app }) { + test('Jupyter Project Defaults [C629352]', { tag: [tags.CRITICAL, tags.WIN] }, async function ({ app }) { const projSuffix = addRandomNumSuffix('_defaults'); const pw = app.workbench.positronNewProjectWizard; await pw.startNewProject(ProjectType.JUPYTER_NOTEBOOK); diff --git a/test/e2e/features/notebook/notebook-large-python.test.ts b/test/e2e/features/notebook/notebook-large-python.test.ts index 6e1b862b158..61d875dcb59 100644 --- a/test/e2e/features/notebook/notebook-large-python.test.ts +++ b/test/e2e/features/notebook/notebook-large-python.test.ts @@ -13,7 +13,7 @@ test.use({ // Note that this test is too heavy to pass on web and windows test.describe('Large Python Notebook', { - tag: [tags.NOTEBOOK] + tag: [tags.NOTEBOOK, tags.WIN] }, () => { test('Python - Large notebook execution [C983592]', async function ({ app, python }) { From 2584800577538ddbfe83fc22b9002a87b6ae643e Mon Sep 17 00:00:00 2001 From: Christopher Mead Date: Fri, 13 Dec 2024 07:57:03 -0700 Subject: [PATCH 3/3] E2E Test: modify duckdb tests to leverage retries (#5725) Removing some "sleeps" that were in place before https://github.com/posit-dev/positron/issues/5655 was implemented ### QA Notes All smoke tests should pass --- .../e2e/features/data-explorer/data-explorer-headless.test.ts | 4 +--- test/e2e/features/data-explorer/duckdb-sparklines.test.ts | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/test/e2e/features/data-explorer/data-explorer-headless.test.ts b/test/e2e/features/data-explorer/data-explorer-headless.test.ts index 6b98716e42f..38817eefeda 100644 --- a/test/e2e/features/data-explorer/data-explorer-headless.test.ts +++ b/test/e2e/features/data-explorer/data-explorer-headless.test.ts @@ -14,9 +14,7 @@ test.use({ test.describe('Headless Data Explorer - Large Data Frame', { tag: [tags.WEB, tags.DATA_EXPLORER, tags.DUCK_DB, tags.WIN] }, () => { - // python fixture not actually needed but serves as a long wait so that we can be sure - // headless/duckdb open will work - test.beforeEach(async function ({ app, python }) { + test.beforeEach(async function ({ app }) { await app.workbench.positronLayouts.enterLayout('stacked'); }); diff --git a/test/e2e/features/data-explorer/duckdb-sparklines.test.ts b/test/e2e/features/data-explorer/duckdb-sparklines.test.ts index a30919d1f7e..cddfe766dad 100644 --- a/test/e2e/features/data-explorer/duckdb-sparklines.test.ts +++ b/test/e2e/features/data-explorer/duckdb-sparklines.test.ts @@ -13,9 +13,7 @@ test.use({ test.describe('Data Explorer - DuckDB Column Summary', { tag: [tags.WEB, tags.WIN, tags.CRITICAL, tags.DATA_EXPLORER, tags.DUCK_DB] }, () => { - // python fixture not actually needed but serves as a long wait so that we can be sure - // headless/duckdb open will work - test('Verifies basic duckdb column summary functionality [C1053635]', async function ({ app, python }) { + test('Verifies basic duckdb column summary functionality [C1053635]', async function ({ app }) { await app.workbench.positronQuickaccess.openDataFile(join(app.workspacePathOrFolder, 'data-files', '100x100', '100x100.parquet'));