From 9f4103499d3d514d4b1512073e2cc01adba324ce Mon Sep 17 00:00:00 2001 From: Chris Mead Date: Fri, 14 Feb 2025 12:32:33 -0700 Subject: [PATCH 1/5] E2E test: remove ipykernel from primary interpreters --- .github/actions/install-python/action.yml | 3 +-- .github/workflows/test-e2e-windows.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/actions/install-python/action.yml b/.github/actions/install-python/action.yml index d72f3d616f8..577d5f85c6d 100644 --- a/.github/actions/install-python/action.yml +++ b/.github/actions/install-python/action.yml @@ -14,7 +14,6 @@ runs: curl https://raw.githubusercontent.com/posit-dev/qa-example-content/main/requirements.txt --output requirements.txt python3 -m pip install --upgrade pip python3 -m pip install -r requirements.txt - python3 -m pip install ipykernel - name: Verify Python Version shell: bash @@ -51,7 +50,7 @@ runs: PYTHON_ALTERNATE_VERSION="${{ inputs.alternate_version }}" echo "Installing Python version $PYTHON_ALTERNATE_VERSION using pyenv..." pyenv install -s "$PYTHON_ALTERNATE_VERSION" - + pyenv versions pyenv global "$PYTHON_ALTERNATE_VERSION" diff --git a/.github/workflows/test-e2e-windows.yml b/.github/workflows/test-e2e-windows.yml index 0063b75cbad..0c921e1b641 100644 --- a/.github/workflows/test-e2e-windows.yml +++ b/.github/workflows/test-e2e-windows.yml @@ -108,7 +108,7 @@ jobs: curl https://raw.githubusercontent.com/posit-dev/qa-example-content/main/requirements.txt --output requirements.txt python -m pip install --upgrade pip python -m pip install -r requirements.txt - python -m pip install ipykernel trcli + python -m pip install trcli # Alternate python version - name: Install Python 3.13.0 From 6413892125fba4618b58c2163f06373fa9b64753 Mon Sep 17 00:00:00 2001 From: Chris Mead Date: Tue, 18 Feb 2025 08:19:05 -0700 Subject: [PATCH 2/5] allow retries --- test/e2e/pages/newProjectWizard.ts | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/test/e2e/pages/newProjectWizard.ts b/test/e2e/pages/newProjectWizard.ts index 5ea4f7b5153..b1e91143ac5 100644 --- a/test/e2e/pages/newProjectWizard.ts +++ b/test/e2e/pages/newProjectWizard.ts @@ -151,12 +151,20 @@ export class NewProjectWizard { } // Open the dropdown and select the interpreter by path - await this.interpreterDropdown.click(); - await this.dropDropdownOptions - .locator('div.dropdown-entry-subtitle') - .getByText(interpreterPath) - .first() - .click(); + await expect(async () => { + + try { + await this.interpreterDropdown.click(); + await this.dropDropdownOptions + .locator('div.dropdown-entry-subtitle') + .getByText(interpreterPath) + .first() + .click({ timeout: 5000 }); + } catch (error) { + await this.code.driver.page.keyboard.press('Escape'); + } + + }).toPass({ intervals: [1_000, 5_000, 10_000], timeout: 15000 }); } } From f355abaee7b48352de82e8cfd354b286c67c9089 Mon Sep 17 00:00:00 2001 From: Chris Mead Date: Tue, 18 Feb 2025 11:41:41 -0700 Subject: [PATCH 3/5] remove defunct case --- test/e2e/pages/newProjectWizard.ts | 1 + .../new-project-python.test.ts | 21 ++----------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/test/e2e/pages/newProjectWizard.ts b/test/e2e/pages/newProjectWizard.ts index b1e91143ac5..81f4c76d66c 100644 --- a/test/e2e/pages/newProjectWizard.ts +++ b/test/e2e/pages/newProjectWizard.ts @@ -162,6 +162,7 @@ export class NewProjectWizard { .click({ timeout: 5000 }); } catch (error) { await this.code.driver.page.keyboard.press('Escape'); + throw error; } }).toPass({ intervals: [1_000, 5_000, 10_000], timeout: 15000 }); diff --git a/test/e2e/tests/new-project-wizard/new-project-python.test.ts b/test/e2e/tests/new-project-wizard/new-project-python.test.ts index 3c2ecb28eb5..1d4c36d860a 100644 --- a/test/e2e/tests/new-project-wizard/new-project-python.test.ts +++ b/test/e2e/tests/new-project-wizard/new-project-python.test.ts @@ -13,37 +13,20 @@ test.use({ // Not running conda test on windows because conda reeks havoc on selecting the correct python interpreter test.describe('Python - New Project Wizard', { tag: [tags.MODAL, tags.NEW_PROJECT_WIZARD] }, () => { - test('Existing env: ipykernel already installed', { tag: [tags.WIN], }, async function ({ app, python, packages }) { + test('Existing env: ipykernel already installed', { tag: [tags.WIN], }, async function ({ app, python }) { const projectTitle = addRandomNumSuffix('ipykernel-installed'); - await packages.manage('ipykernel', 'install'); await createNewProject(app, { type: ProjectType.PYTHON_PROJECT, title: projectTitle, status: 'existing', - ipykernelFeedback: 'hide', + ipykernelFeedback: 'show', // change to 'hide' when https://github.com/posit-dev/positron/issues/6386 is fixed interpreterPath: await getInterpreterPath(app), }); await verifyProjectCreation(app, projectTitle); }); - test('Existing env: ipykernel not already installed', { tag: [tags.WIN] }, async function ({ app, python, packages }) { - const projectTitle = addRandomNumSuffix('no-ipykernel'); - - await packages.manage('ipykernel', 'uninstall'); - await createNewProject(app, { - type: ProjectType.PYTHON_PROJECT, - title: projectTitle, - status: 'existing', - interpreterPath: await getInterpreterPath(app), - ipykernelFeedback: 'show' - }); - - await verifyProjectCreation(app, projectTitle); - await verifyIpykernelInstalled(app); - }); - test('New env: Git initialized', { tag: [tags.CRITICAL, tags.WIN] }, async function ({ app }) { const projectTitle = addRandomNumSuffix('git-init'); From 836ed7eb088b0ab3963b9311e78086ce4f4610de Mon Sep 17 00:00:00 2001 From: Chris Mead Date: Tue, 18 Feb 2025 12:28:42 -0700 Subject: [PATCH 4/5] remove dead function --- .../tests/new-project-wizard/new-project-python.test.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/e2e/tests/new-project-wizard/new-project-python.test.ts b/test/e2e/tests/new-project-wizard/new-project-python.test.ts index 1d4c36d860a..7bd2f648c77 100644 --- a/test/e2e/tests/new-project-wizard/new-project-python.test.ts +++ b/test/e2e/tests/new-project-wizard/new-project-python.test.ts @@ -128,14 +128,6 @@ async function verifyGitStatus(app: Application) { }); } - -async function verifyIpykernelInstalled(app: Application) { - await test.step('Verify ipykernel is installed', async () => { - await app.workbench.console.typeToConsole('pip show ipykernel', 10, true); - await app.workbench.console.waitForConsoleContents('Name: ipykernel'); - }); -} - async function getInterpreterPath(app: Application): Promise { let interpreterPath: string | undefined; From b79e5bf43c6916226a7e30b7ce5c1cd1ce0c0a3a Mon Sep 17 00:00:00 2001 From: Chris Mead Date: Wed, 19 Feb 2025 08:50:15 -0700 Subject: [PATCH 5/5] remove reticulate web tag --- test/e2e/tests/reticulate/reticulate.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/e2e/tests/reticulate/reticulate.test.ts b/test/e2e/tests/reticulate/reticulate.test.ts index 8e48113ab6c..15759218dad 100644 --- a/test/e2e/tests/reticulate/reticulate.test.ts +++ b/test/e2e/tests/reticulate/reticulate.test.ts @@ -13,9 +13,10 @@ test.use({ // RETICULATE_PYTHON // to the installed python path +// Re-add WEB tag when https://github.com/posit-dev/positron/issues/6397 is fixed test.describe('Reticulate', { - tag: [tags.WEB, tags.RETICULATE], - annotation: [{ type: 'issue', description: 'https://github.com/posit-dev/positron/issues/5226' }] + tag: [tags.RETICULATE], + annotation: [{ type: 'issue', description: 'https://github.com/posit-dev/positron/issues/6397' }] }, () => { test.beforeAll(async function ({ app, userSettings }) { try {