From 1279363925f72baee22d6fcaa8d741bed4d6b162 Mon Sep 17 00:00:00 2001 From: Christopher Mead Date: Fri, 20 Sep 2024 15:54:29 -0600 Subject: [PATCH] Enable web testing for smoke tests; bump slack reporter (#4775) Enable web testing for smoke tests; bump slack reporter. Keep in mind that [positron-license](https://github.com/posit-dev/positron-license) is needed parallel to positron and it needs to be set up. ### QA Notes All smoke tests should pass Web smoke tests should be locally runnable Slack reporter for workflow_dispatch should report branch --- .github/workflows/positron-full-test.yml | 2 +- .github/workflows/positron-merge-to-main.yml | 2 +- .vscode/launch.json | 27 ++++++++++++++++++++ test/automation/src/playwrightBrowser.ts | 6 ++++- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/.github/workflows/positron-full-test.yml b/.github/workflows/positron-full-test.yml index 5617498811f..0d6772729e1 100644 --- a/.github/workflows/positron-full-test.yml +++ b/.github/workflows/positron-full-test.yml @@ -173,7 +173,7 @@ jobs: if: ${{ failure() }} steps: - name: "Send Slack notification" - uses: testlabauto/action-test-results-to-slack@v0.0.4 + uses: testlabauto/action-test-results-to-slack@v0.0.6 with: github_token: ${{ secrets.POSITRON_GITHUB_PAT }} slack_token: ${{ secrets.SMOKE_TESTS_SLACK_TOKEN }} diff --git a/.github/workflows/positron-merge-to-main.yml b/.github/workflows/positron-merge-to-main.yml index 9470552b2d7..af2cb3434f2 100644 --- a/.github/workflows/positron-merge-to-main.yml +++ b/.github/workflows/positron-merge-to-main.yml @@ -152,7 +152,7 @@ jobs: if: ${{ failure() && needs.linux.outputs.target == 'smoketest-merge-to-main' }} steps: - name: 'Send Slack notification' - uses: testlabauto/action-test-results-to-slack@v0.0.4 + uses: testlabauto/action-test-results-to-slack@v0.0.6 with: github_token: ${{ secrets.POSITRON_GITHUB_PAT }} slack_token: ${{ secrets.SMOKE_TESTS_SLACK_TOKEN }} diff --git a/.vscode/launch.json b/.vscode/launch.json index b304c9e22df..6495503b728 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -537,6 +537,33 @@ "VSCODE_CLI": "1" } }, + { + "type": "node", + "request": "launch", + "name": "Launch Web Smoke Test", + "program": "${workspaceFolder}/test/smoke/test/index.js", + "cwd": "${workspaceFolder}/test/smoke", + "timeout": 240000, + "args": [ + "--tracing", + "--web" + ], + "outFiles": [ + "${cwd}/out/**/*.js" + ], + //---- Start Positron + "sourceMaps": true, + "resolveSourceMapLocations": [ + "${workspaceFolder}/**", + "!**/node_modules/**" + ], + //--- End Positron + "env": { + "NODE_ENV": "development", + "VSCODE_DEV": "1", + "VSCODE_CLI": "1" + } + }, { "name": "Launch Built-in Extension", "type": "extensionHost", diff --git a/test/automation/src/playwrightBrowser.ts b/test/automation/src/playwrightBrowser.ts index 0a98250767b..5adaa33d7d8 100644 --- a/test/automation/src/playwrightBrowser.ts +++ b/test/automation/src/playwrightBrowser.ts @@ -50,7 +50,11 @@ async function launchServer(options: LaunchOptions) { `--extensions-dir=${extensionsPath}`, `--server-data-dir=${agentFolder}`, '--accept-server-license-terms', - `--logsPath=${serverLogsPath}` + `--logsPath=${serverLogsPath}`, + // --- Start Positron --- + `--connection-token`, + `dev-token` + // --- End Positron --- ]; if (options.verbose) {