diff --git a/.vscode/settings.json b/.vscode/settings.json index 425ed146f25..4c1bd8c0f5d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -50,6 +50,7 @@ "out-vscode-reh/**": true, "extensions/**/dist/**": true, "extensions/**/out/**": true, + "test/e2e/out/**": true, "test/smoke/out/**": true, "test/automation/out/**": true, "test/integration/browser/out/**": true diff --git a/build/secrets/.secrets.baseline b/build/secrets/.secrets.baseline index f3971fd6edc..5f32cd7fde7 100644 --- a/build/secrets/.secrets.baseline +++ b/build/secrets/.secrets.baseline @@ -94,6 +94,10 @@ "path": "detect_secrets.filters.common.is_baseline_file", "filename": "build/secrets/.secrets.baseline" }, + { + "path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies", + "min_level": 2 + }, { "path": "detect_secrets.filters.heuristic.is_indirect_reference" }, @@ -1940,5 +1944,5 @@ } ] }, - "generated_at": "2024-12-16T16:39:50Z" + "generated_at": "2024-12-16T22:03:58Z" } diff --git a/eslint.config.js b/eslint.config.js index abe14b9038e..1ea4944e40e 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1269,10 +1269,10 @@ export default tseslint.config( 'local/code-import-patterns': [ 'warn', { - 'target': 'test/smoke/**', + 'target': 'test/e2e/**', 'restrictions': [ 'test/automation', - 'test/smoke/**', + 'test/e2e/**', '@vscode/*', '@parcel/*', '@playwright/*', diff --git a/playwright.config.ts b/playwright.config.ts index aa0e0f4ce20..bfddca3b2bb 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { defineConfig } from '@playwright/test'; -import { CustomTestOptions } from './test/e2e/features/_test.setup'; +import { CustomTestOptions } from './test/e2e/areas/_test.setup'; import type { GitHubActionOptions } from '@midleman/github-actions-reporter'; import { currentsReporter } from '@currents/playwright'; @@ -12,7 +12,7 @@ import { currentsReporter } from '@currents/playwright'; * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ - globalSetup: './test/e2e/features/_global.setup.ts', + globalSetup: './test/e2e/areas/_global.setup.ts', testDir: './test/e2e', testIgnore: '**/example.test.ts', testMatch: '*.test.ts', diff --git a/scripts/slack-skipped-tests.js b/scripts/slack-skipped-tests.js index 922eb67fda5..1dc2412d07a 100644 --- a/scripts/slack-skipped-tests.js +++ b/scripts/slack-skipped-tests.js @@ -8,7 +8,7 @@ const { execSync } = require('child_process'); const slackSkippedTests = (slackWebhookUrl) => { try { const skippedTests = execSync( - `grep -r --include \\*.test.ts -E "describe\\.skip|test\\.skip" test/e2e/features | sed 's/\\.test\\.ts.*$/.test.ts/'` + `grep -r --include \\*.test.ts -E "describe\\.skip|test\\.skip" test/e2e/areas | sed 's/\\.test\\.ts.*$/.test.ts/'` ).toString(); const slackMessage = { diff --git a/test/e2e/README.md b/test/e2e/README.md index 4408edd66b7..ad9788abaa9 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -20,16 +20,16 @@ This document provides guidelines and setup instructions for effectively running ### Test Code Location -- `test/e2e/features` +- `test/e2e/areas` -For instance, the e2e tests for the help pane are at `test/e2e/features/help/help.test.ts` +For instance, the e2e tests for the help pane are at `test/e2e/areas/help/help.test.ts` ### Test Helpers Location - General helpers dir: `test/automation/src` - Positron helpers dir: `test/automation/src/positron` -For each area under test, there is typically a companion class that assists with locating and interacting with elements (similar to POM pattern). For instance, the e2e tests for the help pane are at `test/e2e/features/help/help.test.ts` +For each area under test, there is typically a companion class that assists with locating and interacting with elements (similar to POM pattern). For instance, the e2e tests for the help pane are at `test/e2e/areas/help/help.test.ts` ### Test Template diff --git a/test/e2e/features/_global.setup.ts b/test/e2e/areas/_global.setup.ts similarity index 100% rename from test/e2e/features/_global.setup.ts rename to test/e2e/areas/_global.setup.ts diff --git a/test/e2e/features/_test.setup.ts b/test/e2e/areas/_test.setup.ts similarity index 99% rename from test/e2e/features/_test.setup.ts rename to test/e2e/areas/_test.setup.ts index 15be8a3ff3a..95f2b5a96cc 100644 --- a/test/e2e/features/_test.setup.ts +++ b/test/e2e/areas/_test.setup.ts @@ -11,26 +11,26 @@ const { test: base, expect: playwrightExpect } = playwright; import { join } from 'path'; import * as os from 'os'; import * as fs from 'fs'; - import path = require('path'); -// eslint-disable-next-line local/code-import-patterns import { rename, rm, access, mkdir } from 'fs/promises'; import { constants } from 'fs'; +import { randomUUID } from 'crypto'; // Third-party packages -import { randomUUID } from 'crypto'; import archiver from 'archiver'; // Local imports import { createLogger, createApp, TestTags } from '../helpers'; import { Application, Logger, PositronPythonFixtures, PositronRFixtures, PositronUserSettingsFixtures, UserSetting } from '../../automation'; +// Constants const TEMP_DIR = `temp-${randomUUID()}`; const ROOT_PATH = process.cwd(); const LOGS_ROOT_PATH = join(ROOT_PATH, 'test-logs'); let SPEC_NAME = ''; let fixtureScreenshot: Buffer; +// Test fixtures export const test = base.extend({ suiteId: ['', { scope: 'worker', option: true }], diff --git a/test/e2e/features/action-bar/editor-action-bar.test.ts b/test/e2e/areas/action-bar/editor-action-bar.test.ts similarity index 100% rename from test/e2e/features/action-bar/editor-action-bar.test.ts rename to test/e2e/areas/action-bar/editor-action-bar.test.ts diff --git a/test/e2e/features/apps/python-apps.test.ts b/test/e2e/areas/apps/python-apps.test.ts similarity index 100% rename from test/e2e/features/apps/python-apps.test.ts rename to test/e2e/areas/apps/python-apps.test.ts diff --git a/test/e2e/features/apps/shiny.test.ts b/test/e2e/areas/apps/shiny.test.ts similarity index 100% rename from test/e2e/features/apps/shiny.test.ts rename to test/e2e/areas/apps/shiny.test.ts diff --git a/test/e2e/features/connections/connections-db.test.ts b/test/e2e/areas/connections/connections-db.test.ts similarity index 100% rename from test/e2e/features/connections/connections-db.test.ts rename to test/e2e/areas/connections/connections-db.test.ts diff --git a/test/e2e/features/console/console-ansi.test.ts b/test/e2e/areas/console/console-ansi.test.ts similarity index 100% rename from test/e2e/features/console/console-ansi.test.ts rename to test/e2e/areas/console/console-ansi.test.ts diff --git a/test/e2e/features/console/console-autocomplete.test.ts b/test/e2e/areas/console/console-autocomplete.test.ts similarity index 100% rename from test/e2e/features/console/console-autocomplete.test.ts rename to test/e2e/areas/console/console-autocomplete.test.ts diff --git a/test/e2e/features/console/console-clipboard.test.ts b/test/e2e/areas/console/console-clipboard.test.ts similarity index 100% rename from test/e2e/features/console/console-clipboard.test.ts rename to test/e2e/areas/console/console-clipboard.test.ts diff --git a/test/e2e/features/console/console-history.test.ts b/test/e2e/areas/console/console-history.test.ts similarity index 100% rename from test/e2e/features/console/console-history.test.ts rename to test/e2e/areas/console/console-history.test.ts diff --git a/test/e2e/features/console/console-input.test.ts b/test/e2e/areas/console/console-input.test.ts similarity index 100% rename from test/e2e/features/console/console-input.test.ts rename to test/e2e/areas/console/console-input.test.ts diff --git a/test/e2e/features/console/console-output.test.ts b/test/e2e/areas/console/console-output.test.ts similarity index 100% rename from test/e2e/features/console/console-output.test.ts rename to test/e2e/areas/console/console-output.test.ts diff --git a/test/e2e/features/console/console-python.test.ts b/test/e2e/areas/console/console-python.test.ts similarity index 100% rename from test/e2e/features/console/console-python.test.ts rename to test/e2e/areas/console/console-python.test.ts diff --git a/test/e2e/features/console/console-r.test.ts b/test/e2e/areas/console/console-r.test.ts similarity index 100% rename from test/e2e/features/console/console-r.test.ts rename to test/e2e/areas/console/console-r.test.ts diff --git a/test/e2e/features/data-explorer/100x100-pandas.test.ts b/test/e2e/areas/data-explorer/100x100-pandas.test.ts similarity index 100% rename from test/e2e/features/data-explorer/100x100-pandas.test.ts rename to test/e2e/areas/data-explorer/100x100-pandas.test.ts diff --git a/test/e2e/features/data-explorer/100x100-polars.test.ts b/test/e2e/areas/data-explorer/100x100-polars.test.ts similarity index 100% rename from test/e2e/features/data-explorer/100x100-polars.test.ts rename to test/e2e/areas/data-explorer/100x100-polars.test.ts diff --git a/test/e2e/features/data-explorer/100x100-r.test.ts b/test/e2e/areas/data-explorer/100x100-r.test.ts similarity index 100% rename from test/e2e/features/data-explorer/100x100-r.test.ts rename to test/e2e/areas/data-explorer/100x100-r.test.ts diff --git a/test/e2e/features/data-explorer/data-explorer-headless.test.ts b/test/e2e/areas/data-explorer/data-explorer-headless.test.ts similarity index 100% rename from test/e2e/features/data-explorer/data-explorer-headless.test.ts rename to test/e2e/areas/data-explorer/data-explorer-headless.test.ts diff --git a/test/e2e/features/data-explorer/data-explorer-python-pandas.test.ts b/test/e2e/areas/data-explorer/data-explorer-python-pandas.test.ts similarity index 100% rename from test/e2e/features/data-explorer/data-explorer-python-pandas.test.ts rename to test/e2e/areas/data-explorer/data-explorer-python-pandas.test.ts diff --git a/test/e2e/features/data-explorer/data-explorer-python-polars.test.ts b/test/e2e/areas/data-explorer/data-explorer-python-polars.test.ts similarity index 100% rename from test/e2e/features/data-explorer/data-explorer-python-polars.test.ts rename to test/e2e/areas/data-explorer/data-explorer-python-polars.test.ts diff --git a/test/e2e/features/data-explorer/data-explorer-r.test.ts b/test/e2e/areas/data-explorer/data-explorer-r.test.ts similarity index 100% rename from test/e2e/features/data-explorer/data-explorer-r.test.ts rename to test/e2e/areas/data-explorer/data-explorer-r.test.ts diff --git a/test/e2e/features/data-explorer/duckdb-sparklines.test.ts b/test/e2e/areas/data-explorer/duckdb-sparklines.test.ts similarity index 100% rename from test/e2e/features/data-explorer/duckdb-sparklines.test.ts rename to test/e2e/areas/data-explorer/duckdb-sparklines.test.ts diff --git a/test/e2e/features/data-explorer/helpers/100x100.ts b/test/e2e/areas/data-explorer/helpers/100x100.ts similarity index 100% rename from test/e2e/features/data-explorer/helpers/100x100.ts rename to test/e2e/areas/data-explorer/helpers/100x100.ts diff --git a/test/e2e/features/data-explorer/large-data-frame.test.ts b/test/e2e/areas/data-explorer/large-data-frame.test.ts similarity index 100% rename from test/e2e/features/data-explorer/large-data-frame.test.ts rename to test/e2e/areas/data-explorer/large-data-frame.test.ts diff --git a/test/e2e/features/data-explorer/sparklines.test.ts b/test/e2e/areas/data-explorer/sparklines.test.ts similarity index 100% rename from test/e2e/features/data-explorer/sparklines.test.ts rename to test/e2e/areas/data-explorer/sparklines.test.ts diff --git a/test/e2e/features/data-explorer/very-large-data-frame.test.ts b/test/e2e/areas/data-explorer/very-large-data-frame.test.ts similarity index 100% rename from test/e2e/features/data-explorer/very-large-data-frame.test.ts rename to test/e2e/areas/data-explorer/very-large-data-frame.test.ts diff --git a/test/e2e/features/data-explorer/xlsx-data-frame.test.ts b/test/e2e/areas/data-explorer/xlsx-data-frame.test.ts similarity index 100% rename from test/e2e/features/data-explorer/xlsx-data-frame.test.ts rename to test/e2e/areas/data-explorer/xlsx-data-frame.test.ts diff --git a/test/e2e/features/editor/fast-execution.test.ts b/test/e2e/areas/editor/fast-execution.test.ts similarity index 100% rename from test/e2e/features/editor/fast-execution.test.ts rename to test/e2e/areas/editor/fast-execution.test.ts diff --git a/test/e2e/features/example.test.ts b/test/e2e/areas/example.test.ts similarity index 100% rename from test/e2e/features/example.test.ts rename to test/e2e/areas/example.test.ts diff --git a/test/e2e/features/help/f1.test.ts b/test/e2e/areas/help/f1.test.ts similarity index 100% rename from test/e2e/features/help/f1.test.ts rename to test/e2e/areas/help/f1.test.ts diff --git a/test/e2e/features/help/help.test.ts b/test/e2e/areas/help/help.test.ts similarity index 100% rename from test/e2e/features/help/help.test.ts rename to test/e2e/areas/help/help.test.ts diff --git a/test/e2e/features/layouts/layouts.test.ts b/test/e2e/areas/layouts/layouts.test.ts similarity index 100% rename from test/e2e/features/layouts/layouts.test.ts rename to test/e2e/areas/layouts/layouts.test.ts diff --git a/test/e2e/features/new-project-wizard/new-project-python.test.ts b/test/e2e/areas/new-project-wizard/new-project-python.test.ts similarity index 100% rename from test/e2e/features/new-project-wizard/new-project-python.test.ts rename to test/e2e/areas/new-project-wizard/new-project-python.test.ts diff --git a/test/e2e/features/new-project-wizard/new-project-r-jupyter.test.ts b/test/e2e/areas/new-project-wizard/new-project-r-jupyter.test.ts similarity index 100% rename from test/e2e/features/new-project-wizard/new-project-r-jupyter.test.ts rename to test/e2e/areas/new-project-wizard/new-project-r-jupyter.test.ts diff --git a/test/e2e/features/notebook/notebook-create.test.ts b/test/e2e/areas/notebook/notebook-create.test.ts similarity index 100% rename from test/e2e/features/notebook/notebook-create.test.ts rename to test/e2e/areas/notebook/notebook-create.test.ts diff --git a/test/e2e/features/notebook/notebook-large-python.test.ts b/test/e2e/areas/notebook/notebook-large-python.test.ts similarity index 100% rename from test/e2e/features/notebook/notebook-large-python.test.ts rename to test/e2e/areas/notebook/notebook-large-python.test.ts diff --git a/test/e2e/features/outline/outline.test.ts b/test/e2e/areas/outline/outline.test.ts similarity index 100% rename from test/e2e/features/outline/outline.test.ts rename to test/e2e/areas/outline/outline.test.ts diff --git a/test/e2e/features/output/console-ouput-log.test.ts b/test/e2e/areas/output/console-ouput-log.test.ts similarity index 100% rename from test/e2e/features/output/console-ouput-log.test.ts rename to test/e2e/areas/output/console-ouput-log.test.ts diff --git a/test/e2e/features/plots/autos-linux.png b/test/e2e/areas/plots/autos-linux.png similarity index 100% rename from test/e2e/features/plots/autos-linux.png rename to test/e2e/areas/plots/autos-linux.png diff --git a/test/e2e/features/plots/autos-win32.png b/test/e2e/areas/plots/autos-win32.png similarity index 100% rename from test/e2e/features/plots/autos-win32.png rename to test/e2e/areas/plots/autos-win32.png diff --git a/test/e2e/features/plots/graphviz-linux.png b/test/e2e/areas/plots/graphviz-linux.png similarity index 100% rename from test/e2e/features/plots/graphviz-linux.png rename to test/e2e/areas/plots/graphviz-linux.png diff --git a/test/e2e/features/plots/graphviz-win32.png b/test/e2e/areas/plots/graphviz-win32.png similarity index 100% rename from test/e2e/features/plots/graphviz-win32.png rename to test/e2e/areas/plots/graphviz-win32.png diff --git a/test/e2e/features/plots/matplotlib-interact.test.ts b/test/e2e/areas/plots/matplotlib-interact.test.ts similarity index 100% rename from test/e2e/features/plots/matplotlib-interact.test.ts rename to test/e2e/areas/plots/matplotlib-interact.test.ts diff --git a/test/e2e/features/plots/plots.test.ts b/test/e2e/areas/plots/plots.test.ts similarity index 100% rename from test/e2e/features/plots/plots.test.ts rename to test/e2e/areas/plots/plots.test.ts diff --git a/test/e2e/features/plots/pythonScatterplot-linux.png b/test/e2e/areas/plots/pythonScatterplot-linux.png similarity index 100% rename from test/e2e/features/plots/pythonScatterplot-linux.png rename to test/e2e/areas/plots/pythonScatterplot-linux.png diff --git a/test/e2e/features/plots/pythonScatterplot-win32.png b/test/e2e/areas/plots/pythonScatterplot-win32.png similarity index 100% rename from test/e2e/features/plots/pythonScatterplot-win32.png rename to test/e2e/areas/plots/pythonScatterplot-win32.png diff --git a/test/e2e/features/quarto/quarto.test.ts b/test/e2e/areas/quarto/quarto.test.ts similarity index 100% rename from test/e2e/features/quarto/quarto.test.ts rename to test/e2e/areas/quarto/quarto.test.ts diff --git a/test/e2e/features/r-markdown/r-markdown.test.ts b/test/e2e/areas/r-markdown/r-markdown.test.ts similarity index 100% rename from test/e2e/features/r-markdown/r-markdown.test.ts rename to test/e2e/areas/r-markdown/r-markdown.test.ts diff --git a/test/e2e/features/r-pkg-development/r-pkg-development.test.ts b/test/e2e/areas/r-pkg-development/r-pkg-development.test.ts similarity index 100% rename from test/e2e/features/r-pkg-development/r-pkg-development.test.ts rename to test/e2e/areas/r-pkg-development/r-pkg-development.test.ts diff --git a/test/e2e/features/reticulate/reticulate.test.ts b/test/e2e/areas/reticulate/reticulate.test.ts similarity index 100% rename from test/e2e/features/reticulate/reticulate.test.ts rename to test/e2e/areas/reticulate/reticulate.test.ts diff --git a/test/e2e/features/test-explorer/test-explorer.test.ts b/test/e2e/areas/test-explorer/test-explorer.test.ts similarity index 100% rename from test/e2e/features/test-explorer/test-explorer.test.ts rename to test/e2e/areas/test-explorer/test-explorer.test.ts diff --git a/test/e2e/features/top-action-bar/interpreter-dropdown.test.ts b/test/e2e/areas/top-action-bar/interpreter-dropdown.test.ts similarity index 100% rename from test/e2e/features/top-action-bar/interpreter-dropdown.test.ts rename to test/e2e/areas/top-action-bar/interpreter-dropdown.test.ts diff --git a/test/e2e/features/top-action-bar/top-action-bar-save.test.ts b/test/e2e/areas/top-action-bar/top-action-bar-save.test.ts similarity index 100% rename from test/e2e/features/top-action-bar/top-action-bar-save.test.ts rename to test/e2e/areas/top-action-bar/top-action-bar-save.test.ts diff --git a/test/e2e/features/variables/variables-expanded.test.ts b/test/e2e/areas/variables/variables-expanded.test.ts similarity index 100% rename from test/e2e/features/variables/variables-expanded.test.ts rename to test/e2e/areas/variables/variables-expanded.test.ts diff --git a/test/e2e/features/variables/variables-notebook.test.ts b/test/e2e/areas/variables/variables-notebook.test.ts similarity index 100% rename from test/e2e/features/variables/variables-notebook.test.ts rename to test/e2e/areas/variables/variables-notebook.test.ts diff --git a/test/e2e/features/variables/variables-pane.test.ts b/test/e2e/areas/variables/variables-pane.test.ts similarity index 100% rename from test/e2e/features/variables/variables-pane.test.ts rename to test/e2e/areas/variables/variables-pane.test.ts diff --git a/test/e2e/features/viewer/viewer.test.ts b/test/e2e/areas/viewer/viewer.test.ts similarity index 100% rename from test/e2e/features/viewer/viewer.test.ts rename to test/e2e/areas/viewer/viewer.test.ts diff --git a/test/e2e/features/welcome/welcome.test.ts b/test/e2e/areas/welcome/welcome.test.ts similarity index 100% rename from test/e2e/features/welcome/welcome.test.ts rename to test/e2e/areas/welcome/welcome.test.ts