From 7fd72986d0254ce1efe7ccd116fc42d7f90912dd Mon Sep 17 00:00:00 2001 From: Lewis Sanchez <87730006+lewis-sanchez@users.noreply.github.com> Date: Fri, 10 Sep 2021 16:51:38 -0700 Subject: [PATCH] Enables smoke tests for ADS Web. (#17014) * Adds smoketests for ADS web. * Refines element selector for editor suggestion list * Revert "Refines element selector for editor suggestion list" This reverts commit 61b34cd07ab9fa16546d7aab5bce24c73559c6b0. * Skip tests that timeout for not finding targeted DOM element * Missed undoing a modification * Reinstates skipped tests * Removes unnecssary TODO * Disables smoke tests for darwin * Fixed indenting to resolve azure DevOps yaml error * Updates server path based on setup doc * Moves smoketests after extensions are built * Corrects indentation * Fixes indentation with bottom half of smoketests script * Updates sqlite URL to latest release * Yields correct ADS sqlite release version for web and non web * removes accidental whitespace from previous commit * Code review changes * Additional review change * update distro Co-authored-by: Charles Gagnon --- build/azure-pipelines/web/sql-product-build-web.yml | 9 +++++++++ package.json | 2 +- test/smoke/src/sql/main.ts | 6 ++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/build/azure-pipelines/web/sql-product-build-web.yml b/build/azure-pipelines/web/sql-product-build-web.yml index 1a71cef142..4d7e612f68 100644 --- a/build/azure-pipelines/web/sql-product-build-web.yml +++ b/build/azure-pipelines/web/sql-product-build-web.yml @@ -137,6 +137,15 @@ steps: yarn gulp package-external-extensions displayName: Package External extensions +- script: | + set -e + node ./node_modules/playwright/install.js + VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-x64" \ + yarn smoketest --web --headless --screenshots "$(build.artifactstagingdirectory)/smokeshots" + displayName: Run smoke tests (Browser) + continueOnError: true + condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true')) + - script: | set -e yarn gulp package-langpacks diff --git a/package.json b/package.json index 77e527aaf3..342494123b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "azuredatastudio", "version": "1.33.0", - "distro": "db642636eb64c9fb00ee4005d67789de5bbed8c9", + "distro": "01b299c0f340f6cf9dc10290b3aadea449c7940f", "author": { "name": "Microsoft Corporation" }, diff --git a/test/smoke/src/sql/main.ts b/test/smoke/src/sql/main.ts index c602c1c5ed..fa2f2b3d36 100644 --- a/test/smoke/src/sql/main.ts +++ b/test/smoke/src/sql/main.ts @@ -34,12 +34,14 @@ export function main(isWeb: boolean = false): void { const PLATFORM = '${PLATFORM}'; const RUNTIME = '${RUNTIME}'; const VERSION = '${VERSION}'; +const RELEASE_VERSION = '${RELEASE_VERSION}'; -const sqliteUrl = `https://github.com/Microsoft/azuredatastudio-sqlite/releases/download/1.5.0/azuredatastudio-sqlite-${PLATFORM}-${RUNTIME}-${VERSION}.zip`; +const sqliteUrl = `https://github.com/Microsoft/azuredatastudio-sqlite/releases/download/${RELEASE_VERSION}/azuredatastudio-sqlite-${PLATFORM}-${RUNTIME}-${VERSION}.zip`; export async function setup(app: ApplicationOptions): Promise { console.log('*** Downloading test extensions'); - const requestUrl = sqliteUrl.replace(PLATFORM, process.platform).replace(RUNTIME, getRuntime(app.web || app.remote || false)).replace(VERSION, getVersion(app.web || app.remote || false)); + const releaseVersion = app.web ? '1.6.0' : '1.5.0'; + const requestUrl = sqliteUrl.replace(RELEASE_VERSION, releaseVersion).replace(PLATFORM, process.platform).replace(RUNTIME, getRuntime(app.web || app.remote || false)).replace(VERSION, getVersion(app.web || app.remote || false)); const zip = await fetch(requestUrl); if (!zip) { throw new Error('Could not get extension for current platform');