Cleanup package.json test scripts (#141210)

* tests - remove `yarn test`

* fix smoke test

* readme

* 💄

* ci - do not install playwright
This commit is contained in:
Benjamin Pasero 2022-01-22 13:07:14 +01:00 committed by GitHub
parent 8756f0969c
commit c9960f9cee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 16 deletions

View file

@ -79,7 +79,7 @@ jobs:
run: yarn test-node
- name: Run Unit Tests (Browser, Chromium)
run: yarn test-browser --browser chromium
run: yarn test-browser-no-install --browser chromium
- name: Run Integration Tests (Electron)
run: .\scripts\test-integration.bat
@ -159,7 +159,7 @@ jobs:
- name: Run Unit Tests (Browser, Chromium)
id: browser-unit-tests
run: DISPLAY=:10 yarn test-browser --browser chromium
run: DISPLAY=:10 yarn test-browser-no-install --browser chromium
- name: Run Integration Tests (Electron)
id: electron-integration-tests
@ -236,7 +236,7 @@ jobs:
run: yarn test-node
- name: Run Unit Tests (Browser, Chromium)
run: DISPLAY=:10 yarn test-browser --browser chromium
run: DISPLAY=:10 yarn test-browser-no-install --browser chromium
- name: Run Integration Tests (Electron)
run: DISPLAY=:10 ./scripts/test-integration.sh

View file

@ -186,7 +186,7 @@ steps:
- script: |
set -e
DEBUG=*browser* yarn test-browser --sequential --build --browser chromium --browser webkit --tfs "Browser Unit Tests"
DEBUG=*browser* yarn test-browser-no-install --sequential --build --browser chromium --browser webkit --tfs "Browser Unit Tests"
displayName: Run unit tests (Browser, Chromium & Webkit)
timeoutInMinutes: 30
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))

View file

@ -182,7 +182,7 @@ steps:
- script: |
set -e
DEBUG=*browser* yarn test-browser --build --browser chromium --tfs "Browser Unit Tests"
DEBUG=*browser* yarn test-browser-no-install --build --browser chromium --tfs "Browser Unit Tests"
displayName: Run unit tests (Browser, Chromium)
timeoutInMinutes: 7
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))

View file

@ -167,7 +167,7 @@ steps:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { yarn test-browser --sequential --build --browser chromium --browser firefox --tfs "Browser Unit Tests" }
exec { yarn test-browser-no-install --sequential --build --browser chromium --browser firefox --tfs "Browser Unit Tests" }
displayName: Run unit tests (Browser, Chromium & Firefox)
timeoutInMinutes: 20
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))

View file

@ -9,8 +9,9 @@
"main": "./out/main",
"private": true,
"scripts": {
"test": "mocha",
"test-browser": "node test/unit/browser/index.js",
"test": "echo Please run any of the test scripts from the scripts folder.",
"test-browser": "npx playwright install && node test/unit/browser/index.js",
"test-browser-no-install": "node test/unit/browser/index.js",
"test-node": "mocha test/unit/node/index.js --delay --ui=tdd --exit",
"preinstall": "node build/npm/preinstall.js",
"postinstall": "node build/npm/postinstall.js",
@ -34,7 +35,7 @@
"7z": "7z",
"update-grammars": "node build/npm/update-all-grammars.js",
"update-localization-extension": "node build/npm/update-localization-extension.js",
"smoketest": "cd test/smoke && yarn compile && node test/index.js",
"smoketest": "node build/lib/preLaunch.js && cd test/smoke && yarn compile && node test/index.js",
"smoketest-no-compile": "cd test/smoke && node test/index.js",
"download-builtin-extensions": "node build/lib/builtInExtensions.js",
"download-builtin-extensions-cg": "node build/lib/builtInExtensionsCG.js",

View file

@ -6,4 +6,3 @@ This folder contains the various test runners for VSCode. Please refer to the do
* `unit`: our suite of unit tests ([README](unit/README.md))
* `integration`: our suite of API tests ([README](integration/browser/README.md))
* `smoke`: our suite of automated UI tests ([README](smoke/README.md))
* `ui`: our suite of manual UI tests

View file

@ -8,12 +8,6 @@ Make sure you are on **Node v12.x**.
# Build extensions in the VS Code repo (if needed)
yarn && yarn compile
# Install Dependencies and Compile
yarn --cwd test/smoke
# Prepare OSS in repo*
node build/lib/preLaunch.js
# Dev (Electron)
yarn smoketest